2017-10-27 17:33:53 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
2006-03-29 18:29:03 +00:00
|
|
|
/*
|
|
|
|
* interface for rendering objects whose state is saved in
|
|
|
|
* session-history (back-forward navigation)
|
|
|
|
*/
|
|
|
|
|
1999-08-30 22:38:58 +00:00
|
|
|
#ifndef _nsIStatefulFrame_h
|
|
|
|
#define _nsIStatefulFrame_h
|
|
|
|
|
2016-09-02 22:01:09 +00:00
|
|
|
#include "nsContentUtils.h"
|
2009-01-12 19:20:59 +00:00
|
|
|
#include "nsQueryFrame.h"
|
1999-08-30 22:38:58 +00:00
|
|
|
|
2018-03-02 18:18:35 +00:00
|
|
|
namespace mozilla {
|
|
|
|
class PresState;
|
|
|
|
} // namespace mozilla
|
1999-08-30 22:38:58 +00:00
|
|
|
|
2009-01-12 19:20:59 +00:00
|
|
|
class nsIStatefulFrame
|
|
|
|
{
|
2017-07-06 12:00:35 +00:00
|
|
|
public:
|
2009-09-12 16:49:24 +00:00
|
|
|
NS_DECL_QUERYFRAME_TARGET(nsIStatefulFrame)
|
1999-08-30 22:38:58 +00:00
|
|
|
|
2018-03-02 18:18:35 +00:00
|
|
|
// Save the state for this frame.
|
|
|
|
virtual mozilla::UniquePtr<mozilla::PresState> SaveState() = 0;
|
2005-12-06 23:56:17 +00:00
|
|
|
|
|
|
|
// Restore the state for this frame from aState
|
2018-03-02 18:18:35 +00:00
|
|
|
NS_IMETHOD RestoreState(mozilla::PresState* aState) = 0;
|
2016-03-10 15:14:37 +00:00
|
|
|
|
|
|
|
// Generate a key for this stateful frame
|
|
|
|
NS_IMETHOD GenerateStateKey(nsIContent* aContent,
|
|
|
|
nsIDocument* aDocument,
|
|
|
|
nsACString& aKey)
|
|
|
|
{
|
|
|
|
return nsContentUtils::GenerateStateKey(aContent, aDocument, aKey);
|
|
|
|
};
|
1999-08-30 22:38:58 +00:00
|
|
|
};
|
|
|
|
|
1999-08-31 04:20:22 +00:00
|
|
|
#endif /* _nsIStatefulFrame_h */
|