|
1 /* -*- Mode: C++; tab-width: 3; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
|
2 * |
|
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 #ifndef nsSHEntry_h |
|
8 #define nsSHEntry_h |
|
9 |
|
10 // Helper Classes |
|
11 #include "nsCOMPtr.h" |
|
12 #include "nsAutoPtr.h" |
|
13 #include "nsCOMArray.h" |
|
14 #include "nsString.h" |
|
15 #include "mozilla/Attributes.h" |
|
16 |
|
17 // Interfaces needed |
|
18 #include "nsISHEntry.h" |
|
19 #include "nsISHContainer.h" |
|
20 |
|
21 class nsSHEntryShared; |
|
22 class nsIInputStream; |
|
23 class nsIURI; |
|
24 |
|
25 class nsSHEntry MOZ_FINAL : public nsISHEntry, |
|
26 public nsISHContainer, |
|
27 public nsISHEntryInternal |
|
28 { |
|
29 public: |
|
30 nsSHEntry(); |
|
31 nsSHEntry(const nsSHEntry &other); |
|
32 |
|
33 NS_DECL_ISUPPORTS |
|
34 NS_DECL_NSISHENTRY |
|
35 NS_DECL_NSISHENTRYINTERNAL |
|
36 NS_DECL_NSISHCONTAINER |
|
37 |
|
38 void DropPresentationState(); |
|
39 |
|
40 static nsresult Startup(); |
|
41 static void Shutdown(); |
|
42 |
|
43 private: |
|
44 ~nsSHEntry(); |
|
45 |
|
46 // We share the state in here with other SHEntries which correspond to the |
|
47 // same document. |
|
48 nsRefPtr<nsSHEntryShared> mShared; |
|
49 |
|
50 // See nsSHEntry.idl for comments on these members. |
|
51 nsCOMPtr<nsIURI> mURI; |
|
52 nsCOMPtr<nsIURI> mReferrerURI; |
|
53 nsString mTitle; |
|
54 nsCOMPtr<nsIInputStream> mPostData; |
|
55 uint32_t mLoadType; |
|
56 uint32_t mID; |
|
57 int32_t mScrollPositionX; |
|
58 int32_t mScrollPositionY; |
|
59 nsISHEntry* mParent; |
|
60 nsCOMArray<nsISHEntry> mChildren; |
|
61 bool mURIWasModified; |
|
62 nsCOMPtr<nsIStructuredCloneContainer> mStateData; |
|
63 bool mIsSrcdocEntry; |
|
64 nsString mSrcdocData; |
|
65 nsCOMPtr<nsIURI> mBaseURI; |
|
66 }; |
|
67 |
|
68 #endif /* nsSHEntry_h */ |