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/. */
8 * interface for rendering objects whose state is saved in
9 * session-history (back-forward navigation)
12 #ifndef _nsIStatefulFrame_h
13 #define _nsIStatefulFrame_h
15 #include "nsContentUtils.h"
16 #include "nsQueryFrame.h"
20 } // namespace mozilla
22 class nsIStatefulFrame
{
24 NS_DECL_QUERYFRAME_TARGET(nsIStatefulFrame
)
26 // Save the state for this frame.
27 virtual mozilla::UniquePtr
<mozilla::PresState
> SaveState() = 0;
29 // Restore the state for this frame from aState
30 NS_IMETHOD
RestoreState(mozilla::PresState
* aState
) = 0;
32 // Generate a key for this stateful frame
33 virtual void GenerateStateKey(nsIContent
* aContent
,
34 mozilla::dom::Document
* aDocument
,
36 nsContentUtils::GenerateStateKey(aContent
, aDocument
, aKey
);
40 #endif /* _nsIStatefulFrame_h */