mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1073597, part 2 - Factor out common base class for GetCPOWManager. r=smaug
This commit is contained in:
parent
4397abb1f4
commit
fca17681ea
26
dom/ipc/CPOWManagerGetter.h
Normal file
26
dom/ipc/CPOWManagerGetter.h
Normal file
@ -0,0 +1,26 @@
|
||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=2 et sw=2 tw=80: */
|
||||
/* 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_CPOWManagerGetter_h
|
||||
#define mozilla_dom_CPOWManagerGetter_h
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
namespace jsipc {
|
||||
class JavaScriptShared;
|
||||
} /* namespace jsipc */
|
||||
|
||||
namespace dom {
|
||||
class CPOWManagerGetter
|
||||
{
|
||||
public:
|
||||
virtual mozilla::jsipc::JavaScriptShared* GetCPOWManager() = 0;
|
||||
};
|
||||
} /* namespace dom */
|
||||
|
||||
} /* namespace mozilla */
|
||||
|
||||
#endif /* mozilla_dom_CPOWManagerGetter_h */
|
@ -98,7 +98,7 @@ ContentBridgeChild::SendPBrowserConstructor(PBrowserChild* aActor,
|
||||
// This implementation is identical to ContentChild::GetCPOWManager but we can't
|
||||
// move it to nsIContentChild because it calls ManagedPJavaScriptChild() which
|
||||
// only exists in PContentChild and PContentBridgeChild.
|
||||
jsipc::JavaScriptChild *
|
||||
jsipc::JavaScriptShared*
|
||||
ContentBridgeChild::GetCPOWManager()
|
||||
{
|
||||
if (ManagedPJavaScriptChild().Length()) {
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
SendPBlobConstructor(PBlobChild* actor,
|
||||
const BlobConstructorParams& params);
|
||||
|
||||
jsipc::JavaScriptChild* GetCPOWManager();
|
||||
jsipc::JavaScriptShared* GetCPOWManager() MOZ_OVERRIDE;
|
||||
|
||||
virtual bool SendPBrowserConstructor(PBrowserChild* aActor,
|
||||
const IPCTabContext& aContext,
|
||||
|
@ -148,7 +148,7 @@ ContentBridgeParent::DeallocPBrowserParent(PBrowserParent* aParent)
|
||||
// This implementation is identical to ContentParent::GetCPOWManager but we can't
|
||||
// move it to nsIContentParent because it calls ManagedPJavaScriptParent() which
|
||||
// only exists in PContentParent and PContentBridgeParent.
|
||||
jsipc::JavaScriptParent*
|
||||
jsipc::JavaScriptShared*
|
||||
ContentBridgeParent::GetCPOWManager()
|
||||
{
|
||||
if (ManagedPJavaScriptParent().Length()) {
|
||||
|
@ -39,7 +39,7 @@ public:
|
||||
const bool& aIsForApp,
|
||||
const bool& aIsForBrowser) MOZ_OVERRIDE;
|
||||
|
||||
jsipc::JavaScriptParent* GetCPOWManager();
|
||||
jsipc::JavaScriptShared* GetCPOWManager() MOZ_OVERRIDE;
|
||||
|
||||
virtual uint64_t ChildID() MOZ_OVERRIDE
|
||||
{
|
||||
|
@ -1246,7 +1246,7 @@ ContentChild::DeallocPTestShellChild(PTestShellChild* shell)
|
||||
return true;
|
||||
}
|
||||
|
||||
jsipc::JavaScriptChild *
|
||||
jsipc::JavaScriptShared*
|
||||
ContentChild::GetCPOWManager()
|
||||
{
|
||||
if (ManagedPJavaScriptChild().Length()) {
|
||||
|
@ -34,7 +34,7 @@ class URIParams;
|
||||
}// namespace ipc
|
||||
|
||||
namespace jsipc {
|
||||
class JavaScriptChild;
|
||||
class JavaScriptShared;
|
||||
}
|
||||
|
||||
namespace layers {
|
||||
@ -194,7 +194,7 @@ public:
|
||||
virtual PTestShellChild* AllocPTestShellChild() MOZ_OVERRIDE;
|
||||
virtual bool DeallocPTestShellChild(PTestShellChild*) MOZ_OVERRIDE;
|
||||
virtual bool RecvPTestShellConstructor(PTestShellChild*) MOZ_OVERRIDE;
|
||||
jsipc::JavaScriptChild *GetCPOWManager();
|
||||
jsipc::JavaScriptShared* GetCPOWManager() MOZ_OVERRIDE;
|
||||
|
||||
PMobileConnectionChild*
|
||||
SendPMobileConnectionConstructor(PMobileConnectionChild* aActor,
|
||||
|
@ -1777,7 +1777,7 @@ ContentParent::NotifyTabDestroyed(PBrowserParent* aTab,
|
||||
}
|
||||
}
|
||||
|
||||
jsipc::JavaScriptParent*
|
||||
jsipc::JavaScriptShared*
|
||||
ContentParent::GetCPOWManager()
|
||||
{
|
||||
if (ManagedPJavaScriptParent().Length()) {
|
||||
|
@ -45,7 +45,7 @@ class TestShellParent;
|
||||
} // namespace ipc
|
||||
|
||||
namespace jsipc {
|
||||
class JavaScriptParent;
|
||||
class JavaScriptShared;
|
||||
class PJavaScriptParent;
|
||||
}
|
||||
|
||||
@ -177,7 +177,7 @@ public:
|
||||
TestShellParent* CreateTestShell();
|
||||
bool DestroyTestShell(TestShellParent* aTestShell);
|
||||
TestShellParent* GetTestShellSingleton();
|
||||
jsipc::JavaScriptParent *GetCPOWManager();
|
||||
jsipc::JavaScriptShared* GetCPOWManager() MOZ_OVERRIDE;
|
||||
|
||||
void ReportChildAlreadyBlocked();
|
||||
bool RequestRunToCompletion();
|
||||
|
@ -20,6 +20,7 @@ EXPORTS.mozilla.dom += [
|
||||
'ContentChild.h',
|
||||
'ContentParent.h',
|
||||
'ContentProcess.h',
|
||||
'CPOWManagerGetter.h',
|
||||
'CrashReporterChild.h',
|
||||
'CrashReporterParent.h',
|
||||
'FilePickerParent.h',
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsTArrayForwardDeclare.h"
|
||||
#include "mozilla/dom/CPOWManagerGetter.h"
|
||||
|
||||
#define NS_ICONTENTCHILD_IID \
|
||||
{ 0x4eed2e73, 0x94ba, 0x48a8, \
|
||||
@ -25,7 +26,6 @@ namespace mozilla {
|
||||
|
||||
namespace jsipc {
|
||||
class PJavaScriptChild;
|
||||
class JavaScriptChild;
|
||||
class CpowEntry;
|
||||
} // jsipc
|
||||
|
||||
@ -39,6 +39,7 @@ class PBlobChild;
|
||||
class PBrowserChild;
|
||||
|
||||
class nsIContentChild : public nsISupports
|
||||
, public CPOWManagerGetter
|
||||
{
|
||||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICONTENTCHILD_IID)
|
||||
@ -56,7 +57,6 @@ public:
|
||||
const uint64_t& aID,
|
||||
const bool& aIsForApp,
|
||||
const bool& aIsForBrowser) = 0;
|
||||
virtual jsipc::JavaScriptChild* GetCPOWManager() = 0;
|
||||
protected:
|
||||
virtual jsipc::PJavaScriptChild* AllocPJavaScriptChild();
|
||||
virtual bool DeallocPJavaScriptChild(jsipc::PJavaScriptChild*);
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include "nsFrameMessageManager.h"
|
||||
#include "nsISupports.h"
|
||||
#include "mozilla/dom/CPOWManagerGetter.h"
|
||||
|
||||
#define NS_ICONTENTPARENT_IID \
|
||||
{ 0xeeec9ebf, 0x8ecf, 0x4e38, \
|
||||
@ -25,7 +26,6 @@ namespace mozilla {
|
||||
|
||||
namespace jsipc {
|
||||
class PJavaScriptParent;
|
||||
class JavaScriptParent;
|
||||
class CpowEntry;
|
||||
} // namespace jsipc
|
||||
|
||||
@ -40,6 +40,7 @@ class PBrowserParent;
|
||||
|
||||
class nsIContentParent : public nsISupports
|
||||
, public mozilla::dom::ipc::MessageManagerCallback
|
||||
, public CPOWManagerGetter
|
||||
{
|
||||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICONTENTPARENT_IID)
|
||||
@ -64,8 +65,6 @@ public:
|
||||
const bool& aIsForApp,
|
||||
const bool& aIsForBrowser) NS_WARN_UNUSED_RESULT = 0;
|
||||
|
||||
virtual jsipc::JavaScriptParent *GetCPOWManager() = 0;
|
||||
|
||||
virtual bool IsContentParent() { return false; }
|
||||
ContentParent* AsContentParent();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user