Bug 1892041 - Part 1: Update test262 features. r=spidermonkey-reviewers,dminor
[gecko.git] / dom / webbrowserpersist / WebBrowserPersistSerializeParent.h
blob56bd789c5508dda9bc5fdb218af6f950c131959a
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 WebBrowserPersistSerializeParent_h__
8 #define WebBrowserPersistSerializeParent_h__
10 #include "mozilla/PWebBrowserPersistSerializeParent.h"
12 #include "nsCOMPtr.h"
13 #include "nsIOutputStream.h"
14 #include "nsIWebBrowserPersistDocument.h"
16 namespace mozilla {
18 class WebBrowserPersistSerializeParent
19 : public PWebBrowserPersistSerializeParent {
20 public:
21 WebBrowserPersistSerializeParent(
22 nsIWebBrowserPersistDocument* aDocument, nsIOutputStream* aStream,
23 nsIWebBrowserPersistWriteCompletion* aFinish);
24 virtual ~WebBrowserPersistSerializeParent();
26 virtual mozilla::ipc::IPCResult RecvWriteData(
27 nsTArray<uint8_t>&& aData) override;
29 virtual mozilla::ipc::IPCResult Recv__delete__(
30 const nsACString& aContentType, const nsresult& aStatus) override;
32 virtual void ActorDestroy(ActorDestroyReason aWhy) override;
34 private:
35 // See also ...ReadParent::mDocument for the other reason this
36 // strong reference needs to be here.
37 nsCOMPtr<nsIWebBrowserPersistDocument> mDocument;
38 nsCOMPtr<nsIOutputStream> mStream;
39 nsCOMPtr<nsIWebBrowserPersistWriteCompletion> mFinish;
40 nsresult mOutputError;
43 } // namespace mozilla
45 #endif // WebBrowserPersistSerializeParent_h__