Line data Source code
1 : /* This Source Code Form is subject to the terms of the Mozilla Public
2 : * License, v. 2.0. If a copy of the MPL was not distributed with this
3 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 :
5 : /*
6 : * interface for rendering objects whose state is saved in
7 : * session-history (back-forward navigation)
8 : */
9 :
10 : #ifndef _nsIStatefulFrame_h
11 : #define _nsIStatefulFrame_h
12 :
13 : #include "nsContentUtils.h"
14 : #include "nsQueryFrame.h"
15 :
16 : class nsPresState;
17 :
18 47 : class nsIStatefulFrame
19 : {
20 : public:
21 : NS_DECL_QUERYFRAME_TARGET(nsIStatefulFrame)
22 :
23 : // Save the state for this frame. If this method succeeds, the caller is
24 : // responsible for deleting the resulting state when done with it.
25 : NS_IMETHOD SaveState(nsPresState** aState) = 0;
26 :
27 : // Restore the state for this frame from aState
28 : NS_IMETHOD RestoreState(nsPresState* aState) = 0;
29 :
30 : // Generate a key for this stateful frame
31 10 : NS_IMETHOD GenerateStateKey(nsIContent* aContent,
32 : nsIDocument* aDocument,
33 : nsACString& aKey)
34 : {
35 10 : return nsContentUtils::GenerateStateKey(aContent, aDocument, aKey);
36 : };
37 : };
38 :
39 : #endif /* _nsIStatefulFrame_h */
|