GeckoViewContentChannelParent.h (1664B)
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=4 sw=2 sts=2 et tw=80: */ 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 mozilla__net__GeckoViewContentChannelParent_h 8 #define mozilla__net__GeckoViewContentChannelParent_h 9 10 #include "nsIInterfaceRequestor.h" 11 #include "nsIParentChannel.h" 12 #include "nsISupportsImpl.h" 13 14 #include "mozilla/dom/BrowserParent.h" 15 #include "mozilla/net/NeckoParent.h" 16 #include "mozilla/net/PGeckoViewContentChannelParent.h" 17 18 namespace mozilla::net { 19 20 class GeckoViewContentChannelParent final 21 : public nsIParentChannel, 22 public nsIInterfaceRequestor, 23 public PGeckoViewContentChannelParent { 24 public: 25 NS_DECL_ISUPPORTS 26 NS_DECL_NSIPARENTCHANNEL 27 NS_DECL_NSIREQUESTOBSERVER 28 NS_DECL_NSISTREAMLISTENER 29 NS_DECL_NSIINTERFACEREQUESTOR 30 31 GeckoViewContentChannelParent(dom::BrowserParent* aIframeEmbedding, 32 nsILoadContext* aLoadContext); 33 34 bool Init(const GeckoViewContentChannelArgs& aArgs); 35 36 mozilla::ipc::IPCResult RecvCancel(const nsresult& aStatus); 37 mozilla::ipc::IPCResult RecvSuspend(); 38 mozilla::ipc::IPCResult RecvResume(); 39 40 private: 41 ~GeckoViewContentChannelParent() = default; 42 43 bool Init(const GeckoViewContentChannelOpenArgs& aArgs); 44 bool Init(const GeckoViewContentChannelConnectArgs& aArgs); 45 46 nsCOMPtr<nsIChannel> mChannel; 47 nsCOMPtr<nsILoadContext> mLoadContext; 48 RefPtr<dom::BrowserParent> mBrowserParent; 49 }; 50 51 } // namespace mozilla::net 52 #endif