mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 578262: Clean up style in and remove build warnings from new-ishly merged e10s code. r=bsmedberg
--HG-- rename : dom/ipc/ContentProcessChild.cpp => dom/ipc/ContentChild.cpp rename : dom/ipc/ContentProcessChild.h => dom/ipc/ContentChild.h rename : dom/ipc/ContentProcessParent.cpp => dom/ipc/ContentParent.cpp rename : dom/ipc/ContentProcessParent.h => dom/ipc/ContentParent.h rename : dom/ipc/ContentProcessProcess.cpp => dom/ipc/ContentProcess.cpp rename : dom/ipc/ContentProcessProcess.h => dom/ipc/ContentProcess.h rename : dom/ipc/PIFrameEmbedding.ipdl => dom/ipc/PBrowser.ipdl rename : dom/ipc/PContentProcess.ipdl => dom/ipc/PContent.ipdl
This commit is contained in:
parent
d9940b5fd6
commit
d37c23f270
@ -37,7 +37,7 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifdef MOZ_IPC
|
||||
#include "mozilla/dom/PContentProcessParent.h"
|
||||
#include "mozilla/dom/PContentParent.h"
|
||||
#include "RegistryMessageUtils.h"
|
||||
#include "nsResProtocolHandler.h"
|
||||
#endif
|
||||
@ -466,7 +466,7 @@ struct EnumerationArgs
|
||||
|
||||
void
|
||||
nsChromeRegistryChrome::SendRegisteredChrome(
|
||||
mozilla::dom::PContentProcessParent* aParent)
|
||||
mozilla::dom::PContentParent* aParent)
|
||||
{
|
||||
nsTArray<ChromePackage> packages;
|
||||
nsTArray<ResourceMapping> resources;
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
class PContentProcessParent;
|
||||
class PContentParent;
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ class nsChromeRegistryChrome : public nsChromeRegistry
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_IPC
|
||||
void SendRegisteredChrome(mozilla::dom::PContentProcessParent* aChild);
|
||||
void SendRegisteredChrome(mozilla::dom::PContentParent* aChild);
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
@ -110,6 +110,7 @@
|
||||
#include "nsIDOMChromeWindow.h"
|
||||
#include "nsInProcessTabChildGlobal.h"
|
||||
#include "mozilla/AutoRestore.h"
|
||||
#include "mozilla/unused.h"
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
#include "mozcontainer.h"
|
||||
@ -119,7 +120,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_IPC
|
||||
#include "ContentProcessParent.h"
|
||||
#include "ContentParent.h"
|
||||
#include "TabParent.h"
|
||||
|
||||
using namespace mozilla;
|
||||
@ -302,17 +303,17 @@ nsFrameLoader::ReallyStartLoadingInternal()
|
||||
|
||||
#ifdef MOZ_IPC
|
||||
if (mRemoteFrame) {
|
||||
if (!mChildProcess) {
|
||||
if (!mRemoteBrowser) {
|
||||
TryNewProcess();
|
||||
}
|
||||
|
||||
if (!mChildProcess) {
|
||||
if (!mRemoteBrowser) {
|
||||
NS_WARNING("Couldn't create child process for iframe.");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
// FIXME get error codes from child
|
||||
mChildProcess->LoadURL(mURIToLoad);
|
||||
mRemoteBrowser->LoadURL(mURIToLoad);
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
@ -429,13 +430,13 @@ nsFrameLoader::GetWebProgress(nsIWebProgress **aWebProgress)
|
||||
*aWebProgress = nsnull;
|
||||
#ifdef MOZ_IPC
|
||||
if (mRemoteFrame) {
|
||||
if (!mChildProcess) {
|
||||
if (!mRemoteBrowser) {
|
||||
TryNewProcess();
|
||||
}
|
||||
if (!mChildProcess) {
|
||||
if (!mRemoteBrowser) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
*aWebProgress = mChildProcess;
|
||||
*aWebProgress = mRemoteBrowser;
|
||||
NS_ADDREF(*aWebProgress);
|
||||
return NS_OK;
|
||||
}
|
||||
@ -755,11 +756,11 @@ nsFrameLoader::ShowRemoteFrame(nsIFrameFrame* frame, nsIView* view)
|
||||
{
|
||||
NS_ASSERTION(mRemoteFrame, "ShowRemote only makes sense on remote frames.");
|
||||
|
||||
if (!mChildProcess) {
|
||||
if (!mRemoteBrowser) {
|
||||
TryNewProcess();
|
||||
}
|
||||
|
||||
if (!mChildProcess) {
|
||||
if (!mRemoteBrowser) {
|
||||
NS_ERROR("Couldn't create child process.");
|
||||
return false;
|
||||
}
|
||||
@ -776,7 +777,8 @@ nsFrameLoader::ShowRemoteFrame(nsIFrameFrame* frame, nsIView* view)
|
||||
HWND parentwin =
|
||||
static_cast<HWND>(w->GetNativeData(NS_NATIVE_WINDOW));
|
||||
|
||||
mChildProcess->SendcreateWidget(parentwin);
|
||||
if (!mRemoteBrowser->SendCreateWidget(parentwin))
|
||||
return false;
|
||||
#elif defined(MOZ_WIDGET_GTK2)
|
||||
GdkWindow* parent_win =
|
||||
static_cast<GdkWindow*>(w->GetNativeData(NS_NATIVE_WINDOW));
|
||||
@ -799,7 +801,9 @@ nsFrameLoader::ShowRemoteFrame(nsIFrameFrame* frame, nsIView* view)
|
||||
|
||||
gtk_widget_show(mRemoteSocket);
|
||||
GdkNativeWindow id = gtk_socket_get_id(GTK_SOCKET(mRemoteSocket));
|
||||
mChildProcess->SendcreateWidget(id);
|
||||
if (!mRemoteBrowser->SendCreateWidget(id))
|
||||
return false;
|
||||
|
||||
#elif defined(MOZ_WIDGET_QT)
|
||||
if (getenv("USE_XEMBED_PROXY")) {
|
||||
// Very bad idea to use Xembedding for IPC, but test-ipc.xul still rendering with XEmbed
|
||||
@ -812,15 +816,18 @@ nsFrameLoader::ShowRemoteFrame(nsIFrameFrame* frame, nsIView* view)
|
||||
proxy->setWidget(mRemoteSocket);
|
||||
mRemoteSocket->show();
|
||||
mRemoteSocket->resize(size.width, size.height);
|
||||
mChildProcess->SendcreateWidget(0);
|
||||
if (!mRemoteBrowser->SendCreateWidget(0))
|
||||
return false;
|
||||
} else {
|
||||
// Don't create any parent/child XEmbed, because we are painting with shared memory
|
||||
mChildProcess->SendcreateWidget(0);
|
||||
if (!mRemoteBrowser->SendCreateWidget(0))
|
||||
return false;
|
||||
}
|
||||
#elif defined(ANDROID)
|
||||
// Painting with shared memory
|
||||
|
||||
mChildProcess->SendcreateWidget(0);
|
||||
if (!mRemoteBrowser->SendCreateWidget(0))
|
||||
return false;
|
||||
#elif defined(XP_MACOSX)
|
||||
# warning IMPLEMENT ME
|
||||
|
||||
@ -828,7 +835,7 @@ nsFrameLoader::ShowRemoteFrame(nsIFrameFrame* frame, nsIView* view)
|
||||
#error TODO for this platform
|
||||
#endif
|
||||
|
||||
mChildProcess->Move(0, 0, size.width, size.height);
|
||||
mRemoteBrowser->Move(0, 0, size.width, size.height);
|
||||
mRemoteWidgetCreated = PR_TRUE;
|
||||
nsCOMPtr<nsIChromeFrameMessageManager> dummy;
|
||||
GetMessageManager(getter_AddRefs(dummy)); // Initialize message manager.
|
||||
@ -1161,10 +1168,10 @@ void
|
||||
nsFrameLoader::DestroyChild()
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
if (mChildProcess) {
|
||||
mChildProcess->SetOwnerElement(nsnull);
|
||||
PIFrameEmbeddingParent::Send__delete__(mChildProcess);
|
||||
mChildProcess = nsnull;
|
||||
if (mRemoteBrowser) {
|
||||
mRemoteBrowser->SetOwnerElement(nsnull);
|
||||
unused << PBrowserParent::Send__delete__(mRemoteBrowser);
|
||||
mRemoteBrowser = nsnull;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@ -1533,7 +1540,7 @@ nsFrameLoader::UpdatePositionAndSize(nsIFrame *aIFrame)
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
if (mRemoteFrame) {
|
||||
if (mChildProcess) {
|
||||
if (mRemoteBrowser) {
|
||||
nsIntSize size = GetSubDocumentSize(aIFrame);
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
@ -1546,7 +1553,7 @@ nsFrameLoader::UpdatePositionAndSize(nsIFrame *aIFrame)
|
||||
mRemoteSocket->resize(size.width, size.height);
|
||||
#endif
|
||||
|
||||
mChildProcess->Move(0, 0, size.width, size.height);
|
||||
mRemoteBrowser->Move(0, 0, size.width, size.height);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
@ -1603,7 +1610,7 @@ nsFrameLoader::GetSubDocumentSize(const nsIFrame *aIFrame)
|
||||
bool
|
||||
nsFrameLoader::TryNewProcess()
|
||||
{
|
||||
NS_ASSERTION(!mChildProcess, "TryNewProcess called with a process already?");
|
||||
NS_ASSERTION(!mRemoteBrowser, "TryNewProcess called with a process already?");
|
||||
|
||||
nsIDocument* doc = mOwnerContent->GetDocument();
|
||||
if (!doc) {
|
||||
@ -1644,12 +1651,12 @@ nsFrameLoader::TryNewProcess()
|
||||
return false;
|
||||
}
|
||||
|
||||
ContentProcessParent* parent = ContentProcessParent::GetSingleton();
|
||||
ContentParent* parent = ContentParent::GetSingleton();
|
||||
NS_ASSERTION(parent->IsAlive(), "Process parent should be alive; something is very wrong!");
|
||||
mChildProcess = parent->CreateTab();
|
||||
if (mChildProcess) {
|
||||
mRemoteBrowser = parent->CreateTab();
|
||||
if (mRemoteBrowser) {
|
||||
nsCOMPtr<nsIDOMElement> element = do_QueryInterface(mOwnerContent);
|
||||
mChildProcess->SetOwnerElement(element);
|
||||
mRemoteBrowser->SetOwnerElement(element);
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> rootItem;
|
||||
parentAsItem->GetRootTreeItem(getter_AddRefs(rootItem));
|
||||
@ -1659,7 +1666,7 @@ nsFrameLoader::TryNewProcess()
|
||||
|
||||
nsCOMPtr<nsIBrowserDOMWindow> browserDOMWin;
|
||||
rootChromeWin->GetBrowserDOMWindow(getter_AddRefs(browserDOMWin));
|
||||
mChildProcess->SetBrowserDOMWindow(browserDOMWin);
|
||||
mRemoteBrowser->SetBrowserDOMWindow(browserDOMWin);
|
||||
|
||||
mChildHost = parent;
|
||||
}
|
||||
@ -1668,18 +1675,18 @@ nsFrameLoader::TryNewProcess()
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_IPC
|
||||
mozilla::dom::PIFrameEmbeddingParent*
|
||||
nsFrameLoader::GetChildProcess()
|
||||
mozilla::dom::PBrowserParent*
|
||||
nsFrameLoader::GetRemoteBrowser()
|
||||
{
|
||||
return mChildProcess;
|
||||
return mRemoteBrowser;
|
||||
}
|
||||
#endif
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFrameLoader::ActivateRemoteFrame() {
|
||||
#ifdef MOZ_IPC
|
||||
if (mChildProcess) {
|
||||
mChildProcess->Activate();
|
||||
if (mRemoteBrowser) {
|
||||
mRemoteBrowser->Activate();
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
@ -1696,11 +1703,10 @@ nsFrameLoader::SendCrossProcessMouseEvent(const nsAString& aType,
|
||||
PRBool aIgnoreRootScrollFrame)
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
if (mChildProcess) {
|
||||
mChildProcess->SendMouseEvent(aType, aX, aY, aButton,
|
||||
if (mRemoteBrowser) {
|
||||
mRemoteBrowser->SendMouseEvent(aType, aX, aY, aButton,
|
||||
aClickCount, aModifiers,
|
||||
aIgnoreRootScrollFrame);
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
return NS_ERROR_FAILURE;
|
||||
@ -1711,9 +1717,9 @@ nsFrameLoader::ActivateFrameEvent(const nsAString& aType,
|
||||
PRBool aCapture)
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
if (mChildProcess) {
|
||||
mChildProcess->SendactivateFrameEvent(nsString(aType), aCapture);
|
||||
return NS_OK;
|
||||
if (mRemoteBrowser) {
|
||||
return mRemoteBrowser->SendActivateFrameEvent(nsString(aType), aCapture) ?
|
||||
NS_OK : NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
#endif
|
||||
return NS_ERROR_FAILURE;
|
||||
@ -1727,10 +1733,9 @@ nsFrameLoader::SendCrossProcessKeyEvent(const nsAString& aType,
|
||||
PRBool aPreventDefault)
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
if (mChildProcess) {
|
||||
mChildProcess->SendKeyEvent(aType, aKeyCode, aCharCode, aModifiers,
|
||||
if (mRemoteBrowser) {
|
||||
mRemoteBrowser->SendKeyEvent(aType, aKeyCode, aCharCode, aModifiers,
|
||||
aPreventDefault);
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
return NS_ERROR_FAILURE;
|
||||
@ -1751,9 +1756,9 @@ NS_IMETHODIMP
|
||||
nsFrameLoader::SetDelayRemoteDialogs(PRBool aDelay)
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
if (mChildProcess && mDelayRemoteDialogs && !aDelay) {
|
||||
if (mRemoteBrowser && mDelayRemoteDialogs && !aDelay) {
|
||||
nsRefPtr<nsIRunnable> ev =
|
||||
NS_NewRunnableMethod(mChildProcess,
|
||||
NS_NewRunnableMethod(mRemoteBrowser,
|
||||
&mozilla::dom::TabParent::HandleDelayedDialogs);
|
||||
NS_DispatchToCurrentThread(ev);
|
||||
}
|
||||
@ -1790,10 +1795,10 @@ nsFrameLoader::CreateStaticClone(nsIFrameLoader* aDest)
|
||||
bool LoadScript(void* aCallbackData, const nsAString& aURL)
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
mozilla::dom::PIFrameEmbeddingParent* tabParent =
|
||||
static_cast<nsFrameLoader*>(aCallbackData)->GetChildProcess();
|
||||
mozilla::dom::PBrowserParent* tabParent =
|
||||
static_cast<nsFrameLoader*>(aCallbackData)->GetRemoteBrowser();
|
||||
if (tabParent) {
|
||||
return tabParent->SendloadRemoteScript(nsString(aURL));
|
||||
return tabParent->SendLoadRemoteScript(nsString(aURL));
|
||||
}
|
||||
#endif
|
||||
nsFrameLoader* fl = static_cast<nsFrameLoader*>(aCallbackData);
|
||||
@ -1833,11 +1838,10 @@ bool SendAsyncMessageToChild(void* aCallbackData,
|
||||
const nsAString& aJSON)
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
mozilla::dom::PIFrameEmbeddingParent* tabParent =
|
||||
static_cast<nsFrameLoader*>(aCallbackData)->GetChildProcess();
|
||||
mozilla::dom::PBrowserParent* tabParent =
|
||||
static_cast<nsFrameLoader*>(aCallbackData)->GetRemoteBrowser();
|
||||
if (tabParent) {
|
||||
return tabParent->SendsendAsyncMessageToChild(nsString(aMessage),
|
||||
nsString(aJSON));
|
||||
return tabParent->SendAsyncMessage(nsString(aMessage), nsString(aJSON));
|
||||
}
|
||||
#endif
|
||||
nsRefPtr<nsIRunnable> ev =
|
||||
|
@ -61,10 +61,10 @@ class AutoResetInShow;
|
||||
|
||||
#ifdef MOZ_IPC
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
class TabParent;
|
||||
class PIFrameEmbeddingParent;
|
||||
}
|
||||
namespace dom {
|
||||
class PBrowserParent;
|
||||
class TabParent;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
@ -78,6 +78,8 @@ class QX11EmbedContainer;
|
||||
class nsFrameLoader : public nsIFrameLoader
|
||||
{
|
||||
friend class AutoResetInShow;
|
||||
typedef mozilla::dom::PBrowserParent PBrowserParent;
|
||||
typedef mozilla::dom::TabParent TabParent;
|
||||
|
||||
protected:
|
||||
nsFrameLoader(nsIContent *aOwner) :
|
||||
@ -93,7 +95,7 @@ protected:
|
||||
, mDelayRemoteDialogs(PR_FALSE)
|
||||
, mRemoteWidgetCreated(PR_FALSE)
|
||||
, mRemoteFrame(false)
|
||||
, mChildProcess(nsnull)
|
||||
, mRemoteBrowser(nsnull)
|
||||
#if defined(MOZ_WIDGET_GTK2) || defined(MOZ_WIDGET_QT)
|
||||
, mRemoteSocket(nsnull)
|
||||
#endif
|
||||
@ -149,7 +151,7 @@ public:
|
||||
void DestroyChild();
|
||||
|
||||
#ifdef MOZ_IPC
|
||||
mozilla::dom::PIFrameEmbeddingParent* GetChildProcess();
|
||||
PBrowserParent* GetRemoteBrowser();
|
||||
#endif
|
||||
nsFrameMessageManager* GetFrameMessageManager() { return mMessageManager; }
|
||||
|
||||
@ -208,7 +210,7 @@ private:
|
||||
bool mRemoteFrame;
|
||||
// XXX leaking
|
||||
nsCOMPtr<nsIObserver> mChildHost;
|
||||
mozilla::dom::TabParent* mChildProcess;
|
||||
TabParent* mRemoteBrowser;
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
GtkWidget* mRemoteSocket;
|
||||
|
@ -125,11 +125,11 @@
|
||||
|
||||
#ifdef MOZ_IPC
|
||||
# include <algorithm>
|
||||
# include "mozilla/dom/ContentProcessParent.h"
|
||||
# include "mozilla/dom/ContentParent.h"
|
||||
# include "mozilla/ipc/PDocumentRendererParent.h"
|
||||
# include "mozilla/ipc/PDocumentRendererShmemParent.h"
|
||||
# include "mozilla/ipc/PDocumentRendererNativeIDParent.h"
|
||||
# include "mozilla/dom/PIFrameEmbeddingParent.h"
|
||||
# include "mozilla/dom/PBrowserParent.h"
|
||||
# include "mozilla/ipc/DocumentRendererParent.h"
|
||||
# include "mozilla/ipc/DocumentRendererShmemParent.h"
|
||||
# include "mozilla/ipc/DocumentRendererNativeIDParent.h"
|
||||
@ -840,7 +840,7 @@ nsCanvasRenderingContext2D::~nsCanvasRenderingContext2D()
|
||||
Destroy();
|
||||
|
||||
#ifdef MOZ_IPC
|
||||
ContentProcessParent* allocator = ContentProcessParent::GetSingleton(PR_FALSE);
|
||||
ContentParent* allocator = ContentParent::GetSingleton(PR_FALSE);
|
||||
if (allocator && gfxSharedImageSurface::IsSharedImage(mBackSurface)) {
|
||||
Shmem mem = static_cast<gfxSharedImageSurface*>(mBackSurface.get())->GetShmem();
|
||||
allocator->DeallocShmem(mem);
|
||||
@ -861,7 +861,7 @@ void
|
||||
nsCanvasRenderingContext2D::Destroy()
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
ContentProcessParent* allocator = ContentProcessParent::GetSingleton(PR_FALSE);
|
||||
ContentParent* allocator = ContentParent::GetSingleton(PR_FALSE);
|
||||
if (allocator && gfxSharedImageSurface::IsSharedImage(mSurface)) {
|
||||
Shmem &mem = static_cast<gfxSharedImageSurface*>(mSurface.get())->GetShmem();
|
||||
allocator->DeallocShmem(mem);
|
||||
@ -1110,7 +1110,7 @@ nsCanvasRenderingContext2D::SetDimensions(PRInt32 width, PRInt32 height)
|
||||
#ifdef MOZ_HAVE_SHAREDMEMORYSYSV
|
||||
shmtype = SharedMemory::TYPE_SYSV;
|
||||
#endif
|
||||
ContentProcessParent* allocator = ContentProcessParent::GetSingleton();
|
||||
ContentParent* allocator = ContentParent::GetSingleton();
|
||||
mBackSurface = new gfxSharedImageSurface();
|
||||
static_cast<gfxSharedImageSurface*>(mBackSurface.get())->Init(allocator, size, format, shmtype);
|
||||
}
|
||||
@ -1271,7 +1271,7 @@ nsCanvasRenderingContext2D::Swap(mozilla::ipc::Shmem& aBack,
|
||||
if (aBackImage->Data() != static_cast<gfxImageSurface*>(mBackSurface.get())->Data()) {
|
||||
NS_ERROR("Incoming back surface is not equal to our back surface");
|
||||
// Delete orphaned memory and return
|
||||
ContentProcessParent* allocator = ContentProcessParent::GetSingleton(PR_FALSE);
|
||||
ContentParent* allocator = ContentParent::GetSingleton(PR_FALSE);
|
||||
if (allocator)
|
||||
allocator->DeallocShmem(aBack);
|
||||
return NS_ERROR_FAILURE;
|
||||
@ -3720,7 +3720,7 @@ nsCanvasRenderingContext2D::AsyncDrawXULElement(nsIDOMXULElement* aElem, float a
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
#ifdef MOZ_IPC
|
||||
PIFrameEmbeddingParent *child = frameloader->GetChildProcess();
|
||||
PBrowserParent *child = frameloader->GetRemoteBrowser();
|
||||
if (!child) {
|
||||
nsCOMPtr<nsIDOMWindow> window =
|
||||
do_GetInterface(frameloader->GetExistingDocShell());
|
||||
|
@ -37,7 +37,7 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "ContentProcessChild.h"
|
||||
#include "ContentChild.h"
|
||||
#include "TabChild.h"
|
||||
|
||||
#include "mozilla/ipc/TestShellChild.h"
|
||||
@ -59,22 +59,22 @@ using namespace mozilla::net;
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
ContentProcessChild* ContentProcessChild::sSingleton;
|
||||
ContentChild* ContentChild::sSingleton;
|
||||
|
||||
ContentProcessChild::ContentProcessChild()
|
||||
ContentChild::ContentChild()
|
||||
{
|
||||
}
|
||||
|
||||
ContentProcessChild::~ContentProcessChild()
|
||||
ContentChild::~ContentChild()
|
||||
{
|
||||
}
|
||||
|
||||
bool
|
||||
ContentProcessChild::Init(MessageLoop* aIOLoop,
|
||||
base::ProcessHandle aParentHandle,
|
||||
IPC::Channel* aChannel)
|
||||
ContentChild::Init(MessageLoop* aIOLoop,
|
||||
base::ProcessHandle aParentHandle,
|
||||
IPC::Channel* aChannel)
|
||||
{
|
||||
NS_ASSERTION(!sSingleton, "only one ContentProcessChild per child");
|
||||
NS_ASSERTION(!sSingleton, "only one ContentChild per child");
|
||||
|
||||
Open(aChannel, aParentHandle, aIOLoop);
|
||||
sSingleton = this;
|
||||
@ -82,15 +82,15 @@ ContentProcessChild::Init(MessageLoop* aIOLoop,
|
||||
return true;
|
||||
}
|
||||
|
||||
PIFrameEmbeddingChild*
|
||||
ContentProcessChild::AllocPIFrameEmbedding()
|
||||
PBrowserChild*
|
||||
ContentChild::AllocPBrowser()
|
||||
{
|
||||
nsRefPtr<TabChild> iframe = new TabChild();
|
||||
return NS_SUCCEEDED(iframe->Init()) ? iframe.forget().get() : NULL;
|
||||
}
|
||||
|
||||
bool
|
||||
ContentProcessChild::DeallocPIFrameEmbedding(PIFrameEmbeddingChild* iframe)
|
||||
ContentChild::DeallocPBrowser(PBrowserChild* iframe)
|
||||
{
|
||||
TabChild* child = static_cast<TabChild*>(iframe);
|
||||
NS_RELEASE(child);
|
||||
@ -98,42 +98,42 @@ ContentProcessChild::DeallocPIFrameEmbedding(PIFrameEmbeddingChild* iframe)
|
||||
}
|
||||
|
||||
PTestShellChild*
|
||||
ContentProcessChild::AllocPTestShell()
|
||||
ContentChild::AllocPTestShell()
|
||||
{
|
||||
return new TestShellChild();
|
||||
}
|
||||
|
||||
bool
|
||||
ContentProcessChild::DeallocPTestShell(PTestShellChild* shell)
|
||||
ContentChild::DeallocPTestShell(PTestShellChild* shell)
|
||||
{
|
||||
delete shell;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
ContentProcessChild::RecvPTestShellConstructor(PTestShellChild* actor)
|
||||
ContentChild::RecvPTestShellConstructor(PTestShellChild* actor)
|
||||
{
|
||||
actor->SendPContextWrapperConstructor()->SendPObjectWrapperConstructor(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
PNeckoChild*
|
||||
ContentProcessChild::AllocPNecko()
|
||||
ContentChild::AllocPNecko()
|
||||
{
|
||||
return new NeckoChild();
|
||||
}
|
||||
|
||||
bool
|
||||
ContentProcessChild::DeallocPNecko(PNeckoChild* necko)
|
||||
ContentChild::DeallocPNecko(PNeckoChild* necko)
|
||||
{
|
||||
delete necko;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
ContentProcessChild::RecvRegisterChrome(const nsTArray<ChromePackage>& packages,
|
||||
const nsTArray<ResourceMapping>& resources,
|
||||
const nsTArray<OverrideMapping>& overrides)
|
||||
ContentChild::RecvRegisterChrome(const nsTArray<ChromePackage>& packages,
|
||||
const nsTArray<ResourceMapping>& resources,
|
||||
const nsTArray<OverrideMapping>& overrides)
|
||||
{
|
||||
nsCOMPtr<nsIChromeRegistry> registrySvc = nsChromeRegistry::GetService();
|
||||
nsChromeRegistryContent* chromeRegistry =
|
||||
@ -143,7 +143,7 @@ ContentProcessChild::RecvRegisterChrome(const nsTArray<ChromePackage>& packages,
|
||||
}
|
||||
|
||||
bool
|
||||
ContentProcessChild::RecvSetOffline(const PRBool& offline)
|
||||
ContentChild::RecvSetOffline(const PRBool& offline)
|
||||
{
|
||||
nsCOMPtr<nsIIOService> io (do_GetIOService());
|
||||
NS_ASSERTION(io, "IO Service can not be null");
|
||||
@ -154,7 +154,7 @@ ContentProcessChild::RecvSetOffline(const PRBool& offline)
|
||||
}
|
||||
|
||||
void
|
||||
ContentProcessChild::ActorDestroy(ActorDestroyReason why)
|
||||
ContentChild::ActorDestroy(ActorDestroyReason why)
|
||||
{
|
||||
if (AbnormalShutdown == why)
|
||||
NS_WARNING("shutting down because of crash!");
|
||||
@ -164,10 +164,10 @@ ContentProcessChild::ActorDestroy(ActorDestroyReason why)
|
||||
}
|
||||
|
||||
nsresult
|
||||
ContentProcessChild::AddRemotePrefObserver(const nsCString &aDomain,
|
||||
const nsCString &aPrefRoot,
|
||||
nsIObserver *aObserver,
|
||||
PRBool aHoldWeak)
|
||||
ContentChild::AddRemotePrefObserver(const nsCString &aDomain,
|
||||
const nsCString &aPrefRoot,
|
||||
nsIObserver *aObserver,
|
||||
PRBool aHoldWeak)
|
||||
{
|
||||
nsPrefObserverStorage* newObserver =
|
||||
new nsPrefObserverStorage(aObserver, aDomain, aPrefRoot, aHoldWeak);
|
||||
@ -177,9 +177,9 @@ ContentProcessChild::AddRemotePrefObserver(const nsCString &aDomain,
|
||||
}
|
||||
|
||||
nsresult
|
||||
ContentProcessChild::RemoveRemotePrefObserver(const nsCString &aDomain,
|
||||
const nsCString &aPrefRoot,
|
||||
nsIObserver *aObserver)
|
||||
ContentChild::RemoveRemotePrefObserver(const nsCString &aDomain,
|
||||
const nsCString &aPrefRoot,
|
||||
nsIObserver *aObserver)
|
||||
{
|
||||
if (mPrefObserverArray.IsEmpty())
|
||||
return NS_OK;
|
||||
@ -199,7 +199,7 @@ ContentProcessChild::RemoveRemotePrefObserver(const nsCString &aDomain,
|
||||
}
|
||||
|
||||
bool
|
||||
ContentProcessChild::RecvNotifyRemotePrefObserver(const nsCString& aDomain)
|
||||
ContentChild::RecvNotifyRemotePrefObserver(const nsCString& aDomain)
|
||||
{
|
||||
nsPrefObserverStorage *entry;
|
||||
for (PRUint32 i = 0; i < mPrefObserverArray.Length(); ) {
|
@ -37,10 +37,10 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef mozilla_dom_ContentProcessChild_h
|
||||
#define mozilla_dom_ContentProcessChild_h
|
||||
#ifndef mozilla_dom_ContentChild_h
|
||||
#define mozilla_dom_ContentChild_h
|
||||
|
||||
#include "mozilla/dom/PContentProcessChild.h"
|
||||
#include "mozilla/dom/PContentChild.h"
|
||||
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsTObserverArray.h"
|
||||
@ -59,11 +59,11 @@ struct OverrideMapping;
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class ContentProcessChild : public PContentProcessChild
|
||||
class ContentChild : public PContentChild
|
||||
{
|
||||
public:
|
||||
ContentProcessChild();
|
||||
virtual ~ContentProcessChild();
|
||||
ContentChild();
|
||||
virtual ~ContentChild();
|
||||
|
||||
class nsPrefObserverStorage {
|
||||
public:
|
||||
@ -125,7 +125,7 @@ public:
|
||||
base::ProcessHandle aParentHandle,
|
||||
IPC::Channel* aChannel);
|
||||
|
||||
static ContentProcessChild* GetSingleton() {
|
||||
static ContentChild* GetSingleton() {
|
||||
NS_ASSERTION(sSingleton, "not initialized");
|
||||
return sSingleton;
|
||||
}
|
||||
@ -133,8 +133,8 @@ public:
|
||||
/* if you remove this, please talk to cjones or dougt */
|
||||
virtual bool RecvDummy(Shmem& foo) { return true; }
|
||||
|
||||
virtual PIFrameEmbeddingChild* AllocPIFrameEmbedding();
|
||||
virtual bool DeallocPIFrameEmbedding(PIFrameEmbeddingChild*);
|
||||
virtual PBrowserChild* AllocPBrowser();
|
||||
virtual bool DeallocPBrowser(PBrowserChild*);
|
||||
|
||||
virtual PTestShellChild* AllocPTestShell();
|
||||
virtual bool DeallocPTestShell(PTestShellChild*);
|
||||
@ -168,11 +168,11 @@ private:
|
||||
NS_OVERRIDE
|
||||
virtual void ActorDestroy(ActorDestroyReason why);
|
||||
|
||||
static ContentProcessChild* sSingleton;
|
||||
static ContentChild* sSingleton;
|
||||
|
||||
nsTArray< nsAutoPtr<nsPrefObserverStorage> > mPrefObserverArray;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(ContentProcessChild);
|
||||
DISALLOW_EVIL_CONSTRUCTORS(ContentChild);
|
||||
};
|
||||
|
||||
} // namespace dom
|
@ -37,7 +37,7 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "ContentProcessParent.h"
|
||||
#include "ContentParent.h"
|
||||
|
||||
#include "TabParent.h"
|
||||
#include "mozilla/ipc/TestShellParent.h"
|
||||
@ -62,16 +62,16 @@ namespace dom {
|
||||
|
||||
#define NS_IPC_IOSERVICE_SET_OFFLINE_TOPIC "ipc:network:set-offline"
|
||||
|
||||
ContentProcessParent* ContentProcessParent::gSingleton;
|
||||
ContentParent* ContentParent::gSingleton;
|
||||
|
||||
ContentProcessParent*
|
||||
ContentProcessParent::GetSingleton(PRBool aForceNew)
|
||||
ContentParent*
|
||||
ContentParent::GetSingleton(PRBool aForceNew)
|
||||
{
|
||||
if (gSingleton && !gSingleton->IsAlive())
|
||||
gSingleton = nsnull;
|
||||
|
||||
if (!gSingleton && aForceNew) {
|
||||
nsRefPtr<ContentProcessParent> parent = new ContentProcessParent();
|
||||
nsRefPtr<ContentParent> parent = new ContentParent();
|
||||
if (parent) {
|
||||
nsCOMPtr<nsIObserverService> obs =
|
||||
do_GetService("@mozilla.org/observer-service;1");
|
||||
@ -100,7 +100,7 @@ ContentProcessParent::GetSingleton(PRBool aForceNew)
|
||||
}
|
||||
|
||||
void
|
||||
ContentProcessParent::ActorDestroy(ActorDestroyReason why)
|
||||
ContentParent::ActorDestroy(ActorDestroyReason why)
|
||||
{
|
||||
nsCOMPtr<nsIThreadObserver>
|
||||
kungFuDeathGrip(static_cast<nsIThreadObserver*>(this));
|
||||
@ -119,25 +119,25 @@ ContentProcessParent::ActorDestroy(ActorDestroyReason why)
|
||||
}
|
||||
|
||||
TabParent*
|
||||
ContentProcessParent::CreateTab()
|
||||
ContentParent::CreateTab()
|
||||
{
|
||||
return static_cast<TabParent*>(SendPIFrameEmbeddingConstructor());
|
||||
return static_cast<TabParent*>(SendPBrowserConstructor());
|
||||
}
|
||||
|
||||
TestShellParent*
|
||||
ContentProcessParent::CreateTestShell()
|
||||
ContentParent::CreateTestShell()
|
||||
{
|
||||
return static_cast<TestShellParent*>(SendPTestShellConstructor());
|
||||
}
|
||||
|
||||
bool
|
||||
ContentProcessParent::DestroyTestShell(TestShellParent* aTestShell)
|
||||
ContentParent::DestroyTestShell(TestShellParent* aTestShell)
|
||||
{
|
||||
return PTestShellParent::Send__delete__(aTestShell);
|
||||
}
|
||||
|
||||
ContentProcessParent::ContentProcessParent()
|
||||
: mMonitor("ContentProcessParent::mMonitor")
|
||||
ContentParent::ContentParent()
|
||||
: mMonitor("ContentParent::mMonitor")
|
||||
, mRunToCompletionDepth(0)
|
||||
, mShouldCallUnblockChild(false)
|
||||
, mIsAlive(true)
|
||||
@ -153,7 +153,7 @@ ContentProcessParent::ContentProcessParent()
|
||||
chromeRegistry->SendRegisteredChrome(this);
|
||||
}
|
||||
|
||||
ContentProcessParent::~ContentProcessParent()
|
||||
ContentParent::~ContentParent()
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||
//If the previous content process has died, a new one could have
|
||||
@ -163,14 +163,14 @@ ContentProcessParent::~ContentProcessParent()
|
||||
}
|
||||
|
||||
bool
|
||||
ContentProcessParent::IsAlive()
|
||||
ContentParent::IsAlive()
|
||||
{
|
||||
return mIsAlive;
|
||||
}
|
||||
|
||||
bool
|
||||
ContentProcessParent::RecvGetPrefType(const nsCString& prefName,
|
||||
PRInt32* retValue, nsresult* rv)
|
||||
ContentParent::RecvGetPrefType(const nsCString& prefName,
|
||||
PRInt32* retValue, nsresult* rv)
|
||||
{
|
||||
*retValue = 0;
|
||||
|
||||
@ -180,8 +180,8 @@ ContentProcessParent::RecvGetPrefType(const nsCString& prefName,
|
||||
}
|
||||
|
||||
bool
|
||||
ContentProcessParent::RecvGetBoolPref(const nsCString& prefName,
|
||||
PRBool* retValue, nsresult* rv)
|
||||
ContentParent::RecvGetBoolPref(const nsCString& prefName,
|
||||
PRBool* retValue, nsresult* rv)
|
||||
{
|
||||
*retValue = PR_FALSE;
|
||||
|
||||
@ -191,8 +191,8 @@ ContentProcessParent::RecvGetBoolPref(const nsCString& prefName,
|
||||
}
|
||||
|
||||
bool
|
||||
ContentProcessParent::RecvGetIntPref(const nsCString& prefName,
|
||||
PRInt32* retValue, nsresult* rv)
|
||||
ContentParent::RecvGetIntPref(const nsCString& prefName,
|
||||
PRInt32* retValue, nsresult* rv)
|
||||
{
|
||||
*retValue = 0;
|
||||
|
||||
@ -202,8 +202,8 @@ ContentProcessParent::RecvGetIntPref(const nsCString& prefName,
|
||||
}
|
||||
|
||||
bool
|
||||
ContentProcessParent::RecvGetCharPref(const nsCString& prefName,
|
||||
nsCString* retValue, nsresult* rv)
|
||||
ContentParent::RecvGetCharPref(const nsCString& prefName,
|
||||
nsCString* retValue, nsresult* rv)
|
||||
{
|
||||
EnsurePrefService();
|
||||
*rv = mPrefService->GetCharPref(prefName.get(), getter_Copies(*retValue));
|
||||
@ -211,8 +211,8 @@ ContentProcessParent::RecvGetCharPref(const nsCString& prefName,
|
||||
}
|
||||
|
||||
bool
|
||||
ContentProcessParent::RecvGetPrefLocalizedString(const nsCString& prefName,
|
||||
nsString* retValue, nsresult* rv)
|
||||
ContentParent::RecvGetPrefLocalizedString(const nsCString& prefName,
|
||||
nsString* retValue, nsresult* rv)
|
||||
{
|
||||
EnsurePrefService();
|
||||
nsCOMPtr<nsIPrefLocalizedString> string;
|
||||
@ -226,8 +226,8 @@ ContentProcessParent::RecvGetPrefLocalizedString(const nsCString& prefName,
|
||||
}
|
||||
|
||||
bool
|
||||
ContentProcessParent::RecvPrefHasUserValue(const nsCString& prefName,
|
||||
PRBool* retValue, nsresult* rv)
|
||||
ContentParent::RecvPrefHasUserValue(const nsCString& prefName,
|
||||
PRBool* retValue, nsresult* rv)
|
||||
{
|
||||
*retValue = PR_FALSE;
|
||||
|
||||
@ -237,8 +237,8 @@ ContentProcessParent::RecvPrefHasUserValue(const nsCString& prefName,
|
||||
}
|
||||
|
||||
bool
|
||||
ContentProcessParent::RecvPrefIsLocked(const nsCString& prefName,
|
||||
PRBool* retValue, nsresult* rv)
|
||||
ContentParent::RecvPrefIsLocked(const nsCString& prefName,
|
||||
PRBool* retValue, nsresult* rv)
|
||||
{
|
||||
*retValue = PR_FALSE;
|
||||
|
||||
@ -249,8 +249,8 @@ ContentProcessParent::RecvPrefIsLocked(const nsCString& prefName,
|
||||
}
|
||||
|
||||
bool
|
||||
ContentProcessParent::RecvGetChildList(const nsCString& domain,
|
||||
nsTArray<nsCString>* list, nsresult* rv)
|
||||
ContentParent::RecvGetChildList(const nsCString& domain,
|
||||
nsTArray<nsCString>* list, nsresult* rv)
|
||||
{
|
||||
EnsurePrefService();
|
||||
|
||||
@ -268,10 +268,10 @@ ContentProcessParent::RecvGetChildList(const nsCString& domain,
|
||||
}
|
||||
|
||||
bool
|
||||
ContentProcessParent::RecvTestPermission(const IPC::URI& aUri,
|
||||
const nsCString& aType,
|
||||
const PRBool& aExact,
|
||||
PRUint32* retValue)
|
||||
ContentParent::RecvTestPermission(const IPC::URI& aUri,
|
||||
const nsCString& aType,
|
||||
const PRBool& aExact,
|
||||
PRUint32* retValue)
|
||||
{
|
||||
EnsurePermissionService();
|
||||
|
||||
@ -285,7 +285,7 @@ ContentProcessParent::RecvTestPermission(const IPC::URI& aUri,
|
||||
}
|
||||
|
||||
void
|
||||
ContentProcessParent::EnsurePrefService()
|
||||
ContentParent::EnsurePrefService()
|
||||
{
|
||||
nsresult rv;
|
||||
if (!mPrefService) {
|
||||
@ -296,7 +296,7 @@ ContentProcessParent::EnsurePrefService()
|
||||
}
|
||||
|
||||
void
|
||||
ContentProcessParent::EnsurePermissionService()
|
||||
ContentParent::EnsurePermissionService()
|
||||
{
|
||||
nsresult rv;
|
||||
if (!mPermissionService) {
|
||||
@ -307,7 +307,7 @@ ContentProcessParent::EnsurePermissionService()
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS2(ContentProcessParent,
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS2(ContentParent,
|
||||
nsIObserver,
|
||||
nsIThreadObserver)
|
||||
|
||||
@ -320,9 +320,9 @@ DeleteSubprocess(GeckoChildProcessHost* aSubprocess)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ContentProcessParent::Observe(nsISupports* aSubject,
|
||||
const char* aTopic,
|
||||
const PRUnichar* aData)
|
||||
ContentParent::Observe(nsISupports* aSubject,
|
||||
const char* aTopic,
|
||||
const PRUnichar* aData)
|
||||
{
|
||||
if (!strcmp(aTopic, "xpcom-shutdown") && mSubprocess) {
|
||||
// remove the global remote preferences observers
|
||||
@ -341,25 +341,27 @@ ContentProcessParent::Observe(nsISupports* aSubject,
|
||||
mSubprocess = nsnull;
|
||||
}
|
||||
|
||||
if (!mIsAlive || !mSubprocess)
|
||||
return NS_OK;
|
||||
|
||||
// listening for remotePrefs...
|
||||
if (!strcmp(aTopic, "nsPref:changed")) {
|
||||
// We know prefs are ASCII here.
|
||||
NS_LossyConvertUTF16toASCII strData(aData);
|
||||
if (mIsAlive)
|
||||
SendNotifyRemotePrefObserver(strData);
|
||||
if (!SendNotifyRemotePrefObserver(strData))
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
if (!strcmp(aTopic, NS_IPC_IOSERVICE_SET_OFFLINE_TOPIC) && mSubprocess) {
|
||||
else if (!strcmp(aTopic, NS_IPC_IOSERVICE_SET_OFFLINE_TOPIC)) {
|
||||
NS_ConvertUTF16toUTF8 dataStr(aData);
|
||||
const char *offline = dataStr.get();
|
||||
if (mIsAlive)
|
||||
SendSetOffline(!strcmp(offline, "true") ? true : false);
|
||||
if (!SendSetOffline(!strcmp(offline, "true") ? true : false))
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
PIFrameEmbeddingParent*
|
||||
ContentProcessParent::AllocPIFrameEmbedding()
|
||||
PBrowserParent*
|
||||
ContentParent::AllocPBrowser()
|
||||
{
|
||||
TabParent* parent = new TabParent();
|
||||
if (parent){
|
||||
@ -369,7 +371,7 @@ ContentProcessParent::AllocPIFrameEmbedding()
|
||||
}
|
||||
|
||||
bool
|
||||
ContentProcessParent::DeallocPIFrameEmbedding(PIFrameEmbeddingParent* frame)
|
||||
ContentParent::DeallocPBrowser(PBrowserParent* frame)
|
||||
{
|
||||
TabParent* parent = static_cast<TabParent*>(frame);
|
||||
NS_RELEASE(parent);
|
||||
@ -377,33 +379,33 @@ ContentProcessParent::DeallocPIFrameEmbedding(PIFrameEmbeddingParent* frame)
|
||||
}
|
||||
|
||||
PTestShellParent*
|
||||
ContentProcessParent::AllocPTestShell()
|
||||
ContentParent::AllocPTestShell()
|
||||
{
|
||||
return new TestShellParent();
|
||||
}
|
||||
|
||||
bool
|
||||
ContentProcessParent::DeallocPTestShell(PTestShellParent* shell)
|
||||
ContentParent::DeallocPTestShell(PTestShellParent* shell)
|
||||
{
|
||||
delete shell;
|
||||
return true;
|
||||
}
|
||||
|
||||
PNeckoParent*
|
||||
ContentProcessParent::AllocPNecko()
|
||||
ContentParent::AllocPNecko()
|
||||
{
|
||||
return new NeckoParent();
|
||||
}
|
||||
|
||||
bool
|
||||
ContentProcessParent::DeallocPNecko(PNeckoParent* necko)
|
||||
ContentParent::DeallocPNecko(PNeckoParent* necko)
|
||||
{
|
||||
delete necko;
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
ContentProcessParent::ReportChildAlreadyBlocked()
|
||||
ContentParent::ReportChildAlreadyBlocked()
|
||||
{
|
||||
if (!mRunToCompletionDepth) {
|
||||
#ifdef DEBUG
|
||||
@ -415,7 +417,7 @@ ContentProcessParent::ReportChildAlreadyBlocked()
|
||||
}
|
||||
|
||||
bool
|
||||
ContentProcessParent::RequestRunToCompletion()
|
||||
ContentParent::RequestRunToCompletion()
|
||||
{
|
||||
if (!mRunToCompletionDepth &&
|
||||
BlockChild()) {
|
||||
@ -430,7 +432,7 @@ ContentProcessParent::RequestRunToCompletion()
|
||||
|
||||
/* void onDispatchedEvent (in nsIThreadInternal thread); */
|
||||
NS_IMETHODIMP
|
||||
ContentProcessParent::OnDispatchedEvent(nsIThreadInternal *thread)
|
||||
ContentParent::OnDispatchedEvent(nsIThreadInternal *thread)
|
||||
{
|
||||
if (mOldObserver)
|
||||
return mOldObserver->OnDispatchedEvent(thread);
|
||||
@ -440,9 +442,9 @@ ContentProcessParent::OnDispatchedEvent(nsIThreadInternal *thread)
|
||||
|
||||
/* void onProcessNextEvent (in nsIThreadInternal thread, in boolean mayWait, in unsigned long recursionDepth); */
|
||||
NS_IMETHODIMP
|
||||
ContentProcessParent::OnProcessNextEvent(nsIThreadInternal *thread,
|
||||
PRBool mayWait,
|
||||
PRUint32 recursionDepth)
|
||||
ContentParent::OnProcessNextEvent(nsIThreadInternal *thread,
|
||||
PRBool mayWait,
|
||||
PRUint32 recursionDepth)
|
||||
{
|
||||
if (mRunToCompletionDepth)
|
||||
++mRunToCompletionDepth;
|
||||
@ -455,8 +457,8 @@ ContentProcessParent::OnProcessNextEvent(nsIThreadInternal *thread,
|
||||
|
||||
/* void afterProcessNextEvent (in nsIThreadInternal thread, in unsigned long recursionDepth); */
|
||||
NS_IMETHODIMP
|
||||
ContentProcessParent::AfterProcessNextEvent(nsIThreadInternal *thread,
|
||||
PRUint32 recursionDepth)
|
||||
ContentParent::AfterProcessNextEvent(nsIThreadInternal *thread,
|
||||
PRUint32 recursionDepth)
|
||||
{
|
||||
if (mRunToCompletionDepth &&
|
||||
!--mRunToCompletionDepth) {
|
@ -36,12 +36,12 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef mozilla_dom_ContentProcessParent_h
|
||||
#define mozilla_dom_ContentProcessParent_h
|
||||
#ifndef mozilla_dom_ContentParent_h
|
||||
#define mozilla_dom_ContentParent_h
|
||||
|
||||
#include "base/waitable_event_watcher.h"
|
||||
|
||||
#include "mozilla/dom/PContentProcessParent.h"
|
||||
#include "mozilla/dom/PContentParent.h"
|
||||
#include "mozilla/ipc/GeckoChildProcessHost.h"
|
||||
|
||||
#include "nsIObserver.h"
|
||||
@ -60,20 +60,20 @@ namespace dom {
|
||||
|
||||
class TabParent;
|
||||
|
||||
class ContentProcessParent : public PContentProcessParent
|
||||
, public nsIObserver
|
||||
, public nsIThreadObserver
|
||||
class ContentParent : public PContentParent
|
||||
, public nsIObserver
|
||||
, public nsIThreadObserver
|
||||
{
|
||||
private:
|
||||
typedef mozilla::ipc::GeckoChildProcessHost GeckoChildProcessHost;
|
||||
typedef mozilla::ipc::TestShellParent TestShellParent;
|
||||
|
||||
public:
|
||||
static ContentProcessParent* GetSingleton(PRBool aForceNew = PR_TRUE);
|
||||
static ContentParent* GetSingleton(PRBool aForceNew = PR_TRUE);
|
||||
|
||||
#if 0
|
||||
// TODO: implement this somewhere!
|
||||
static ContentProcessParent* FreeSingleton();
|
||||
static ContentParent* FreeSingleton();
|
||||
#endif
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
@ -94,18 +94,18 @@ protected:
|
||||
virtual void ActorDestroy(ActorDestroyReason why);
|
||||
|
||||
private:
|
||||
static ContentProcessParent* gSingleton;
|
||||
static ContentParent* gSingleton;
|
||||
|
||||
// Hide the raw constructor methods since we don't want client code
|
||||
// using them.
|
||||
using PContentProcessParent::SendPIFrameEmbeddingConstructor;
|
||||
using PContentProcessParent::SendPTestShellConstructor;
|
||||
using PContentParent::SendPBrowserConstructor;
|
||||
using PContentParent::SendPTestShellConstructor;
|
||||
|
||||
ContentProcessParent();
|
||||
virtual ~ContentProcessParent();
|
||||
ContentParent();
|
||||
virtual ~ContentParent();
|
||||
|
||||
virtual PIFrameEmbeddingParent* AllocPIFrameEmbedding();
|
||||
virtual bool DeallocPIFrameEmbedding(PIFrameEmbeddingParent* frame);
|
||||
virtual PBrowserParent* AllocPBrowser();
|
||||
virtual bool DeallocPBrowser(PBrowserParent* frame);
|
||||
|
||||
virtual PTestShellParent* AllocPTestShell();
|
||||
virtual bool DeallocPTestShell(PTestShellParent* shell);
|
@ -39,7 +39,7 @@
|
||||
|
||||
#include "mozilla/ipc/IOThreadChild.h"
|
||||
|
||||
#include "ContentProcessProcess.h"
|
||||
#include "ContentProcess.h"
|
||||
|
||||
using mozilla::ipc::IOThreadChild;
|
||||
|
||||
@ -47,9 +47,9 @@ namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
bool
|
||||
ContentProcessProcess::Init()
|
||||
ContentProcess::Init()
|
||||
{
|
||||
mContentProcess.Init(IOThreadChild::message_loop(),
|
||||
mContent.Init(IOThreadChild::message_loop(),
|
||||
ParentHandle(),
|
||||
IOThreadChild::channel());
|
||||
mXREEmbed.Start();
|
||||
@ -58,7 +58,7 @@ ContentProcessProcess::Init()
|
||||
}
|
||||
|
||||
void
|
||||
ContentProcessProcess::CleanUp()
|
||||
ContentProcess::CleanUp()
|
||||
{
|
||||
mXREEmbed.Stop();
|
||||
}
|
@ -37,33 +37,33 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef dom_tabs_ContentProcessThread_h
|
||||
#define dom_tabs_ContentProcessThread_h 1
|
||||
#ifndef dom_tabs_ContentThread_h
|
||||
#define dom_tabs_ContentThread_h 1
|
||||
|
||||
#include "mozilla/ipc/ProcessChild.h"
|
||||
#include "mozilla/ipc/ScopedXREEmbed.h"
|
||||
#include "ContentProcessChild.h"
|
||||
#include "ContentChild.h"
|
||||
|
||||
#undef _MOZ_LOG
|
||||
#define _MOZ_LOG(s) printf("[ContentProcessProcess] %s", s)
|
||||
#define _MOZ_LOG(s) printf("[ContentProcess] %s", s)
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
/**
|
||||
* ContentProcessProcess is a singleton on the content process which represents
|
||||
* ContentProcess is a singleton on the content process which represents
|
||||
* the main thread where tab instances live.
|
||||
*/
|
||||
class ContentProcessProcess : public mozilla::ipc::ProcessChild
|
||||
class ContentProcess : public mozilla::ipc::ProcessChild
|
||||
{
|
||||
typedef mozilla::ipc::ProcessChild ProcessChild;
|
||||
|
||||
public:
|
||||
ContentProcessProcess(ProcessHandle mParentHandle)
|
||||
ContentProcess(ProcessHandle mParentHandle)
|
||||
: ProcessChild(mParentHandle)
|
||||
{ }
|
||||
|
||||
~ContentProcessProcess()
|
||||
~ContentProcess()
|
||||
{ }
|
||||
|
||||
NS_OVERRIDE
|
||||
@ -72,13 +72,13 @@ public:
|
||||
virtual void CleanUp();
|
||||
|
||||
private:
|
||||
ContentProcessChild mContentProcess;
|
||||
ContentChild mContent;
|
||||
mozilla::ipc::ScopedXREEmbed mXREEmbed;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(ContentProcessProcess);
|
||||
DISALLOW_EVIL_CONSTRUCTORS(ContentProcess);
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // ifndef dom_tabs_ContentProcessThread_h
|
||||
#endif // ifndef dom_tabs_ContentThread_h
|
@ -56,17 +56,17 @@ EXPORTS_mozilla = \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS_mozilla/dom = \
|
||||
ContentProcessChild.h \
|
||||
ContentProcessParent.h \
|
||||
ContentProcessProcess.h \
|
||||
ContentChild.h \
|
||||
ContentParent.h \
|
||||
ContentProcess.h \
|
||||
TabParent.h \
|
||||
TabChild.h \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
ContentProcessProcess.cpp \
|
||||
ContentProcessParent.cpp \
|
||||
ContentProcessChild.cpp \
|
||||
ContentProcess.cpp \
|
||||
ContentParent.cpp \
|
||||
ContentChild.cpp \
|
||||
TabParent.cpp \
|
||||
TabChild.cpp \
|
||||
TabMessageUtils.cpp \
|
||||
|
@ -37,12 +37,12 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
include protocol PContentProcess;
|
||||
include protocol PContent;
|
||||
include protocol PContentDialog;
|
||||
include protocol PDocumentRenderer;
|
||||
include protocol PDocumentRendererShmem;
|
||||
include protocol PDocumentRendererNativeID;
|
||||
include protocol PGeolocationRequest;
|
||||
include protocol PContentDialog;
|
||||
|
||||
include "mozilla/TabTypes.h";
|
||||
include "TabMessageUtils.h";
|
||||
@ -57,14 +57,18 @@ using gfxMatrix;
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
rpc protocol PIFrameEmbedding
|
||||
rpc protocol PBrowser
|
||||
{
|
||||
manager PContentProcess;
|
||||
manager PContent;
|
||||
|
||||
manages PContentDialog;
|
||||
manages PDocumentRenderer;
|
||||
manages PDocumentRendererShmem;
|
||||
manages PDocumentRendererNativeID;
|
||||
manages PGeolocationRequest;
|
||||
manages PContentDialog;
|
||||
|
||||
both:
|
||||
AsyncMessage(nsString aMessage, nsString aJSON);
|
||||
|
||||
child:
|
||||
__delete__();
|
||||
@ -74,46 +78,44 @@ parent:
|
||||
* When child sends this message, parent should move focus to
|
||||
* the next or previous focusable element.
|
||||
*/
|
||||
moveFocus(bool forward);
|
||||
MoveFocus(bool forward);
|
||||
|
||||
sendEvent(RemoteDOMEvent aEvent);
|
||||
Event(RemoteDOMEvent aEvent);
|
||||
|
||||
notifyStateChange(PRUint32 stateFlags, nsresult status);
|
||||
NotifyStateChange(PRUint32 stateFlags, nsresult status);
|
||||
|
||||
notifyProgressChange(PRInt64 curSelfProgress,
|
||||
NotifyProgressChange(PRInt64 curSelfProgress,
|
||||
PRInt64 maxSelfProgress,
|
||||
PRInt64 curTotalProgress,
|
||||
PRInt64 maxTotalProgress);
|
||||
|
||||
notifyLocationChange(nsCString uri);
|
||||
NotifyLocationChange(nsCString uri);
|
||||
|
||||
notifyStatusChange(nsresult status,
|
||||
NotifyStatusChange(nsresult status,
|
||||
nsString message);
|
||||
|
||||
notifySecurityChange(PRUint32 aState);
|
||||
NotifySecurityChange(PRUint32 aState);
|
||||
|
||||
sync refreshAttempted(nsCString uri, PRInt32 millis,
|
||||
sync RefreshAttempted(nsCString uri, PRInt32 millis,
|
||||
bool sameURI) returns (bool retval);
|
||||
|
||||
|
||||
rpc createWindow() returns (PIFrameEmbedding window);
|
||||
rpc CreateWindow() returns (PBrowser window);
|
||||
|
||||
sync sendSyncMessageToParent(nsString aMessage, nsString aJSON)
|
||||
sync SyncMessage(nsString aMessage, nsString aJSON)
|
||||
returns (nsString[] retval);
|
||||
|
||||
sendAsyncMessageToParent(nsString aMessage, nsString aJSON);
|
||||
|
||||
PGeolocationRequest(URI uri);
|
||||
|
||||
PContentDialog(PRUint32 aType, nsCString aName, nsCString aFeatures,
|
||||
PRInt32[] aIntParams, nsString[] aStringParams);
|
||||
|
||||
child:
|
||||
createWidget(MagicWindowHandle parentWidget);
|
||||
CreateWidget(MagicWindowHandle parentWidget);
|
||||
|
||||
loadURL(nsCString uri);
|
||||
LoadURL(nsCString uri);
|
||||
|
||||
move(PRUint32 x,
|
||||
Move(PRUint32 x,
|
||||
PRUint32 y,
|
||||
PRUint32 width,
|
||||
PRUint32 height);
|
||||
@ -121,36 +123,34 @@ child:
|
||||
/**
|
||||
* Sending an activate message moves focus to the child.
|
||||
*/
|
||||
activate();
|
||||
Activate();
|
||||
|
||||
/**
|
||||
* @see nsIDOMWindowUtils sendMouseEvent.
|
||||
*/
|
||||
sendMouseEvent(nsString aType,
|
||||
PRInt32 aX, //XXX should be float, but ipdl doesn't seem to support that.
|
||||
PRInt32 aY, //XXX - " -
|
||||
PRInt32 aButton,
|
||||
PRInt32 aClickCount,
|
||||
PRInt32 aModifiers,
|
||||
bool aIgnoreRootScrollFrame);
|
||||
/**
|
||||
* @see nsIDOMWindowUtils sendMouseEvent.
|
||||
*/
|
||||
MouseEvent(nsString aType,
|
||||
float aX,
|
||||
float aY,
|
||||
PRInt32 aButton,
|
||||
PRInt32 aClickCount,
|
||||
PRInt32 aModifiers,
|
||||
bool aIgnoreRootScrollFrame);
|
||||
|
||||
/**
|
||||
* @see nsIDOMWindowUtils sendKeyEvent.
|
||||
*/
|
||||
sendKeyEvent(nsString aType,
|
||||
PRInt32 aKeyCode,
|
||||
PRInt32 aCharCode,
|
||||
PRInt32 aModifiers,
|
||||
bool aPreventDefault);
|
||||
/**
|
||||
* @see nsIDOMWindowUtils sendKeyEvent.
|
||||
*/
|
||||
KeyEvent(nsString aType,
|
||||
PRInt32 aKeyCode,
|
||||
PRInt32 aCharCode,
|
||||
PRInt32 aModifiers,
|
||||
bool aPreventDefault);
|
||||
|
||||
/**
|
||||
* Activate event forwarding from client to parent.
|
||||
*/
|
||||
activateFrameEvent(nsString aType, bool capture);
|
||||
ActivateFrameEvent(nsString aType, bool capture);
|
||||
|
||||
loadRemoteScript(nsString aURL);
|
||||
|
||||
sendAsyncMessageToChild(nsString aMessage, nsString aJSON);
|
||||
LoadRemoteScript(nsString aURL);
|
||||
|
||||
PDocumentRenderer(PRInt32 x, PRInt32 y, PRInt32 w, PRInt32 h, nsString bgcolor, PRUint32 flags, bool flush);
|
||||
|
@ -36,7 +36,7 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
include protocol PIFrameEmbedding;
|
||||
include protocol PBrowser;
|
||||
include protocol PTestShell;
|
||||
include protocol PNecko;
|
||||
|
||||
@ -52,14 +52,14 @@ using IPC::URI;
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
rpc protocol PContentProcess
|
||||
rpc protocol PContent
|
||||
{
|
||||
manages PIFrameEmbedding;
|
||||
manages PBrowser;
|
||||
manages PTestShell;
|
||||
manages PNecko;
|
||||
|
||||
child:
|
||||
PIFrameEmbedding();
|
||||
PBrowser();
|
||||
|
||||
PTestShell();
|
||||
|
@ -35,7 +35,7 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
include protocol PIFrameEmbedding;
|
||||
include protocol PBrowser;
|
||||
include "mozilla/TabTypes.h";
|
||||
|
||||
namespace mozilla {
|
||||
@ -43,7 +43,7 @@ namespace dom {
|
||||
|
||||
protocol PContentDialog
|
||||
{
|
||||
manager PIFrameEmbedding;
|
||||
manager PBrowser;
|
||||
|
||||
child:
|
||||
__delete__(PRInt32[] aIntParams, nsString[] aStringParams);
|
||||
|
@ -35,14 +35,14 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
include protocol PIFrameEmbedding;
|
||||
include protocol PBrowser;
|
||||
|
||||
namespace mozilla {
|
||||
namespace ipc {
|
||||
|
||||
protocol PDocumentRenderer
|
||||
{
|
||||
manager PIFrameEmbedding;
|
||||
manager PBrowser;
|
||||
|
||||
parent:
|
||||
// Returns the width and height, in pixels, of the returned ARGB32 data.
|
||||
|
@ -35,14 +35,14 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
include protocol PIFrameEmbedding;
|
||||
include protocol PBrowser;
|
||||
|
||||
namespace mozilla {
|
||||
namespace ipc {
|
||||
|
||||
protocol PDocumentRendererNativeID
|
||||
{
|
||||
manager PIFrameEmbedding;
|
||||
manager PBrowser;
|
||||
|
||||
parent:
|
||||
// Returns the offset, width and height, in pixels, of the area in the
|
||||
|
@ -35,14 +35,14 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
include protocol PIFrameEmbedding;
|
||||
include protocol PBrowser;
|
||||
|
||||
namespace mozilla {
|
||||
namespace ipc {
|
||||
|
||||
protocol PDocumentRendererShmem
|
||||
{
|
||||
manager PIFrameEmbedding;
|
||||
manager PBrowser;
|
||||
|
||||
parent:
|
||||
// Returns the offset, width and height, in pixels, of the area in the
|
||||
|
@ -37,7 +37,7 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "TabChild.h"
|
||||
#include "mozilla/dom/PContentProcessChild.h"
|
||||
#include "mozilla/dom/PContentChild.h"
|
||||
#include "mozilla/dom/PContentDialogChild.h"
|
||||
|
||||
#include "nsIWebBrowser.h"
|
||||
@ -98,7 +98,7 @@ ContentListener::HandleEvent(nsIDOMEvent* aEvent)
|
||||
RemoteDOMEvent remoteEvent;
|
||||
remoteEvent.mEvent = do_QueryInterface(aEvent);
|
||||
NS_ENSURE_STATE(remoteEvent.mEvent);
|
||||
mTabChild->SendsendEvent(remoteEvent);
|
||||
mTabChild->SendEvent(remoteEvent);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -290,14 +290,14 @@ TabChild::Blur()
|
||||
NS_IMETHODIMP
|
||||
TabChild::FocusNextElement()
|
||||
{
|
||||
SendmoveFocus(PR_TRUE);
|
||||
SendMoveFocus(PR_TRUE);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TabChild::FocusPrevElement()
|
||||
{
|
||||
SendmoveFocus(PR_FALSE);
|
||||
SendMoveFocus(PR_FALSE);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -319,8 +319,8 @@ TabChild::ProvideWindow(nsIDOMWindow* aParent, PRUint32 aChromeFlags,
|
||||
{
|
||||
*aReturn = nsnull;
|
||||
|
||||
PIFrameEmbeddingChild* newChild;
|
||||
if (!CallcreateWindow(&newChild)) {
|
||||
PBrowserChild* newChild;
|
||||
if (!CallCreateWindow(&newChild)) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
@ -406,7 +406,7 @@ TabChild::ArraysToParams(const nsTArray<int>& aIntParams,
|
||||
}
|
||||
|
||||
bool
|
||||
TabChild::RecvcreateWidget(const MagicWindowHandle& parentWidget)
|
||||
TabChild::RecvCreateWidget(const MagicWindowHandle& parentWidget)
|
||||
{
|
||||
nsCOMPtr<nsIBaseWindow> baseWindow = do_QueryInterface(mWebNav);
|
||||
if (!baseWindow) {
|
||||
@ -453,7 +453,7 @@ TabChild::RecvcreateWidget(const MagicWindowHandle& parentWidget)
|
||||
}
|
||||
|
||||
bool
|
||||
TabChild::destroyWidget()
|
||||
TabChild::DestroyWidget()
|
||||
{
|
||||
nsCOMPtr<nsIBaseWindow> baseWindow = do_QueryInterface(mWebNav);
|
||||
if (baseWindow)
|
||||
@ -464,7 +464,7 @@ TabChild::destroyWidget()
|
||||
|
||||
TabChild::~TabChild()
|
||||
{
|
||||
destroyWidget();
|
||||
DestroyWidget();
|
||||
nsCOMPtr<nsIWebBrowser> webBrowser = do_QueryInterface(mWebNav);
|
||||
if (webBrowser) {
|
||||
webBrowser->SetContainerWindow(nsnull);
|
||||
@ -486,7 +486,7 @@ TabChild::OnStateChange(nsIWebProgress *aWebProgress,
|
||||
PRUint32 aStateFlags,
|
||||
nsresult aStatus)
|
||||
{
|
||||
SendnotifyStateChange(aStateFlags, aStatus);
|
||||
SendNotifyStateChange(aStateFlags, aStatus);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -501,7 +501,7 @@ TabChild::OnProgressChange(nsIWebProgress *aWebProgress,
|
||||
PRInt32 aCurTotalProgress,
|
||||
PRInt32 aMaxTotalProgress)
|
||||
{
|
||||
SendnotifyProgressChange(aCurSelfProgress, aMaxSelfProgress,
|
||||
SendNotifyProgressChange(aCurSelfProgress, aMaxSelfProgress,
|
||||
aCurTotalProgress, aMaxTotalProgress);
|
||||
return NS_OK;
|
||||
}
|
||||
@ -513,7 +513,7 @@ TabChild::OnStatusChange(nsIWebProgress *aWebProgress,
|
||||
const PRUnichar* aMessage)
|
||||
{
|
||||
nsDependentString message(aMessage);
|
||||
SendnotifyStatusChange(aStatus, message);
|
||||
SendNotifyStatusChange(aStatus, message);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -522,7 +522,7 @@ TabChild::OnSecurityChange(nsIWebProgress *aWebProgress,
|
||||
nsIRequest *aRequest,
|
||||
PRUint32 aState)
|
||||
{
|
||||
SendnotifySecurityChange(aState);
|
||||
SendNotifySecurityChange(aState);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -534,7 +534,7 @@ TabChild::OnLocationChange(nsIWebProgress *aWebProgress,
|
||||
NS_ENSURE_ARG_POINTER(aLocation);
|
||||
nsCString uri;
|
||||
aLocation->GetSpec(uri);
|
||||
SendnotifyLocationChange(uri);
|
||||
SendNotifyLocationChange(uri);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -546,7 +546,7 @@ TabChild::OnProgressChange64(nsIWebProgress *aWebProgress,
|
||||
PRInt64 aCurTotalProgress,
|
||||
PRInt64 aMaxTotalProgress)
|
||||
{
|
||||
SendnotifyProgressChange(aCurSelfProgress, aMaxSelfProgress,
|
||||
SendNotifyProgressChange(aCurSelfProgress, aMaxSelfProgress,
|
||||
aCurTotalProgress, aMaxTotalProgress);
|
||||
return NS_OK;
|
||||
}
|
||||
@ -561,7 +561,7 @@ TabChild::OnRefreshAttempted(nsIWebProgress *aWebProgress,
|
||||
aURI->GetSpec(uri);
|
||||
bool sameURL = aSameURL;
|
||||
bool refreshAllowed;
|
||||
SendrefreshAttempted(uri, aMillis, sameURL, &refreshAllowed);
|
||||
SendRefreshAttempted(uri, aMillis, sameURL, &refreshAllowed);
|
||||
*aRefreshAllowed = refreshAllowed;
|
||||
return NS_OK;
|
||||
}
|
||||
@ -569,7 +569,7 @@ TabChild::OnRefreshAttempted(nsIWebProgress *aWebProgress,
|
||||
|
||||
|
||||
bool
|
||||
TabChild::RecvloadURL(const nsCString& uri)
|
||||
TabChild::RecvLoadURL(const nsCString& uri)
|
||||
{
|
||||
printf("loading %s, %d\n", uri.get(), NS_IsMainThread());
|
||||
|
||||
@ -584,10 +584,10 @@ TabChild::RecvloadURL(const nsCString& uri)
|
||||
}
|
||||
|
||||
bool
|
||||
TabChild::Recvmove(const PRUint32& x,
|
||||
const PRUint32& y,
|
||||
const PRUint32& width,
|
||||
const PRUint32& height)
|
||||
TabChild::RecvMove(const PRUint32& x,
|
||||
const PRUint32& y,
|
||||
const PRUint32& width,
|
||||
const PRUint32& height)
|
||||
{
|
||||
printf("[TabChild] MOVE to (x,y)=(%ud, %ud), (w,h)= (%ud, %ud)\n",
|
||||
x, y, width, height);
|
||||
@ -598,7 +598,7 @@ TabChild::Recvmove(const PRUint32& x,
|
||||
}
|
||||
|
||||
bool
|
||||
TabChild::Recvactivate()
|
||||
TabChild::RecvActivate()
|
||||
{
|
||||
nsCOMPtr<nsIWebBrowserFocus> browser = do_QueryInterface(mWebNav);
|
||||
browser->Activate();
|
||||
@ -606,13 +606,13 @@ TabChild::Recvactivate()
|
||||
}
|
||||
|
||||
bool
|
||||
TabChild::RecvsendMouseEvent(const nsString& aType,
|
||||
const PRInt32& aX,
|
||||
const PRInt32& aY,
|
||||
const PRInt32& aButton,
|
||||
const PRInt32& aClickCount,
|
||||
const PRInt32& aModifiers,
|
||||
const bool& aIgnoreRootScrollFrame)
|
||||
TabChild::RecvMouseEvent(const nsString& aType,
|
||||
const float& aX,
|
||||
const float& aY,
|
||||
const PRInt32& aButton,
|
||||
const PRInt32& aClickCount,
|
||||
const PRInt32& aModifiers,
|
||||
const bool& aIgnoreRootScrollFrame)
|
||||
{
|
||||
nsCOMPtr<nsPIDOMWindow> window = do_GetInterface(mWebNav);
|
||||
nsCOMPtr<nsIDOMWindowUtils> utils = do_GetInterface(window);
|
||||
@ -623,11 +623,11 @@ TabChild::RecvsendMouseEvent(const nsString& aType,
|
||||
}
|
||||
|
||||
bool
|
||||
TabChild::RecvsendKeyEvent(const nsString& aType,
|
||||
const PRInt32& aKeyCode,
|
||||
const PRInt32& aCharCode,
|
||||
const PRInt32& aModifiers,
|
||||
const bool& aPreventDefault)
|
||||
TabChild::RecvKeyEvent(const nsString& aType,
|
||||
const PRInt32& aKeyCode,
|
||||
const PRInt32& aCharCode,
|
||||
const PRInt32& aModifiers,
|
||||
const bool& aPreventDefault)
|
||||
{
|
||||
nsCOMPtr<nsPIDOMWindow> window = do_GetInterface(mWebNav);
|
||||
nsCOMPtr<nsIDOMWindowUtils> utils = do_GetInterface(window);
|
||||
@ -846,7 +846,7 @@ TabChild::DeallocPGeolocationRequest(PGeolocationRequestChild* actor)
|
||||
}
|
||||
|
||||
bool
|
||||
TabChild::RecvactivateFrameEvent(const nsString& aType, const bool& capture)
|
||||
TabChild::RecvActivateFrameEvent(const nsString& aType, const bool& capture)
|
||||
{
|
||||
nsCOMPtr<nsPIDOMWindow> window = do_GetInterface(mWebNav);
|
||||
NS_ENSURE_TRUE(window, true);
|
||||
@ -860,7 +860,7 @@ TabChild::RecvactivateFrameEvent(const nsString& aType, const bool& capture)
|
||||
}
|
||||
|
||||
bool
|
||||
TabChild::RecvloadRemoteScript(const nsString& aURL)
|
||||
TabChild::RecvLoadRemoteScript(const nsString& aURL)
|
||||
{
|
||||
nsCString url = NS_ConvertUTF16toUTF8(aURL);
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
@ -915,8 +915,8 @@ TabChild::RecvloadRemoteScript(const nsString& aURL)
|
||||
}
|
||||
|
||||
bool
|
||||
TabChild::RecvsendAsyncMessageToChild(const nsString& aMessage,
|
||||
const nsString& aJSON)
|
||||
TabChild::RecvAsyncMessage(const nsString& aMessage,
|
||||
const nsString& aJSON)
|
||||
{
|
||||
if (mTabChildGlobal) {
|
||||
static_cast<nsFrameMessageManager*>(mTabChildGlobal->mMessageManager.get())->
|
||||
@ -1010,24 +1010,24 @@ TabChild::InitTabChildGlobal()
|
||||
return true;
|
||||
}
|
||||
|
||||
static
|
||||
bool SendSyncMessageToParent(void* aCallbackData,
|
||||
const nsAString& aMessage,
|
||||
const nsAString& aJSON,
|
||||
nsTArray<nsString>* aJSONRetVal)
|
||||
static bool
|
||||
SendSyncMessageToParent(void* aCallbackData,
|
||||
const nsAString& aMessage,
|
||||
const nsAString& aJSON,
|
||||
nsTArray<nsString>* aJSONRetVal)
|
||||
{
|
||||
return static_cast<TabChild*>(aCallbackData)->
|
||||
SendsendSyncMessageToParent(nsString(aMessage), nsString(aJSON),
|
||||
aJSONRetVal);
|
||||
SendSyncMessage(nsString(aMessage), nsString(aJSON),
|
||||
aJSONRetVal);
|
||||
}
|
||||
|
||||
static
|
||||
bool SendAsyncMessageToParent(void* aCallbackData,
|
||||
const nsAString& aMessage,
|
||||
const nsAString& aJSON)
|
||||
static bool
|
||||
SendAsyncMessageToParent(void* aCallbackData,
|
||||
const nsAString& aMessage,
|
||||
const nsAString& aJSON)
|
||||
{
|
||||
return static_cast<TabChild*>(aCallbackData)->
|
||||
SendsendAsyncMessageToParent(nsString(aMessage), nsString(aJSON));
|
||||
SendAsyncMessage(nsString(aMessage), nsString(aJSON));
|
||||
}
|
||||
|
||||
TabChildGlobal::TabChildGlobal(TabChild* aTabChild)
|
||||
|
@ -40,7 +40,7 @@
|
||||
#define mozilla_tabs_TabChild_h
|
||||
|
||||
#ifndef _IMPL_NS_LAYOUT
|
||||
#include "mozilla/dom/PIFrameEmbeddingChild.h"
|
||||
#include "mozilla/dom/PBrowserChild.h"
|
||||
#endif
|
||||
#include "nsIWebNavigation.h"
|
||||
#include "nsCOMPtr.h"
|
||||
@ -139,7 +139,7 @@ protected:
|
||||
TabChild* mTabChild;
|
||||
};
|
||||
|
||||
class TabChild : public PIFrameEmbeddingChild,
|
||||
class TabChild : public PBrowserChild,
|
||||
public nsIWebProgressListener2,
|
||||
public nsIWebBrowserChrome2,
|
||||
public nsIEmbeddingSiteWindow2,
|
||||
@ -153,7 +153,7 @@ class TabChild : public PIFrameEmbeddingChild,
|
||||
public:
|
||||
TabChild();
|
||||
virtual ~TabChild();
|
||||
bool destroyWidget();
|
||||
bool DestroyWidget();
|
||||
nsresult Init();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
@ -168,29 +168,29 @@ public:
|
||||
NS_DECL_NSIWINDOWPROVIDER
|
||||
NS_DECL_NSIDIALOGCREATOR
|
||||
|
||||
virtual bool RecvcreateWidget(const MagicWindowHandle& parentWidget);
|
||||
virtual bool RecvloadURL(const nsCString& uri);
|
||||
virtual bool Recvmove(const PRUint32& x,
|
||||
virtual bool RecvCreateWidget(const MagicWindowHandle& parentWidget);
|
||||
virtual bool RecvLoadURL(const nsCString& uri);
|
||||
virtual bool RecvMove(const PRUint32& x,
|
||||
const PRUint32& y,
|
||||
const PRUint32& width,
|
||||
const PRUint32& height);
|
||||
virtual bool Recvactivate();
|
||||
virtual bool RecvsendMouseEvent(const nsString& aType,
|
||||
const PRInt32& aX,
|
||||
const PRInt32& aY,
|
||||
const PRInt32& aButton,
|
||||
const PRInt32& aClickCount,
|
||||
const PRInt32& aModifiers,
|
||||
const bool& aIgnoreRootScrollFrame);
|
||||
virtual bool RecvsendKeyEvent(const nsString& aType,
|
||||
const PRInt32& aKeyCode,
|
||||
const PRInt32& aCharCode,
|
||||
const PRInt32& aModifiers,
|
||||
const bool& aPreventDefault);
|
||||
virtual bool RecvactivateFrameEvent(const nsString& aType, const bool& capture);
|
||||
virtual bool RecvloadRemoteScript(const nsString& aURL);
|
||||
virtual bool RecvsendAsyncMessageToChild(const nsString& aMessage,
|
||||
const nsString& aJSON);
|
||||
virtual bool RecvActivate();
|
||||
virtual bool RecvMouseEvent(const nsString& aType,
|
||||
const float& aX,
|
||||
const float& aY,
|
||||
const PRInt32& aButton,
|
||||
const PRInt32& aClickCount,
|
||||
const PRInt32& aModifiers,
|
||||
const bool& aIgnoreRootScrollFrame);
|
||||
virtual bool RecvKeyEvent(const nsString& aType,
|
||||
const PRInt32& aKeyCode,
|
||||
const PRInt32& aCharCode,
|
||||
const PRInt32& aModifiers,
|
||||
const bool& aPreventDefault);
|
||||
virtual bool RecvActivateFrameEvent(const nsString& aType, const bool& capture);
|
||||
virtual bool RecvLoadRemoteScript(const nsString& aURL);
|
||||
virtual bool RecvAsyncMessage(const nsString& aMessage,
|
||||
const nsString& aJSON);
|
||||
virtual mozilla::ipc::PDocumentRendererChild* AllocPDocumentRenderer(
|
||||
const PRInt32& x,
|
||||
const PRInt32& y,
|
||||
@ -281,15 +281,10 @@ private:
|
||||
bool InitTabChildGlobal();
|
||||
|
||||
nsCOMPtr<nsIWebNavigation> mWebNav;
|
||||
|
||||
nsCOMPtr<nsIXPConnectJSObjectHolder> mRootGlobal;
|
||||
|
||||
JSContext* mCx;
|
||||
|
||||
nsCOMPtr<nsIChannel> mChannel;
|
||||
|
||||
TabChildGlobal* mTabChildGlobal;
|
||||
|
||||
nsCOMPtr<nsIPrincipal> mPrincipal;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(TabChild);
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include "mozilla/ipc/DocumentRendererParent.h"
|
||||
#include "mozilla/ipc/DocumentRendererShmemParent.h"
|
||||
#include "mozilla/ipc/DocumentRendererNativeIDParent.h"
|
||||
#include "mozilla/dom/ContentProcessParent.h"
|
||||
#include "mozilla/dom/ContentParent.h"
|
||||
|
||||
#include "nsIURI.h"
|
||||
#include "nsFocusManager.h"
|
||||
@ -68,10 +68,12 @@
|
||||
#include "nsIPromptFactory.h"
|
||||
#include "nsIContent.h"
|
||||
|
||||
#include "mozilla/unused.h"
|
||||
|
||||
using mozilla::ipc::DocumentRendererParent;
|
||||
using mozilla::ipc::DocumentRendererShmemParent;
|
||||
using mozilla::ipc::DocumentRendererNativeIDParent;
|
||||
using mozilla::dom::ContentProcessParent;
|
||||
using mozilla::dom::ContentParent;
|
||||
|
||||
// The flags passed by the webProgress notifications are 16 bits shifted
|
||||
// from the ones registered by webProgressListeners.
|
||||
@ -103,13 +105,13 @@ TabParent::ActorDestroy(ActorDestroyReason why)
|
||||
}
|
||||
|
||||
bool
|
||||
TabParent::RecvmoveFocus(const bool& aForward)
|
||||
TabParent::RecvMoveFocus(const bool& aForward)
|
||||
{
|
||||
nsCOMPtr<nsIFocusManager> fm = do_GetService(FOCUSMANAGER_CONTRACTID);
|
||||
if (fm) {
|
||||
nsCOMPtr<nsIDOMElement> dummy;
|
||||
PRUint32 type = aForward ? nsIFocusManager::MOVEFOCUS_FORWARD
|
||||
: nsIFocusManager::MOVEFOCUS_BACKWARD;
|
||||
PRUint32 type = aForward ? PRUint32(nsIFocusManager::MOVEFOCUS_FORWARD)
|
||||
: PRUint32(nsIFocusManager::MOVEFOCUS_BACKWARD);
|
||||
fm->MoveFocus(nsnull, mFrameElement, type, nsIFocusManager::FLAG_BYKEY,
|
||||
getter_AddRefs(dummy));
|
||||
}
|
||||
@ -117,7 +119,7 @@ TabParent::RecvmoveFocus(const bool& aForward)
|
||||
}
|
||||
|
||||
bool
|
||||
TabParent::RecvsendEvent(const RemoteDOMEvent& aEvent)
|
||||
TabParent::RecvEvent(const RemoteDOMEvent& aEvent)
|
||||
{
|
||||
nsCOMPtr<nsIDOMEvent> event = do_QueryInterface(aEvent.mEvent);
|
||||
NS_ENSURE_TRUE(event, true);
|
||||
@ -131,7 +133,7 @@ TabParent::RecvsendEvent(const RemoteDOMEvent& aEvent)
|
||||
}
|
||||
|
||||
bool
|
||||
TabParent::RecvnotifyProgressChange(const PRInt64& aProgress,
|
||||
TabParent::RecvNotifyProgressChange(const PRInt64& aProgress,
|
||||
const PRInt64& aProgressMax,
|
||||
const PRInt64& aTotalProgress,
|
||||
const PRInt64& aMaxTotalProgress)
|
||||
@ -175,7 +177,7 @@ TabParent::RecvnotifyProgressChange(const PRInt64& aProgress,
|
||||
}
|
||||
|
||||
bool
|
||||
TabParent::RecvnotifyStateChange(const PRUint32& aStateFlags,
|
||||
TabParent::RecvNotifyStateChange(const PRUint32& aStateFlags,
|
||||
const nsresult& aStatus)
|
||||
{
|
||||
/*
|
||||
@ -215,7 +217,7 @@ TabParent::RecvnotifyStateChange(const PRUint32& aStateFlags,
|
||||
}
|
||||
|
||||
bool
|
||||
TabParent::RecvnotifyLocationChange(const nsCString& aUri)
|
||||
TabParent::RecvNotifyLocationChange(const nsCString& aUri)
|
||||
{
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
nsresult rv = NS_NewURI(getter_AddRefs(uri), aUri);
|
||||
@ -252,7 +254,7 @@ TabParent::RecvnotifyLocationChange(const nsCString& aUri)
|
||||
}
|
||||
|
||||
bool
|
||||
TabParent::RecvnotifyStatusChange(const nsresult& status,
|
||||
TabParent::RecvNotifyStatusChange(const nsresult& status,
|
||||
const nsString& message)
|
||||
{
|
||||
/*
|
||||
@ -284,7 +286,7 @@ TabParent::RecvnotifyStatusChange(const nsresult& status,
|
||||
}
|
||||
|
||||
bool
|
||||
TabParent::RecvnotifySecurityChange(const PRUint32& aState)
|
||||
TabParent::RecvNotifySecurityChange(const PRUint32& aState)
|
||||
{
|
||||
/*
|
||||
* First notify any listeners of the new state info...
|
||||
@ -316,7 +318,7 @@ TabParent::RecvnotifySecurityChange(const PRUint32& aState)
|
||||
}
|
||||
|
||||
bool
|
||||
TabParent::RecvrefreshAttempted(const nsCString& aURI, const PRInt32& aMillis,
|
||||
TabParent::RecvRefreshAttempted(const nsCString& aURI, const PRInt32& aMillis,
|
||||
const bool& aSameURI, bool* refreshAllowed)
|
||||
{
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
@ -365,7 +367,7 @@ TabParent::RecvrefreshAttempted(const nsCString& aURI, const PRInt32& aMillis,
|
||||
}
|
||||
|
||||
bool
|
||||
TabParent::AnswercreateWindow(PIFrameEmbeddingParent** retval)
|
||||
TabParent::AnswerCreateWindow(PBrowserParent** retval)
|
||||
{
|
||||
if (!mBrowserDOMWindow) {
|
||||
return false;
|
||||
@ -387,7 +389,7 @@ TabParent::AnswercreateWindow(PIFrameEmbeddingParent** retval)
|
||||
return false;
|
||||
}
|
||||
|
||||
*retval = frameLoader->GetChildProcess();
|
||||
*retval = frameLoader->GetRemoteBrowser();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -397,19 +399,19 @@ TabParent::LoadURL(nsIURI* aURI)
|
||||
nsCString spec;
|
||||
aURI->GetSpec(spec);
|
||||
|
||||
SendloadURL(spec);
|
||||
unused << SendLoadURL(spec);
|
||||
}
|
||||
|
||||
void
|
||||
TabParent::Move(PRUint32 x, PRUint32 y, PRUint32 width, PRUint32 height)
|
||||
{
|
||||
Sendmove(x, y, width, height);
|
||||
unused << SendMove(x, y, width, height);
|
||||
}
|
||||
|
||||
void
|
||||
TabParent::Activate()
|
||||
{
|
||||
Sendactivate();
|
||||
unused << SendActivate();
|
||||
}
|
||||
|
||||
mozilla::ipc::PDocumentRendererParent*
|
||||
@ -477,8 +479,9 @@ TabParent::SendMouseEvent(const nsAString& aType, float aX, float aY,
|
||||
PRInt32 aButton, PRInt32 aClickCount,
|
||||
PRInt32 aModifiers, PRBool aIgnoreRootScrollFrame)
|
||||
{
|
||||
SendsendMouseEvent(nsString(aType), aX, aY, aButton, aClickCount,
|
||||
aModifiers, aIgnoreRootScrollFrame);
|
||||
unused << PBrowserParent::SendMouseEvent(nsString(aType), aX, aY,
|
||||
aButton, aClickCount,
|
||||
aModifiers, aIgnoreRootScrollFrame);
|
||||
}
|
||||
|
||||
void
|
||||
@ -488,21 +491,21 @@ TabParent::SendKeyEvent(const nsAString& aType,
|
||||
PRInt32 aModifiers,
|
||||
PRBool aPreventDefault)
|
||||
{
|
||||
SendsendKeyEvent(nsString(aType), aKeyCode, aCharCode, aModifiers,
|
||||
aPreventDefault);
|
||||
unused << PBrowserParent::SendKeyEvent(nsString(aType), aKeyCode, aCharCode,
|
||||
aModifiers, aPreventDefault);
|
||||
}
|
||||
|
||||
bool
|
||||
TabParent::RecvsendSyncMessageToParent(const nsString& aMessage,
|
||||
const nsString& aJSON,
|
||||
nsTArray<nsString>* aJSONRetVal)
|
||||
TabParent::RecvSyncMessage(const nsString& aMessage,
|
||||
const nsString& aJSON,
|
||||
nsTArray<nsString>* aJSONRetVal)
|
||||
{
|
||||
return ReceiveMessage(aMessage, PR_TRUE, aJSON, aJSONRetVal);
|
||||
}
|
||||
|
||||
bool
|
||||
TabParent::RecvsendAsyncMessageToParent(const nsString& aMessage,
|
||||
const nsString& aJSON)
|
||||
TabParent::RecvAsyncMessage(const nsString& aMessage,
|
||||
const nsString& aJSON)
|
||||
{
|
||||
return ReceiveMessage(aMessage, PR_FALSE, aJSON, nsnull);
|
||||
}
|
||||
@ -551,8 +554,6 @@ nsresult
|
||||
TabParent::AddProgressListener(nsIWebProgressListener* aListener,
|
||||
PRUint32 aNotifyMask)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
if (GetListenerInfo(aListener)) {
|
||||
// The listener is already registered!
|
||||
return NS_ERROR_FAILURE;
|
||||
@ -620,9 +621,6 @@ NS_IMETHODIMP
|
||||
TabParent::GetAuthPrompt(PRUint32 aPromptReason, const nsIID& iid,
|
||||
void** aResult)
|
||||
{
|
||||
// a priority prompt request will override a false mAllowAuth setting
|
||||
PRBool priorityPrompt = (aPromptReason == PROMPT_PROXY);
|
||||
|
||||
// we're either allowing auth, or it's a proxy request
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIPromptFactory> wwatch =
|
||||
@ -703,7 +701,8 @@ TabParent::HandleDelayedDialogs()
|
||||
nsTArray<PRInt32> intParams;
|
||||
nsTArray<nsString> stringParams;
|
||||
TabChild::ParamsToArrays(params, intParams, stringParams);
|
||||
PContentDialogParent::Send__delete__(dialog, intParams, stringParams);
|
||||
unused << PContentDialogParent::Send__delete__(dialog,
|
||||
intParams, stringParams);
|
||||
}
|
||||
}
|
||||
if (ShouldDelayDialogs() && mDelayedDialogs.Length()) {
|
||||
|
@ -39,7 +39,7 @@
|
||||
#ifndef mozilla_tabs_TabParent_h
|
||||
#define mozilla_tabs_TabParent_h
|
||||
|
||||
#include "mozilla/dom/PIFrameEmbeddingParent.h"
|
||||
#include "mozilla/dom/PBrowserParent.h"
|
||||
#include "mozilla/dom/PContentDialogParent.h"
|
||||
#include "mozilla/ipc/GeckoChildProcessHost.h"
|
||||
|
||||
@ -87,7 +87,7 @@ bool operator==(const TabParentListenerInfo& lhs, const TabParentListenerInfo& r
|
||||
|
||||
class ContentDialogParent : public PContentDialogParent {};
|
||||
|
||||
class TabParent : public PIFrameEmbeddingParent
|
||||
class TabParent : public PBrowserParent
|
||||
, public nsITabParent
|
||||
, public nsIWebProgress
|
||||
, public nsIAuthPromptProvider
|
||||
@ -100,29 +100,29 @@ public:
|
||||
mBrowserDOMWindow = aBrowserDOMWindow;
|
||||
}
|
||||
|
||||
virtual bool RecvmoveFocus(const bool& aForward);
|
||||
virtual bool RecvsendEvent(const RemoteDOMEvent& aEvent);
|
||||
virtual bool RecvnotifyProgressChange(const PRInt64& aProgress,
|
||||
virtual bool RecvMoveFocus(const bool& aForward);
|
||||
virtual bool RecvEvent(const RemoteDOMEvent& aEvent);
|
||||
virtual bool RecvNotifyProgressChange(const PRInt64& aProgress,
|
||||
const PRInt64& aProgressMax,
|
||||
const PRInt64& aTotalProgress,
|
||||
const PRInt64& aMaxTotalProgress);
|
||||
virtual bool RecvnotifyStateChange(const PRUint32& aStateFlags,
|
||||
virtual bool RecvNotifyStateChange(const PRUint32& aStateFlags,
|
||||
const nsresult& aStatus);
|
||||
virtual bool RecvnotifyLocationChange(const nsCString& aUri);
|
||||
virtual bool RecvnotifyStatusChange(const nsresult& status,
|
||||
virtual bool RecvNotifyLocationChange(const nsCString& aUri);
|
||||
virtual bool RecvNotifyStatusChange(const nsresult& status,
|
||||
const nsString& message);
|
||||
virtual bool RecvnotifySecurityChange(const PRUint32& aState);
|
||||
virtual bool RecvrefreshAttempted(const nsCString& aURI,
|
||||
virtual bool RecvNotifySecurityChange(const PRUint32& aState);
|
||||
virtual bool RecvRefreshAttempted(const nsCString& aURI,
|
||||
const PRInt32& aMillis,
|
||||
const bool& aSameURI,
|
||||
bool* aAllowRefresh);
|
||||
|
||||
virtual bool AnswercreateWindow(PIFrameEmbeddingParent** retval);
|
||||
virtual bool RecvsendSyncMessageToParent(const nsString& aMessage,
|
||||
const nsString& aJSON,
|
||||
nsTArray<nsString>* aJSONRetVal);
|
||||
virtual bool RecvsendAsyncMessageToParent(const nsString& aMessage,
|
||||
const nsString& aJSON);
|
||||
virtual bool AnswerCreateWindow(PBrowserParent** retval);
|
||||
virtual bool RecvSyncMessage(const nsString& aMessage,
|
||||
const nsString& aJSON,
|
||||
nsTArray<nsString>* aJSONRetVal);
|
||||
virtual bool RecvAsyncMessage(const nsString& aMessage,
|
||||
const nsString& aJSON);
|
||||
virtual PContentDialogParent* AllocPContentDialog(const PRUint32& aType,
|
||||
const nsCString& aName,
|
||||
const nsCString& aFeatures,
|
||||
|
@ -35,10 +35,10 @@
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
IPDLSRCS = \
|
||||
PContentProcess.ipdl \
|
||||
PIFrameEmbedding.ipdl \
|
||||
PDocumentRenderer.ipdl \
|
||||
PDocumentRendererShmem.ipdl \
|
||||
PDocumentRendererNativeID.ipdl \
|
||||
PBrowser.ipdl \
|
||||
PContent.ipdl \
|
||||
PContentDialog.ipdl \
|
||||
PDocumentRenderer.ipdl \
|
||||
PDocumentRendererNativeID.ipdl \
|
||||
PDocumentRendererShmem.ipdl \
|
||||
$(NULL)
|
||||
|
@ -35,7 +35,7 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
include protocol PIFrameEmbedding;
|
||||
include protocol PBrowser;
|
||||
include "mozilla/net/NeckoMessageUtils.h";
|
||||
|
||||
using IPC::URI;
|
||||
@ -45,7 +45,7 @@ namespace dom {
|
||||
|
||||
protocol PGeolocationRequest
|
||||
{
|
||||
manager PIFrameEmbedding;
|
||||
manager PBrowser;
|
||||
|
||||
parent:
|
||||
prompt();
|
||||
|
@ -38,9 +38,9 @@
|
||||
#include "nsGeolocationOOP.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
|
||||
#include "mozilla/dom/PIFrameEmbeddingChild.h"
|
||||
#include "mozilla/dom/PIFrameEmbeddingParent.h"
|
||||
#include "mozilla/dom/ContentProcessChild.h"
|
||||
#include "mozilla/dom/PBrowserChild.h"
|
||||
#include "mozilla/dom/PBrowserParent.h"
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
#include "nsNetUtil.h"
|
||||
|
||||
#include "nsFrameManager.h"
|
||||
@ -72,6 +72,7 @@
|
||||
#include "nsIPrefBranch2.h"
|
||||
#include "nsIJSContextStack.h"
|
||||
#include "mozilla/Services.h"
|
||||
#include "mozilla/unused.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
@ -94,6 +95,8 @@
|
||||
// that a window can make.
|
||||
#define MAX_GEO_REQUESTS_PER_WINDOW 1500
|
||||
|
||||
using mozilla::unused; // <snicker>
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// nsDOMGeoPositionError
|
||||
////////////////////////////////////////////////////
|
||||
@ -1108,7 +1111,7 @@ NS_IMETHODIMP
|
||||
nsGeolocationRequestProxy::Cancel()
|
||||
{
|
||||
NS_ASSERTION(mParent, "No parent for request");
|
||||
(void) mozilla::dom::GeolocationRequestParent::Send__delete__(mParent, false);
|
||||
unused << mozilla::dom::GeolocationRequestParent::Send__delete__(mParent, false);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -1116,7 +1119,7 @@ NS_IMETHODIMP
|
||||
nsGeolocationRequestProxy::Allow()
|
||||
{
|
||||
NS_ASSERTION(mParent, "No parent for request");
|
||||
(void) mozilla::dom::GeolocationRequestParent::Send__delete__(mParent, true);
|
||||
unused << mozilla::dom::GeolocationRequestParent::Send__delete__(mParent, true);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifdef MOZ_IPC
|
||||
#include "mozilla/dom/ContentProcessChild.h"
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
#endif
|
||||
#include "nsPermissionManager.h"
|
||||
#include "nsPermission.h"
|
||||
@ -60,6 +60,8 @@
|
||||
#include "nsXULAppAPI.h"
|
||||
|
||||
#ifdef MOZ_IPC
|
||||
using mozilla::dom::ContentChild;
|
||||
|
||||
static PRBool
|
||||
IsChildProcess()
|
||||
{
|
||||
@ -70,12 +72,11 @@ IsChildProcess()
|
||||
* @returns The child process object, or if we are not in the child
|
||||
* process, nsnull.
|
||||
*/
|
||||
static mozilla::dom::ContentProcessChild*
|
||||
static ContentChild*
|
||||
ChildProcess()
|
||||
{
|
||||
if (IsChildProcess()) {
|
||||
mozilla::dom::ContentProcessChild* cpc =
|
||||
mozilla::dom::ContentProcessChild::GetSingleton();
|
||||
ContentChild* cpc = ContentChild::GetSingleton();
|
||||
if (!cpc)
|
||||
NS_RUNTIMEABORT("Content Process is NULL!");
|
||||
return cpc;
|
||||
@ -591,7 +592,7 @@ nsPermissionManager::TestExactPermission(nsIURI *aURI,
|
||||
PRUint32 *aPermission)
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
mozilla::dom::ContentProcessChild* cpc = ChildProcess();
|
||||
ContentChild* cpc = ChildProcess();
|
||||
if (cpc) {
|
||||
return cpc->SendTestPermission(IPC::URI(aURI), nsDependentCString(aType), PR_TRUE,
|
||||
aPermission) ? NS_OK : NS_ERROR_FAILURE;
|
||||
@ -606,7 +607,7 @@ nsPermissionManager::TestPermission(nsIURI *aURI,
|
||||
PRUint32 *aPermission)
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
mozilla::dom::ContentProcessChild* cpc = ChildProcess();
|
||||
ContentChild* cpc = ChildProcess();
|
||||
if (cpc) {
|
||||
return cpc->SendTestPermission(IPC::URI(aURI), nsDependentCString(aType), PR_FALSE,
|
||||
aPermission) ? NS_OK : NS_ERROR_FAILURE;
|
||||
|
@ -35,7 +35,7 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
include protocol PContentProcess;
|
||||
include protocol PContent;
|
||||
include protocol PTestShellCommand;
|
||||
include protocol PContextWrapper;
|
||||
|
||||
@ -44,7 +44,7 @@ namespace ipc {
|
||||
|
||||
rpc protocol PTestShell
|
||||
{
|
||||
manager PContentProcess;
|
||||
manager PContent;
|
||||
|
||||
manages PTestShellCommand;
|
||||
manages PContextWrapper;
|
||||
|
@ -35,7 +35,7 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "TestShellParent.h"
|
||||
#include "mozilla/dom/ContentProcessParent.h"
|
||||
#include "mozilla/dom/ContentParent.h"
|
||||
#include "mozilla/jsipc/ContextWrapperParent.h"
|
||||
|
||||
#include "nsAutoPtr.h"
|
||||
@ -43,7 +43,7 @@
|
||||
using mozilla::ipc::TestShellParent;
|
||||
using mozilla::ipc::TestShellCommandParent;
|
||||
using mozilla::ipc::PTestShellCommandParent;
|
||||
using mozilla::dom::ContentProcessParent;
|
||||
using mozilla::dom::ContentParent;
|
||||
using mozilla::jsipc::PContextWrapperParent;
|
||||
using mozilla::jsipc::ContextWrapperParent;
|
||||
|
||||
@ -74,8 +74,7 @@ TestShellParent::CommandDone(TestShellCommandParent* command,
|
||||
PContextWrapperParent*
|
||||
TestShellParent::AllocPContextWrapper()
|
||||
{
|
||||
ContentProcessParent* cpp =
|
||||
static_cast<ContentProcessParent*>(Manager());
|
||||
ContentParent* cpp = static_cast<ContentParent*>(Manager());
|
||||
return new ContextWrapperParent(cpp);
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include "mozilla/jsipc/ObjectWrapperParent.h"
|
||||
#include "mozilla/jsipc/CPOWTypes.h"
|
||||
|
||||
#include "mozilla/dom/ContentProcessParent.h"
|
||||
#include "mozilla/dom/ContentParent.h"
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "nsAutoJSValHolder.h"
|
||||
@ -53,15 +53,15 @@
|
||||
namespace mozilla {
|
||||
namespace jsipc {
|
||||
|
||||
using mozilla::dom::ContentProcessParent;
|
||||
using mozilla::dom::ContentParent;
|
||||
|
||||
class ContextWrapperParent
|
||||
: public PContextWrapperParent
|
||||
{
|
||||
public:
|
||||
|
||||
ContextWrapperParent(ContentProcessParent* cpp)
|
||||
: mContentProcess(cpp)
|
||||
ContextWrapperParent(ContentParent* cpp)
|
||||
: mContent(cpp)
|
||||
, mGlobal(NULL)
|
||||
{}
|
||||
|
||||
@ -78,12 +78,12 @@ public:
|
||||
}
|
||||
|
||||
bool RequestRunToCompletion() {
|
||||
return mContentProcess->RequestRunToCompletion();
|
||||
return mContent->RequestRunToCompletion();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
ContentProcessParent* mContentProcess;
|
||||
ContentParent* mContent;
|
||||
ObjectWrapperParent* mGlobal;
|
||||
nsAutoJSValHolder mGlobalHolder;
|
||||
|
||||
|
@ -501,7 +501,7 @@ ObjectWrapperChild::AnswerNewEnumerateNext(const JSVariant& in_state,
|
||||
if (!strIds || !JS_GetReservedSlot(cx, state, sNextIdIndexSlot, &v))
|
||||
return false;
|
||||
|
||||
jsint i = JSVAL_TO_INT(v);
|
||||
jsuint i = JSVAL_TO_INT(v);
|
||||
NS_ASSERTION(i >= 0, "Index of next jsid negative?");
|
||||
NS_ASSERTION(i <= strIds->Length(), "Index of next jsid too large?");
|
||||
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include "mozilla/jsipc/ObjectWrapperParent.h"
|
||||
#include "mozilla/jsipc/ContextWrapperParent.h"
|
||||
#include "mozilla/jsipc/CPOWTypes.h"
|
||||
#include "mozilla/unused.h"
|
||||
|
||||
#include "jsobj.h"
|
||||
#include "jsfun.h"
|
||||
@ -640,7 +641,7 @@ ObjectWrapperParent::CPOW_Finalize(JSContext* cx, JSObject* obj)
|
||||
ObjectWrapperParent* self = Unwrap(cx, obj);
|
||||
if (self) {
|
||||
self->mObj = NULL;
|
||||
ObjectWrapperParent::Send__delete__(self);
|
||||
unused << ObjectWrapperParent::Send__delete__(self);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifdef MOZ_IPC
|
||||
#include "mozilla/dom/ContentProcessChild.h"
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
#endif
|
||||
|
||||
@ -86,13 +86,13 @@ static nsresult
|
||||
NotifyObserver(const char *newpref, void *data);
|
||||
|
||||
#ifdef MOZ_IPC
|
||||
using mozilla::dom::ContentProcessChild;
|
||||
using mozilla::dom::ContentChild;
|
||||
|
||||
static ContentProcessChild*
|
||||
GetContentProcessChild()
|
||||
static ContentChild*
|
||||
GetContentChild()
|
||||
{
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
ContentProcessChild* cpc = ContentProcessChild::GetSingleton();
|
||||
ContentChild* cpc = ContentChild::GetSingleton();
|
||||
if (!cpc) {
|
||||
NS_RUNTIMEABORT("Content Protocol is NULL! We're going to crash!");
|
||||
}
|
||||
@ -162,7 +162,7 @@ NS_IMETHODIMP nsPrefBranch::GetRoot(char **aRoot)
|
||||
NS_IMETHODIMP nsPrefBranch::GetPrefType(const char *aPrefName, PRInt32 *_retval)
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
if (ContentProcessChild* cpc = GetContentProcessChild()) {
|
||||
if (ContentChild* cpc = GetContentChild()) {
|
||||
nsresult rv = NS_ERROR_NOT_AVAILABLE;
|
||||
PRInt32 retval;
|
||||
cpc->SendGetPrefType(nsDependentCString(getPrefName(aPrefName)), &retval, &rv);
|
||||
@ -180,7 +180,7 @@ NS_IMETHODIMP nsPrefBranch::GetPrefType(const char *aPrefName, PRInt32 *_retval)
|
||||
NS_IMETHODIMP nsPrefBranch::GetBoolPref(const char *aPrefName, PRBool *_retval)
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
if (ContentProcessChild* cpc = GetContentProcessChild()) {
|
||||
if (ContentChild* cpc = GetContentChild()) {
|
||||
nsresult rv = NS_ERROR_NOT_AVAILABLE;
|
||||
PRBool retval;
|
||||
cpc->SendGetBoolPref(nsDependentCString(getPrefName(aPrefName)), &retval, &rv);
|
||||
@ -197,7 +197,7 @@ NS_IMETHODIMP nsPrefBranch::GetBoolPref(const char *aPrefName, PRBool *_retval)
|
||||
NS_IMETHODIMP nsPrefBranch::SetBoolPref(const char *aPrefName, PRInt32 aValue)
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
if (GetContentProcessChild()) {
|
||||
if (GetContentChild()) {
|
||||
NS_ERROR("cannot set pref from content process");
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
@ -210,7 +210,7 @@ NS_IMETHODIMP nsPrefBranch::SetBoolPref(const char *aPrefName, PRInt32 aValue)
|
||||
NS_IMETHODIMP nsPrefBranch::GetCharPref(const char *aPrefName, char **_retval)
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
if (ContentProcessChild* cpc = GetContentProcessChild()) {
|
||||
if (ContentChild* cpc = GetContentChild()) {
|
||||
nsresult rv = NS_ERROR_NOT_AVAILABLE;
|
||||
nsCAutoString prefValue;
|
||||
cpc->SendGetCharPref(nsDependentCString(getPrefName(aPrefName)),
|
||||
@ -229,7 +229,7 @@ NS_IMETHODIMP nsPrefBranch::GetCharPref(const char *aPrefName, char **_retval)
|
||||
NS_IMETHODIMP nsPrefBranch::SetCharPref(const char *aPrefName, const char *aValue)
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
if (GetContentProcessChild()) {
|
||||
if (GetContentChild()) {
|
||||
NS_ERROR("cannot set pref from content process");
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
@ -242,7 +242,7 @@ NS_IMETHODIMP nsPrefBranch::SetCharPref(const char *aPrefName, const char *aValu
|
||||
NS_IMETHODIMP nsPrefBranch::GetIntPref(const char *aPrefName, PRInt32 *_retval)
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
if (ContentProcessChild* cpc = GetContentProcessChild()) {
|
||||
if (ContentChild* cpc = GetContentChild()) {
|
||||
nsresult rv = NS_ERROR_NOT_AVAILABLE;
|
||||
PRInt32 retval;
|
||||
cpc->SendGetIntPref(nsDependentCString(getPrefName(aPrefName)), &retval, &rv);
|
||||
@ -259,7 +259,7 @@ NS_IMETHODIMP nsPrefBranch::GetIntPref(const char *aPrefName, PRInt32 *_retval)
|
||||
NS_IMETHODIMP nsPrefBranch::SetIntPref(const char *aPrefName, PRInt32 aValue)
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
if (GetContentProcessChild()) {
|
||||
if (GetContentChild()) {
|
||||
NS_ERROR("cannot set pref from content process");
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
@ -280,7 +280,7 @@ NS_IMETHODIMP nsPrefBranch::GetComplexValue(const char *aPrefName, const nsIID &
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
#ifdef MOZ_IPC
|
||||
if (ContentProcessChild* cpc = GetContentProcessChild()) {
|
||||
if (ContentChild* cpc = GetContentChild()) {
|
||||
nsAutoString prefValue;
|
||||
|
||||
rv = NS_ERROR_NOT_AVAILABLE;
|
||||
@ -367,7 +367,7 @@ NS_IMETHODIMP nsPrefBranch::GetComplexValue(const char *aPrefName, const nsIID &
|
||||
|
||||
if (aType.Equals(NS_GET_IID(nsILocalFile))) {
|
||||
#ifdef MOZ_IPC
|
||||
if (GetContentProcessChild()) {
|
||||
if (GetContentChild()) {
|
||||
NS_ERROR("cannot get nsILocalFile pref from content process");
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
@ -387,7 +387,7 @@ NS_IMETHODIMP nsPrefBranch::GetComplexValue(const char *aPrefName, const nsIID &
|
||||
|
||||
if (aType.Equals(NS_GET_IID(nsIRelativeFilePref))) {
|
||||
#ifdef MOZ_IPC
|
||||
if (GetContentProcessChild()) {
|
||||
if (GetContentChild()) {
|
||||
NS_ERROR("cannot get nsIRelativeFilePref from content process");
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
@ -446,7 +446,7 @@ NS_IMETHODIMP nsPrefBranch::GetComplexValue(const char *aPrefName, const nsIID &
|
||||
NS_IMETHODIMP nsPrefBranch::SetComplexValue(const char *aPrefName, const nsIID & aType, nsISupports *aValue)
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
if (GetContentProcessChild()) {
|
||||
if (GetContentChild()) {
|
||||
NS_ERROR("cannot set pref from content process");
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
@ -535,7 +535,7 @@ NS_IMETHODIMP nsPrefBranch::SetComplexValue(const char *aPrefName, const nsIID &
|
||||
NS_IMETHODIMP nsPrefBranch::ClearUserPref(const char *aPrefName)
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
if (GetContentProcessChild()) {
|
||||
if (GetContentChild()) {
|
||||
NS_ERROR("cannot set pref from content process");
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
@ -550,7 +550,7 @@ NS_IMETHODIMP nsPrefBranch::PrefHasUserValue(const char *aPrefName, PRBool *_ret
|
||||
NS_ENSURE_ARG_POINTER(_retval);
|
||||
|
||||
#ifdef MOZ_IPC
|
||||
if (ContentProcessChild* cpc = GetContentProcessChild()) {
|
||||
if (ContentChild* cpc = GetContentChild()) {
|
||||
nsresult rv = NS_ERROR_NOT_AVAILABLE;
|
||||
PRBool retval;
|
||||
cpc->SendPrefHasUserValue(nsDependentCString(getPrefName(aPrefName)), &retval, &rv);
|
||||
@ -568,7 +568,7 @@ NS_IMETHODIMP nsPrefBranch::PrefHasUserValue(const char *aPrefName, PRBool *_ret
|
||||
NS_IMETHODIMP nsPrefBranch::LockPref(const char *aPrefName)
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
if (GetContentProcessChild()) {
|
||||
if (GetContentChild()) {
|
||||
NS_ERROR("cannot lock pref from content process");
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
@ -583,7 +583,7 @@ NS_IMETHODIMP nsPrefBranch::PrefIsLocked(const char *aPrefName, PRBool *_retval)
|
||||
NS_ENSURE_ARG_POINTER(_retval);
|
||||
|
||||
#ifdef MOZ_IPC
|
||||
if (ContentProcessChild* cpc = GetContentProcessChild()) {
|
||||
if (ContentChild* cpc = GetContentChild()) {
|
||||
nsresult rv = NS_ERROR_NOT_AVAILABLE;
|
||||
PRBool retval;
|
||||
cpc->SendPrefIsLocked(nsDependentCString(getPrefName(aPrefName)), &retval, &rv);
|
||||
@ -601,7 +601,7 @@ NS_IMETHODIMP nsPrefBranch::PrefIsLocked(const char *aPrefName, PRBool *_retval)
|
||||
NS_IMETHODIMP nsPrefBranch::UnlockPref(const char *aPrefName)
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
if (GetContentProcessChild()) {
|
||||
if (GetContentChild()) {
|
||||
NS_ERROR("cannot unlock pref from content process");
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
@ -620,7 +620,7 @@ NS_IMETHODIMP nsPrefBranch::ResetBranch(const char *aStartingAt)
|
||||
NS_IMETHODIMP nsPrefBranch::DeleteBranch(const char *aStartingAt)
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
if (GetContentProcessChild()) {
|
||||
if (GetContentChild()) {
|
||||
NS_ERROR("cannot set pref from content process");
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
@ -646,7 +646,7 @@ NS_IMETHODIMP nsPrefBranch::GetChildList(const char *aStartingAt, PRUint32 *aCou
|
||||
*aCount = 0;
|
||||
|
||||
#ifdef MOZ_IPC
|
||||
if (ContentProcessChild* cpc = GetContentProcessChild()) {
|
||||
if (ContentChild* cpc = GetContentChild()) {
|
||||
nsresult rv = NS_ERROR_NOT_AVAILABLE;
|
||||
cpc->SendGetChildList(nsDependentCString(getPrefName(aStartingAt)),
|
||||
&prefArray, &rv);
|
||||
@ -709,7 +709,7 @@ NS_IMETHODIMP nsPrefBranch::AddObserver(const char *aDomain, nsIObserver *aObser
|
||||
NS_ENSURE_ARG_POINTER(aObserver);
|
||||
|
||||
#ifdef MOZ_IPC
|
||||
if (ContentProcessChild* cpc = GetContentProcessChild()) {
|
||||
if (ContentChild* cpc = GetContentChild()) {
|
||||
return cpc->AddRemotePrefObserver(nsDependentCString(aDomain), mPrefRoot, aObserver, aHoldWeak);
|
||||
}
|
||||
#endif
|
||||
@ -771,7 +771,7 @@ NS_IMETHODIMP nsPrefBranch::RemoveObserver(const char *aDomain, nsIObserver *aOb
|
||||
#ifdef MOZ_IPC
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
nsresult rv = NS_OK;
|
||||
ContentProcessChild *cpc = ContentProcessChild::GetSingleton();
|
||||
ContentChild *cpc = ContentChild::GetSingleton();
|
||||
// In case cpc doesn't exist here, we're silently returning (instead of
|
||||
// asserting), because the child process is likely to be null
|
||||
// when this is called during xpcom-shutdown.
|
||||
@ -802,7 +802,7 @@ NS_IMETHODIMP nsPrefBranch::Observe(nsISupports *aSubject, const char *aTopic, c
|
||||
static nsresult NotifyObserver(const char *newpref, void *data)
|
||||
{
|
||||
#ifdef MOZ_IPC
|
||||
if (GetContentProcessChild()) {
|
||||
if (GetContentChild()) {
|
||||
// We shouldn't ever get here, since we never register NotifyObserver in the
|
||||
// content process
|
||||
NS_NOTREACHED("Remote prefs observation should be done from the \
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
#include "nsHttp.h"
|
||||
#include "mozilla/net/NeckoChild.h"
|
||||
#include "mozilla/dom/ContentProcessChild.h"
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
#include "mozilla/net/HttpChannelChild.h"
|
||||
#include "mozilla/net/CookieServiceChild.h"
|
||||
|
||||
@ -63,8 +63,8 @@ void NeckoChild::InitNeckoChild()
|
||||
NS_ABORT_IF_FALSE(IsNeckoChild(), "InitNeckoChild called by non-child!");
|
||||
|
||||
if (!gNeckoChild) {
|
||||
mozilla::dom::ContentProcessChild * cpc =
|
||||
mozilla::dom::ContentProcessChild::GetSingleton();
|
||||
mozilla::dom::ContentChild * cpc =
|
||||
mozilla::dom::ContentChild::GetSingleton();
|
||||
NS_ASSERTION(cpc, "Content Protocol is NULL!");
|
||||
gNeckoChild = cpc->SendPNeckoConstructor();
|
||||
NS_ASSERTION(gNeckoChild, "PNecko Protocol init failed!");
|
||||
@ -87,7 +87,7 @@ void NeckoChild::DestroyNeckoChild()
|
||||
}
|
||||
|
||||
PHttpChannelChild*
|
||||
NeckoChild::AllocPHttpChannel(PIFrameEmbeddingChild* iframeEmbedding)
|
||||
NeckoChild::AllocPHttpChannel(PBrowserChild* iframeEmbedding)
|
||||
{
|
||||
// We don't allocate here: see HttpChannelChild::AsyncOpen()
|
||||
NS_RUNTIMEABORT("AllocPHttpChannel should not be called");
|
||||
|
@ -59,7 +59,7 @@ public:
|
||||
static void DestroyNeckoChild();
|
||||
|
||||
protected:
|
||||
virtual PHttpChannelChild* AllocPHttpChannel(PIFrameEmbeddingChild* iframeEmbedding);
|
||||
virtual PHttpChannelChild* AllocPHttpChannel(PBrowserChild* iframeEmbedding);
|
||||
virtual bool DeallocPHttpChannel(PHttpChannelChild*);
|
||||
virtual PCookieServiceChild* AllocPCookieService();
|
||||
virtual bool DeallocPCookieService(PCookieServiceChild*);
|
||||
|
@ -56,7 +56,7 @@ NeckoParent::~NeckoParent()
|
||||
}
|
||||
|
||||
PHttpChannelParent*
|
||||
NeckoParent::AllocPHttpChannel(PIFrameEmbeddingParent* iframeEmbedding)
|
||||
NeckoParent::AllocPHttpChannel(PBrowserParent* iframeEmbedding)
|
||||
{
|
||||
HttpChannelParent *p = new HttpChannelParent(iframeEmbedding);
|
||||
p->AddRef();
|
||||
|
@ -56,7 +56,7 @@ public:
|
||||
virtual ~NeckoParent();
|
||||
|
||||
protected:
|
||||
virtual PHttpChannelParent* AllocPHttpChannel(PIFrameEmbeddingParent* iframeEmbedding);
|
||||
virtual PHttpChannelParent* AllocPHttpChannel(PBrowserParent* iframeEmbedding);
|
||||
virtual bool DeallocPHttpChannel(PHttpChannelParent*);
|
||||
virtual PCookieServiceParent* AllocPCookieService();
|
||||
virtual bool DeallocPCookieService(PCookieServiceParent*);
|
||||
|
@ -38,10 +38,10 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
include protocol PContentProcess;
|
||||
include protocol PContent;
|
||||
include protocol PHttpChannel;
|
||||
include protocol PCookieService;
|
||||
include protocol PIFrameEmbedding;
|
||||
include protocol PBrowser;
|
||||
|
||||
namespace mozilla {
|
||||
namespace net {
|
||||
@ -50,14 +50,14 @@ namespace net {
|
||||
//-------------------------------------------------------------------
|
||||
sync protocol PNecko
|
||||
{
|
||||
manager PContentProcess;
|
||||
manager PContent;
|
||||
manages PHttpChannel;
|
||||
manages PCookieService;
|
||||
|
||||
parent:
|
||||
__delete__();
|
||||
|
||||
PHttpChannel(nullable PIFrameEmbedding iframeEmbedding);
|
||||
PHttpChannel(nullable PBrowser iframeEmbedding);
|
||||
PCookieService();
|
||||
};
|
||||
|
||||
|
@ -53,7 +53,7 @@ namespace mozilla {
|
||||
namespace net {
|
||||
|
||||
// C++ file contents
|
||||
HttpChannelParent::HttpChannelParent(PIFrameEmbeddingParent* iframeEmbedding)
|
||||
HttpChannelParent::HttpChannelParent(PBrowserParent* iframeEmbedding)
|
||||
: mIPCClosed(false)
|
||||
{
|
||||
// Ensure gHttpHandler is initialized: we need the atom table up and running.
|
||||
|
@ -42,7 +42,7 @@
|
||||
#define mozilla_net_HttpChannelParent_h
|
||||
|
||||
#include "nsHttp.h"
|
||||
#include "mozilla/dom/PIFrameEmbeddingParent.h"
|
||||
#include "mozilla/dom/PBrowserParent.h"
|
||||
#include "mozilla/net/PHttpChannelParent.h"
|
||||
#include "mozilla/net/NeckoCommon.h"
|
||||
#include "nsIStreamListener.h"
|
||||
@ -70,7 +70,7 @@ public:
|
||||
NS_DECL_NSIINTERFACEREQUESTOR
|
||||
NS_DECL_NSIPROGRESSEVENTSINK
|
||||
|
||||
HttpChannelParent(PIFrameEmbeddingParent* iframeEmbedding);
|
||||
HttpChannelParent(PBrowserParent* iframeEmbedding);
|
||||
virtual ~HttpChannelParent();
|
||||
|
||||
protected:
|
||||
|
@ -90,9 +90,9 @@
|
||||
|
||||
#include "mozilla/jetpack/JetpackProcessChild.h"
|
||||
#include "mozilla/plugins/PluginProcessChild.h"
|
||||
#include "mozilla/dom/ContentProcessProcess.h"
|
||||
#include "mozilla/dom/ContentProcessParent.h"
|
||||
#include "mozilla/dom/ContentProcessChild.h"
|
||||
#include "mozilla/dom/ContentProcess.h"
|
||||
#include "mozilla/dom/ContentParent.h"
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
|
||||
#include "mozilla/jsipc/ContextWrapperParent.h"
|
||||
|
||||
@ -114,9 +114,9 @@ using mozilla::ipc::ScopedXREEmbed;
|
||||
|
||||
using mozilla::jetpack::JetpackProcessChild;
|
||||
using mozilla::plugins::PluginProcessChild;
|
||||
using mozilla::dom::ContentProcessProcess;
|
||||
using mozilla::dom::ContentProcessParent;
|
||||
using mozilla::dom::ContentProcessChild;
|
||||
using mozilla::dom::ContentProcess;
|
||||
using mozilla::dom::ContentParent;
|
||||
using mozilla::dom::ContentChild;
|
||||
|
||||
using mozilla::jsipc::PContextWrapperParent;
|
||||
using mozilla::jsipc::ContextWrapperParent;
|
||||
@ -399,7 +399,7 @@ XRE_InitChildProcess(int aArgc,
|
||||
break;
|
||||
|
||||
case GeckoProcessType_Content:
|
||||
process = new ContentProcessProcess(parentHandle);
|
||||
process = new ContentProcess(parentHandle);
|
||||
break;
|
||||
|
||||
case GeckoProcessType_Jetpack:
|
||||
@ -547,10 +547,10 @@ XRE_RunAppShell()
|
||||
}
|
||||
|
||||
template<>
|
||||
struct RunnableMethodTraits<ContentProcessChild>
|
||||
struct RunnableMethodTraits<ContentChild>
|
||||
{
|
||||
static void RetainCallee(ContentProcessChild* obj) { }
|
||||
static void ReleaseCallee(ContentProcessChild* obj) { }
|
||||
static void RetainCallee(ContentChild* obj) { }
|
||||
static void ReleaseCallee(ContentChild* obj) { }
|
||||
};
|
||||
|
||||
void
|
||||
@ -575,7 +575,7 @@ TestShellParent* gTestShellParent = nsnull;
|
||||
TestShellParent* GetOrCreateTestShellParent()
|
||||
{
|
||||
if (!gTestShellParent) {
|
||||
ContentProcessParent* parent = ContentProcessParent::GetSingleton();
|
||||
ContentParent* parent = ContentParent::GetSingleton();
|
||||
NS_ENSURE_TRUE(parent, nsnull);
|
||||
gTestShellParent = parent->CreateTestShell();
|
||||
NS_ENSURE_TRUE(gTestShellParent, nsnull);
|
||||
@ -620,7 +620,7 @@ XRE_ShutdownTestShell()
|
||||
{
|
||||
if (!gTestShellParent)
|
||||
return true;
|
||||
return ContentProcessParent::GetSingleton()->DestroyTestShell(gTestShellParent);
|
||||
return ContentParent::GetSingleton()->DestroyTestShell(gTestShellParent);
|
||||
}
|
||||
|
||||
#ifdef MOZ_X11
|
||||
|
Loading…
Reference in New Issue
Block a user