1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 et sw=2 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 file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_ContentBridgeChild_h
8 #define mozilla_dom_ContentBridgeChild_h
10 #include "mozilla/dom/PContentBridgeChild.h"
11 #include "mozilla/dom/nsIContentChild.h"
16 class ContentBridgeChild MOZ_FINAL
: public PContentBridgeChild
17 , public nsIContentChild
20 explicit ContentBridgeChild(Transport
* aTransport
);
24 static ContentBridgeChild
*
25 Create(Transport
* aTransport
, ProcessId aOtherProcess
);
27 virtual void ActorDestroy(ActorDestroyReason aWhy
) MOZ_OVERRIDE
;
28 void DeferredDestroy();
30 virtual bool RecvAsyncMessage(const nsString
& aMsg
,
31 const ClonedMessageData
& aData
,
32 const InfallibleTArray
<jsipc::CpowEntry
>& aCpows
,
33 const IPC::Principal
& aPrincipal
) MOZ_OVERRIDE
;
36 SendPBlobConstructor(PBlobChild
* actor
,
37 const BlobConstructorParams
& params
);
39 jsipc::JavaScriptChild
* GetCPOWManager();
41 virtual bool SendPBrowserConstructor(PBrowserChild
* aActor
,
42 const IPCTabContext
& aContext
,
43 const uint32_t& aChromeFlags
,
45 const bool& aIsForApp
,
46 const bool& aIsForBrowser
) MOZ_OVERRIDE
;
49 virtual ~ContentBridgeChild();
51 virtual PBrowserChild
* AllocPBrowserChild(const IPCTabContext
& aContext
,
52 const uint32_t& aChromeFlags
,
54 const bool& aIsForApp
,
55 const bool& aIsForBrowser
) MOZ_OVERRIDE
;
56 virtual bool DeallocPBrowserChild(PBrowserChild
*) MOZ_OVERRIDE
;
57 virtual bool RecvPBrowserConstructor(PBrowserChild
* aCctor
,
58 const IPCTabContext
& aContext
,
59 const uint32_t& aChromeFlags
,
61 const bool& aIsForApp
,
62 const bool& aIsForBrowser
) MOZ_OVERRIDE
;
64 virtual mozilla::jsipc::PJavaScriptChild
* AllocPJavaScriptChild() MOZ_OVERRIDE
;
65 virtual bool DeallocPJavaScriptChild(mozilla::jsipc::PJavaScriptChild
*) MOZ_OVERRIDE
;
67 virtual PBlobChild
* AllocPBlobChild(const BlobConstructorParams
& aParams
) MOZ_OVERRIDE
;
68 virtual bool DeallocPBlobChild(PBlobChild
*) MOZ_OVERRIDE
;
70 DISALLOW_EVIL_CONSTRUCTORS(ContentBridgeChild
);
73 nsRefPtr
<ContentBridgeChild
> mSelfRef
;
74 Transport
* mTransport
; // owned
80 #endif // mozilla_dom_ContentBridgeChild_h