2014-06-11 05:44:13 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2015-05-03 19:32:37 +00:00
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2014-06-11 05:44:13 +00: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 16:28:04 +00:00
|
|
|
class ContentBridgeChild final : public PContentBridgeChild
|
2015-03-27 18:52:19 +00:00
|
|
|
, public nsIContentChild
|
2014-06-11 05:44:13 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-09-02 00:49:25 +00:00
|
|
|
explicit ContentBridgeChild(Transport* aTransport);
|
2014-06-11 05:44:13 +00:00
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
static ContentBridgeChild*
|
|
|
|
Create(Transport* aTransport, ProcessId aOtherProcess);
|
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual void ActorDestroy(ActorDestroyReason aWhy) override;
|
2014-06-11 05:44:13 +00:00
|
|
|
void DeferredDestroy();
|
|
|
|
|
|
|
|
virtual bool RecvAsyncMessage(const nsString& aMsg,
|
2015-01-16 19:58:52 +00:00
|
|
|
InfallibleTArray<jsipc::CpowEntry>&& aCpows,
|
2016-04-09 13:50:59 +00:00
|
|
|
const IPC::Principal& aPrincipal,
|
|
|
|
const ClonedMessageData& aData) override;
|
2014-06-11 05:44:13 +00:00
|
|
|
|
|
|
|
virtual PBlobChild*
|
|
|
|
SendPBlobConstructor(PBlobChild* actor,
|
2015-03-21 16:28:04 +00:00
|
|
|
const BlobConstructorParams& aParams) override;
|
2014-06-11 05:44:13 +00:00
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
jsipc::CPOWManager* GetCPOWManager() override;
|
2014-06-11 05:44:13 +00:00
|
|
|
|
|
|
|
virtual bool SendPBrowserConstructor(PBrowserChild* aActor,
|
2014-10-29 18:11:00 +00:00
|
|
|
const TabId& aTabId,
|
2014-06-11 05:44:13 +00:00
|
|
|
const IPCTabContext& aContext,
|
|
|
|
const uint32_t& aChromeFlags,
|
2014-10-24 00:28:00 +00:00
|
|
|
const ContentParentId& aCpID,
|
2014-06-11 05:44:13 +00:00
|
|
|
const bool& aIsForApp,
|
2015-03-21 16:28:04 +00:00
|
|
|
const bool& aIsForBrowser) override;
|
2014-06-11 05:44:13 +00:00
|
|
|
|
2016-06-15 16:57:46 +00:00
|
|
|
FORWARD_SHMEM_ALLOCATOR_TO(PContentBridgeChild)
|
|
|
|
|
2014-06-11 05:44:13 +00:00
|
|
|
protected:
|
2014-06-23 19:56:07 +00:00
|
|
|
virtual ~ContentBridgeChild();
|
|
|
|
|
2014-10-29 18:11:00 +00:00
|
|
|
virtual PBrowserChild* AllocPBrowserChild(const TabId& aTabId,
|
|
|
|
const IPCTabContext& aContext,
|
2014-06-11 05:44:13 +00:00
|
|
|
const uint32_t& aChromeFlags,
|
2014-10-24 00:28:00 +00:00
|
|
|
const ContentParentId& aCpID,
|
2014-06-11 05:44:13 +00:00
|
|
|
const bool& aIsForApp,
|
2015-03-21 16:28:04 +00:00
|
|
|
const bool& aIsForBrowser) override;
|
|
|
|
virtual bool DeallocPBrowserChild(PBrowserChild*) override;
|
2014-06-11 05:44:13 +00:00
|
|
|
virtual bool RecvPBrowserConstructor(PBrowserChild* aCctor,
|
2014-10-29 18:11:00 +00:00
|
|
|
const TabId& aTabId,
|
2014-06-11 05:44:13 +00:00
|
|
|
const IPCTabContext& aContext,
|
|
|
|
const uint32_t& aChromeFlags,
|
2014-10-24 00:28:00 +00:00
|
|
|
const ContentParentId& aCpID,
|
2014-06-11 05:44:13 +00:00
|
|
|
const bool& aIsForApp,
|
2015-03-21 16:28:04 +00:00
|
|
|
const bool& aIsForBrowser) override;
|
2014-06-11 05:44:13 +00:00
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual mozilla::jsipc::PJavaScriptChild* AllocPJavaScriptChild() override;
|
|
|
|
virtual bool DeallocPJavaScriptChild(mozilla::jsipc::PJavaScriptChild*) override;
|
2014-06-11 05:44:13 +00:00
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual PBlobChild* AllocPBlobChild(const BlobConstructorParams& aParams) override;
|
|
|
|
virtual bool DeallocPBlobChild(PBlobChild*) override;
|
2014-06-11 05:44:13 +00:00
|
|
|
|
|
|
|
DISALLOW_EVIL_CONSTRUCTORS(ContentBridgeChild);
|
|
|
|
|
|
|
|
protected: // members
|
2015-10-18 05:24:48 +00:00
|
|
|
RefPtr<ContentBridgeChild> mSelfRef;
|
2014-06-11 05:44:13 +00:00
|
|
|
Transport* mTransport; // owned
|
|
|
|
};
|
|
|
|
|
2015-07-13 15:25:42 +00:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
2014-06-11 05:44:13 +00:00
|
|
|
|
|
|
|
#endif // mozilla_dom_ContentBridgeChild_h
|