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 WebBrowserPersistRemoteDocument_h__
8 #define WebBrowserPersistRemoteDocument_h__
10 #include "mozilla/Maybe.h"
11 #include "mozilla/PWebBrowserPersistDocumentParent.h"
13 #include "nsIWebBrowserPersistDocument.h"
14 #include "nsIInputStream.h"
18 // This class is the XPCOM half of the glue between the
19 // nsIWebBrowserPersistDocument interface and a remote document; it is
20 // created by WebBrowserPersistDocumentParent when (and if) it
21 // receives the information needed to populate the interface's
24 // This object has a normal refcounted lifetime. The corresponding
25 // IPC actor holds a weak reference to this class; when the last
26 // strong reference is released, it sends an IPC delete message and
27 // thereby removes that reference.
31 class WebBrowserPersistDocumentParent
;
33 class WebBrowserPersistRemoteDocument final
34 : public nsIWebBrowserPersistDocument
{
37 NS_DECL_NSIWEBBROWSERPERSISTDOCUMENT
40 using Attrs
= WebBrowserPersistDocumentAttrs
;
41 WebBrowserPersistDocumentParent
* mActor
;
43 nsCOMPtr
<nsISHEntry
> mSHEntry
;
44 nsCOMPtr
<nsICookieJarSettings
> mCookieJarSettings
;
45 nsCOMPtr
<nsIInputStream
> mPostData
;
46 nsCOMPtr
<nsIPrincipal
> mPrincipal
;
48 friend class WebBrowserPersistDocumentParent
;
49 WebBrowserPersistRemoteDocument(WebBrowserPersistDocumentParent
* aActor
,
51 nsIInputStream
* aPostData
);
52 ~WebBrowserPersistRemoteDocument();
54 void ActorDestroy(void);
57 } // namespace mozilla
59 #endif // WebBrowserPersistRemoteDocument_h__