tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

WebBrowserPersistRemoteDocument.h (1930B)


      1 /* -*- Mode: C++; tab-width: 4; 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 WebBrowserPersistRemoteDocument_h__
      8 #define WebBrowserPersistRemoteDocument_h__
      9 
     10 #include "mozilla/PWebBrowserPersistDocumentParent.h"
     11 #include "nsCOMPtr.h"
     12 #include "nsIInputStream.h"
     13 #include "nsIWebBrowserPersistDocument.h"
     14 
     15 class nsIPrincipal;
     16 
     17 // This class is the XPCOM half of the glue between the
     18 // nsIWebBrowserPersistDocument interface and a remote document; it is
     19 // created by WebBrowserPersistDocumentParent when (and if) it
     20 // receives the information needed to populate the interface's
     21 // properties.
     22 //
     23 // This object has a normal refcounted lifetime.  The corresponding
     24 // IPC actor holds a weak reference to this class; when the last
     25 // strong reference is released, it sends an IPC delete message and
     26 // thereby removes that reference.
     27 
     28 namespace mozilla {
     29 
     30 class WebBrowserPersistDocumentParent;
     31 
     32 class WebBrowserPersistRemoteDocument final
     33    : public nsIWebBrowserPersistDocument {
     34 public:
     35  NS_DECL_ISUPPORTS
     36  NS_DECL_NSIWEBBROWSERPERSISTDOCUMENT
     37 
     38 private:
     39  using Attrs = WebBrowserPersistDocumentAttrs;
     40  WebBrowserPersistDocumentParent* mActor;
     41  Attrs mAttrs;
     42  nsCOMPtr<nsISHEntry> mSHEntry;
     43  nsCOMPtr<nsICookieJarSettings> mCookieJarSettings;
     44  nsCOMPtr<nsIInputStream> mPostData;
     45  nsCOMPtr<nsIPrincipal> mPrincipal;
     46 
     47  friend class WebBrowserPersistDocumentParent;
     48  WebBrowserPersistRemoteDocument(WebBrowserPersistDocumentParent* aActor,
     49                                  const Attrs& aAttrs,
     50                                  nsIInputStream* aPostData);
     51  ~WebBrowserPersistRemoteDocument();
     52 
     53  void ActorDestroy(void);
     54 };
     55 
     56 }  // namespace mozilla
     57 
     58 #endif  // WebBrowserPersistRemoteDocument_h__