nsSHEntry.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #ifndef nsSHEntry_h
  6. #define nsSHEntry_h
  7. // Helper Classes
  8. #include "nsCOMPtr.h"
  9. #include "nsCOMArray.h"
  10. #include "nsString.h"
  11. #include "mozilla/Attributes.h"
  12. // Interfaces needed
  13. #include "nsISHEntry.h"
  14. #include "nsISHContainer.h"
  15. class nsSHEntryShared;
  16. class nsIInputStream;
  17. class nsIURI;
  18. class nsSHEntry final : public nsISHEntry,
  19. public nsISHContainer,
  20. public nsISHEntryInternal
  21. {
  22. public:
  23. nsSHEntry();
  24. nsSHEntry(const nsSHEntry& aOther);
  25. NS_DECL_ISUPPORTS
  26. NS_DECL_NSISHENTRY
  27. NS_DECL_NSISHENTRYINTERNAL
  28. NS_DECL_NSISHCONTAINER
  29. void DropPresentationState();
  30. static nsresult Startup();
  31. static void Shutdown();
  32. private:
  33. ~nsSHEntry();
  34. // We share the state in here with other SHEntries which correspond to the
  35. // same document.
  36. RefPtr<nsSHEntryShared> mShared;
  37. // See nsSHEntry.idl for comments on these members.
  38. nsCOMPtr<nsIURI> mURI;
  39. nsCOMPtr<nsIURI> mOriginalURI;
  40. bool mLoadReplace;
  41. nsCOMPtr<nsIURI> mReferrerURI;
  42. uint32_t mReferrerPolicy;
  43. nsString mTitle;
  44. nsCOMPtr<nsIInputStream> mPostData;
  45. uint32_t mLoadType;
  46. uint32_t mID;
  47. int32_t mScrollPositionX;
  48. int32_t mScrollPositionY;
  49. nsISHEntry* mParent;
  50. nsCOMArray<nsISHEntry> mChildren;
  51. bool mURIWasModified;
  52. nsCOMPtr<nsIStructuredCloneContainer> mStateData;
  53. bool mIsSrcdocEntry;
  54. bool mScrollRestorationIsManual;
  55. nsString mSrcdocData;
  56. nsCOMPtr<nsIURI> mBaseURI;
  57. };
  58. #endif /* nsSHEntry_h */