/src/mozilla-central/layout/generic/nsIStatefulFrame.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* vim: set ts=8 sts=2 et sw=2 tw=80: */ |
3 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
4 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
5 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | /* |
8 | | * interface for rendering objects whose state is saved in |
9 | | * session-history (back-forward navigation) |
10 | | */ |
11 | | |
12 | | #ifndef _nsIStatefulFrame_h |
13 | | #define _nsIStatefulFrame_h |
14 | | |
15 | | #include "nsContentUtils.h" |
16 | | #include "nsQueryFrame.h" |
17 | | |
18 | | namespace mozilla { |
19 | | class PresState; |
20 | | } // namespace mozilla |
21 | | |
22 | | class nsIStatefulFrame |
23 | | { |
24 | | public: |
25 | | NS_DECL_QUERYFRAME_TARGET(nsIStatefulFrame) |
26 | | |
27 | | // Save the state for this frame. |
28 | | virtual mozilla::UniquePtr<mozilla::PresState> SaveState() = 0; |
29 | | |
30 | | // Restore the state for this frame from aState |
31 | | NS_IMETHOD RestoreState(mozilla::PresState* aState) = 0; |
32 | | |
33 | | // Generate a key for this stateful frame |
34 | | NS_IMETHOD GenerateStateKey(nsIContent* aContent, |
35 | | nsIDocument* aDocument, |
36 | | nsACString& aKey) |
37 | 0 | { |
38 | 0 | return nsContentUtils::GenerateStateKey(aContent, aDocument, aKey); |
39 | 0 | }; |
40 | | }; |
41 | | |
42 | | #endif /* _nsIStatefulFrame_h */ |