1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 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/. */
7 #ifndef WebBrowserPersistDocumentChild_h__
8 #define WebBrowserPersistDocumentChild_h__
10 #include "mozilla/PWebBrowserPersistDocumentChild.h"
12 #include "nsIWebBrowserPersistDocument.h"
16 class WebBrowserPersistDocumentChild final
17 : public PWebBrowserPersistDocumentChild
{
19 NS_INLINE_DECL_REFCOUNTING(WebBrowserPersistDocumentChild
, override
)
21 WebBrowserPersistDocumentChild();
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
);
28 mozilla::ipc::IPCResult
RecvSetPersistFlags(const uint32_t& aNewFlags
);
30 PWebBrowserPersistResourcesChild
* AllocPWebBrowserPersistResourcesChild();
31 virtual mozilla::ipc::IPCResult
RecvPWebBrowserPersistResourcesConstructor(
32 PWebBrowserPersistResourcesChild
* aActor
) override
;
33 bool DeallocPWebBrowserPersistResourcesChild(
34 PWebBrowserPersistResourcesChild
* aActor
);
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
);
49 ~WebBrowserPersistDocumentChild();
51 nsCOMPtr
<nsIWebBrowserPersistDocument
> mDocument
;
54 } // namespace mozilla
56 #endif // WebBrowserPersistDocumentChild_h__