2014-06-11 09:44:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2015-05-03 22:32:37 +03:00
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2014-06-11 09:44:13 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_dom_ContentBridgeChild_h
|
|
|
|
#define mozilla_dom_ContentBridgeChild_h
|
|
|
|
|
|
|
|
#include "mozilla/dom/PContentBridgeChild.h"
|
|
|
|
#include "mozilla/dom/nsIContentChild.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class ContentBridgeChild final : public PContentBridgeChild
|
2015-03-27 21:52:19 +03:00
|
|
|
, public nsIContentChild
|
2014-06-11 09:44:13 +04:00
|
|
|
{
|
|
|
|
public:
|
2017-01-27 02:05:36 +03:00
|
|
|
explicit ContentBridgeChild();
|
2014-06-11 09:44:13 +04:00
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
2017-01-27 01:40:17 +03:00
|
|
|
static void
|
|
|
|
Create(Endpoint<PContentBridgeChild>&& aEndpoint);
|
2014-06-11 09:44:13 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void ActorDestroy(ActorDestroyReason aWhy) override;
|
2014-06-11 09:44:13 +04:00
|
|
|
void DeferredDestroy();
|
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvAsyncMessage(const nsString& aMsg,
|
|
|
|
InfallibleTArray<jsipc::CpowEntry>&& aCpows,
|
|
|
|
const IPC::Principal& aPrincipal,
|
|
|
|
const ClonedMessageData& aData) override;
|
2014-06-11 09:44:13 +04:00
|
|
|
|
|
|
|
virtual PBlobChild*
|
|
|
|
SendPBlobConstructor(PBlobChild* actor,
|
2015-03-21 19:28:04 +03:00
|
|
|
const BlobConstructorParams& aParams) override;
|
2014-06-11 09:44:13 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
jsipc::CPOWManager* GetCPOWManager() override;
|
2014-06-11 09:44:13 +04:00
|
|
|
|
|
|
|
virtual bool SendPBrowserConstructor(PBrowserChild* aActor,
|
2014-10-29 21:11:00 +03:00
|
|
|
const TabId& aTabId,
|
2014-06-11 09:44:13 +04:00
|
|
|
const IPCTabContext& aContext,
|
|
|
|
const uint32_t& aChromeFlags,
|
2014-10-24 04:28:00 +04:00
|
|
|
const ContentParentId& aCpID,
|
2015-03-21 19:28:04 +03:00
|
|
|
const bool& aIsForBrowser) override;
|
2014-06-11 09:44:13 +04:00
|
|
|
|
2016-09-21 13:27:26 +03:00
|
|
|
virtual mozilla::ipc::PFileDescriptorSetChild*
|
|
|
|
SendPFileDescriptorSetConstructor(const mozilla::ipc::FileDescriptor&) override;
|
|
|
|
|
2017-03-14 14:28:58 +03:00
|
|
|
virtual mozilla::ipc::PChildToParentStreamChild*
|
|
|
|
SendPChildToParentStreamConstructor(mozilla::ipc::PChildToParentStreamChild*) override;
|
2016-09-21 13:27:26 +03:00
|
|
|
|
2016-06-15 19:57:46 +03:00
|
|
|
FORWARD_SHMEM_ALLOCATOR_TO(PContentBridgeChild)
|
|
|
|
|
2014-06-11 09:44:13 +04:00
|
|
|
protected:
|
2014-06-23 23:56:07 +04:00
|
|
|
virtual ~ContentBridgeChild();
|
|
|
|
|
2014-10-29 21:11:00 +03:00
|
|
|
virtual PBrowserChild* AllocPBrowserChild(const TabId& aTabId,
|
|
|
|
const IPCTabContext& aContext,
|
2014-06-11 09:44:13 +04:00
|
|
|
const uint32_t& aChromeFlags,
|
2014-10-24 04:28:00 +04:00
|
|
|
const ContentParentId& aCpID,
|
2015-03-21 19:28:04 +03:00
|
|
|
const bool& aIsForBrowser) override;
|
|
|
|
virtual bool DeallocPBrowserChild(PBrowserChild*) override;
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvPBrowserConstructor(PBrowserChild* aCctor,
|
|
|
|
const TabId& aTabId,
|
|
|
|
const IPCTabContext& aContext,
|
|
|
|
const uint32_t& aChromeFlags,
|
|
|
|
const ContentParentId& aCpID,
|
|
|
|
const bool& aIsForBrowser) override;
|
2014-06-11 09:44:13 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual mozilla::jsipc::PJavaScriptChild* AllocPJavaScriptChild() override;
|
|
|
|
virtual bool DeallocPJavaScriptChild(mozilla::jsipc::PJavaScriptChild*) override;
|
2014-06-11 09:44:13 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual PBlobChild* AllocPBlobChild(const BlobConstructorParams& aParams) override;
|
|
|
|
virtual bool DeallocPBlobChild(PBlobChild*) override;
|
2014-06-11 09:44:13 +04:00
|
|
|
|
2017-03-14 14:28:58 +03:00
|
|
|
virtual mozilla::ipc::PChildToParentStreamChild*
|
|
|
|
AllocPChildToParentStreamChild() override;
|
2016-09-21 13:27:26 +03:00
|
|
|
|
|
|
|
virtual bool
|
2017-03-14 14:28:58 +03:00
|
|
|
DeallocPChildToParentStreamChild(mozilla::ipc::PChildToParentStreamChild* aActor) override;
|
2016-09-21 13:27:26 +03:00
|
|
|
|
2017-03-14 14:29:43 +03:00
|
|
|
virtual PParentToChildStreamChild* AllocPParentToChildStreamChild() override;
|
|
|
|
|
|
|
|
virtual bool
|
|
|
|
DeallocPParentToChildStreamChild(PParentToChildStreamChild* aActor) override;
|
|
|
|
|
2016-09-21 13:27:26 +03:00
|
|
|
virtual PFileDescriptorSetChild*
|
|
|
|
AllocPFileDescriptorSetChild(const mozilla::ipc::FileDescriptor& aFD) override;
|
|
|
|
|
|
|
|
virtual bool
|
|
|
|
DeallocPFileDescriptorSetChild(mozilla::ipc::PFileDescriptorSetChild* aActor) override;
|
|
|
|
|
2014-06-11 09:44:13 +04:00
|
|
|
DISALLOW_EVIL_CONSTRUCTORS(ContentBridgeChild);
|
|
|
|
|
|
|
|
protected: // members
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<ContentBridgeChild> mSelfRef;
|
2014-06-11 09:44:13 +04:00
|
|
|
};
|
|
|
|
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
2014-06-11 09:44:13 +04:00
|
|
|
|
|
|
|
#endif // mozilla_dom_ContentBridgeChild_h
|