Bug 1891710: part 2) Enable <Element-outerHTML.html> WPT for Trusted Types. r=smaug
[gecko.git] / docshell / shistory / nsSHEntry.h
blob1a018575bd100259fb923b45da7c693eb867bf44
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/. */
7 #ifndef nsSHEntry_h
8 #define nsSHEntry_h
10 #include "nsCOMArray.h"
11 #include "nsCOMPtr.h"
12 #include "nsISHEntry.h"
13 #include "nsString.h"
14 #include "nsWeakReference.h"
15 #include "mozilla/Attributes.h"
17 class nsSHEntryShared;
18 class nsIInputStream;
19 class nsIURI;
20 class nsIReferrerInfo;
22 class nsSHEntry : public nsISHEntry, public nsSupportsWeakReference {
23 public:
24 nsSHEntry();
26 NS_DECL_ISUPPORTS
27 NS_DECL_NSISHENTRY
29 virtual void EvictDocumentViewer();
31 static nsresult Startup();
32 static void Shutdown();
34 nsSHEntryShared* GetState() { return mShared; }
36 protected:
37 explicit nsSHEntry(const nsSHEntry& aOther);
38 virtual ~nsSHEntry();
40 // We share the state in here with other SHEntries which correspond to the
41 // same document.
42 RefPtr<nsSHEntryShared> mShared;
44 // See nsSHEntry.idl for comments on these members.
45 nsCOMPtr<nsIURI> mURI;
46 nsCOMPtr<nsIURI> mOriginalURI;
47 nsCOMPtr<nsIURI> mResultPrincipalURI;
48 nsCOMPtr<nsIURI> mUnstrippedURI;
49 nsCOMPtr<nsIReferrerInfo> mReferrerInfo;
50 nsString mTitle;
51 nsString mName;
52 nsCOMPtr<nsIInputStream> mPostData;
53 uint32_t mLoadType;
54 uint32_t mID;
55 int32_t mScrollPositionX;
56 int32_t mScrollPositionY;
57 nsWeakPtr mParent;
58 nsCOMArray<nsISHEntry> mChildren;
59 nsCOMPtr<nsIStructuredCloneContainer> mStateData;
60 nsString mSrcdocData;
61 nsCOMPtr<nsIURI> mBaseURI;
62 bool mLoadReplace;
63 bool mURIWasModified;
64 bool mIsSrcdocEntry;
65 bool mScrollRestorationIsManual;
66 bool mLoadedInThisProcess;
67 bool mPersist;
68 bool mHasUserInteraction;
69 bool mHasUserActivation;
72 #endif /* nsSHEntry_h */