tor-browser

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

WebBrowserPersistDocumentChild.h (2108B)


      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 WebBrowserPersistDocumentChild_h__
      8 #define WebBrowserPersistDocumentChild_h__
      9 
     10 #include "mozilla/PWebBrowserPersistDocumentChild.h"
     11 #include "nsCOMPtr.h"
     12 #include "nsIWebBrowserPersistDocument.h"
     13 
     14 namespace mozilla {
     15 
     16 class WebBrowserPersistDocumentChild final
     17    : public PWebBrowserPersistDocumentChild {
     18 public:
     19  NS_INLINE_DECL_REFCOUNTING(WebBrowserPersistDocumentChild, override)
     20 
     21  WebBrowserPersistDocumentChild();
     22 
     23  // This sends either Attributes or InitFailure and thereby causes
     24  // the actor to leave the START state.
     25  void Start(nsIWebBrowserPersistDocument* aDocument);
     26  void Start(dom::Document* aDocument);
     27 
     28  mozilla::ipc::IPCResult RecvSetPersistFlags(const uint32_t& aNewFlags);
     29 
     30  PWebBrowserPersistResourcesChild* AllocPWebBrowserPersistResourcesChild();
     31  virtual mozilla::ipc::IPCResult RecvPWebBrowserPersistResourcesConstructor(
     32      PWebBrowserPersistResourcesChild* aActor) override;
     33  bool DeallocPWebBrowserPersistResourcesChild(
     34      PWebBrowserPersistResourcesChild* aActor);
     35 
     36  PWebBrowserPersistSerializeChild* AllocPWebBrowserPersistSerializeChild(
     37      const WebBrowserPersistURIMap& aMap,
     38      const nsACString& aRequestedContentType, const uint32_t& aEncoderFlags,
     39      const uint32_t& aWrapColumn);
     40  virtual mozilla::ipc::IPCResult RecvPWebBrowserPersistSerializeConstructor(
     41      PWebBrowserPersistSerializeChild* aActor,
     42      const WebBrowserPersistURIMap& aMap,
     43      const nsACString& aRequestedContentType, const uint32_t& aEncoderFlags,
     44      const uint32_t& aWrapColumn) override;
     45  bool DeallocPWebBrowserPersistSerializeChild(
     46      PWebBrowserPersistSerializeChild* aActor);
     47 
     48 private:
     49  ~WebBrowserPersistDocumentChild();
     50 
     51  nsCOMPtr<nsIWebBrowserPersistDocument> mDocument;
     52 };
     53 
     54 }  // namespace mozilla
     55 
     56 #endif  // WebBrowserPersistDocumentChild_h__