--- a/dom/ipc/ContentProcessChild.cpp
+++ b/dom/ipc/ContentProcessChild.cpp
@@ -1,10 +1,45 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim: sw=4 ts=4 et : */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Content App.
+ *
+ * The Initial Developer of the Original Code is
+ * The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
#include "ContentProcessChild.h"
#include "TabChild.h"
#include "mozilla/ipc/TestShellChild.h"
#include "nsXULAppAPI.h"
@@ -33,47 +68,47 @@ ContentProcessChild::Init(MessageLoop* a
NS_ASSERTION(!sSingleton, "only one ContentProcessChild per child");
Open(aChannel, aIOLoop);
sSingleton = this;
return true;
}
-IFrameEmbeddingProtocolChild*
-ContentProcessChild::IFrameEmbeddingConstructor(const MagicWindowHandle& hwnd)
+PIFrameEmbeddingProtocolChild*
+ContentProcessChild::PIFrameEmbeddingConstructor(const MagicWindowHandle& hwnd)
{
- IFrameEmbeddingProtocolChild* iframe = new TabChild(hwnd);
+ PIFrameEmbeddingProtocolChild* iframe = new TabChild(hwnd);
if (iframe && mIFrames.AppendElement(iframe)) {
return iframe;
}
delete iframe;
return nsnull;
}
nsresult
-ContentProcessChild::IFrameEmbeddingDestructor(IFrameEmbeddingProtocolChild* iframe)
+ContentProcessChild::PIFrameEmbeddingDestructor(PIFrameEmbeddingProtocolChild* iframe)
{
mIFrames.RemoveElement(iframe);
return NS_OK;
}
-TestShellProtocolChild*
-ContentProcessChild::TestShellConstructor()
+PTestShellProtocolChild*
+ContentProcessChild::PTestShellConstructor()
{
- TestShellProtocolChild* testshell = new TestShellChild();
+ PTestShellProtocolChild* testshell = new TestShellChild();
if (testshell && mTestShells.AppendElement(testshell)) {
return testshell;
}
delete testshell;
return nsnull;
}
nsresult
-ContentProcessChild::TestShellDestructor(TestShellProtocolChild* shell)
+ContentProcessChild::PTestShellDestructor(PTestShellProtocolChild* shell)
{
mTestShells.RemoveElement(shell);
return NS_OK;
}
void
ContentProcessChild::Quit()
{
--- a/dom/ipc/ContentProcessChild.h
+++ b/dom/ipc/ContentProcessChild.h
@@ -1,50 +1,85 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim: sw=4 ts=4 et : */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Content App.
+ *
+ * The Initial Developer of the Original Code is
+ * The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
#ifndef mozilla_dom_ContentProcessChild_h
#define mozilla_dom_ContentProcessChild_h
-#include "mozilla/dom/ContentProcessProtocolChild.h"
+#include "mozilla/dom/PContentProcessProtocolChild.h"
#include "nsTArray.h"
#include "nsAutoPtr.h"
namespace mozilla {
namespace dom {
class ContentProcessChild
- : public ContentProcessProtocolChild
+ : public PContentProcessProtocolChild
{
public:
ContentProcessChild();
virtual ~ContentProcessChild();
bool Init(MessageLoop* aIOLoop, IPC::Channel* aChannel);
static ContentProcessChild* GetSingleton() {
NS_ASSERTION(sSingleton, "not initialized");
return sSingleton;
}
- virtual IFrameEmbeddingProtocolChild* IFrameEmbeddingConstructor(const MagicWindowHandle& hwnd);
- virtual nsresult IFrameEmbeddingDestructor(IFrameEmbeddingProtocolChild*);
+ virtual PIFrameEmbeddingProtocolChild* PIFrameEmbeddingConstructor(const MagicWindowHandle& hwnd);
+ virtual nsresult PIFrameEmbeddingDestructor(PIFrameEmbeddingProtocolChild*);
- virtual TestShellProtocolChild* TestShellConstructor();
- virtual nsresult TestShellDestructor(TestShellProtocolChild*);
+ virtual PTestShellProtocolChild* PTestShellConstructor();
+ virtual nsresult PTestShellDestructor(PTestShellProtocolChild*);
void Quit();
virtual nsresult RecvQuit();
private:
static ContentProcessChild* sSingleton;
- nsTArray<nsAutoPtr<IFrameEmbeddingProtocolChild> > mIFrames;
- nsTArray<nsAutoPtr<TestShellProtocolChild> > mTestShells;
+ nsTArray<nsAutoPtr<PIFrameEmbeddingProtocolChild> > mIFrames;
+ nsTArray<nsAutoPtr<PTestShellProtocolChild> > mTestShells;
PRBool mQuit;
DISALLOW_EVIL_CONSTRUCTORS(ContentProcessChild);
};
} // namespace dom
} // namespace mozilla
--- a/dom/ipc/ContentProcessParent.cpp
+++ b/dom/ipc/ContentProcessParent.cpp
@@ -1,8 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim: sw=4 ts=4 et : */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Content App.
+ *
+ * The Initial Developer of the Original Code is
+ * The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
#include "ContentProcessParent.h"
#include "mozilla/ipc/GeckoThread.h"
#include "TabParent.h"
#include "mozilla/ipc/TestShellParent.h"
#include "nsIObserverService.h"
@@ -41,23 +79,23 @@ ContentProcessParent::GetSingleton()
}
}
return gSingleton;
}
TabParent*
ContentProcessParent::CreateTab(const MagicWindowHandle& hwnd)
{
- return static_cast<TabParent*>(SendIFrameEmbeddingConstructor(hwnd));
+ return static_cast<TabParent*>(SendPIFrameEmbeddingConstructor(hwnd));
}
TestShellParent*
ContentProcessParent::CreateTestShell()
{
- return static_cast<TestShellParent*>(SendTestShellConstructor());
+ return static_cast<TestShellParent*>(SendPTestShellConstructor());
}
ContentProcessParent::ContentProcessParent()
: mMonitor("ContentProcessParent::mMonitor")
{
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
// TODO: async launching!
mSubprocess = new GeckoChildProcessHost(GeckoProcessType_Content, this);
@@ -97,36 +135,36 @@ ContentProcessParent::OnWaitableEventSig
{
// The child process has died! Sadly we're on the wrong thread to do much.
NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!");
MonitorAutoEnter mon(mMonitor);
mSubprocess = nsnull;
mon.Notify();
}
-IFrameEmbeddingProtocolParent*
-ContentProcessParent::IFrameEmbeddingConstructor(const MagicWindowHandle& parentWidget)
+PIFrameEmbeddingProtocolParent*
+ContentProcessParent::PIFrameEmbeddingConstructor(const MagicWindowHandle& parentWidget)
{
return new TabParent();
}
nsresult
-ContentProcessParent::IFrameEmbeddingDestructor(IFrameEmbeddingProtocolParent* frame)
+ContentProcessParent::PIFrameEmbeddingDestructor(PIFrameEmbeddingProtocolParent* frame)
{
delete frame;
return NS_OK;
}
-TestShellProtocolParent*
-ContentProcessParent::TestShellConstructor()
+PTestShellProtocolParent*
+ContentProcessParent::PTestShellConstructor()
{
return new TestShellParent();
}
nsresult
-ContentProcessParent::TestShellDestructor(TestShellProtocolParent* shell)
+ContentProcessParent::PTestShellDestructor(PTestShellProtocolParent* shell)
{
delete shell;
return NS_OK;
}
} // namespace dom
} // namespace mozilla
--- a/dom/ipc/ContentProcessParent.h
+++ b/dom/ipc/ContentProcessParent.h
@@ -1,33 +1,69 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim: sw=4 ts=4 et : */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Content App.
+ *
+ * The Initial Developer of the Original Code is
+ * The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
#ifndef mozilla_dom_ContentProcessParent_h
#define mozilla_dom_ContentProcessParent_h
#include "base/waitable_event_watcher.h"
-#include "mozilla/dom/ContentProcessProtocolParent.h"
+#include "mozilla/dom/PContentProcessProtocolParent.h"
#include "mozilla/ipc/GeckoChildProcessHost.h"
#include "nsIObserver.h"
#include "mozilla/Monitor.h"
namespace mozilla {
+
namespace ipc {
class TestShellParent;
}
namespace dom {
class TabParent;
class ContentProcessParent
- : private ContentProcessProtocolParent,
+ : private PContentProcessProtocolParent,
public base::WaitableEventWatcher::Delegate,
public nsIObserver
{
private:
typedef mozilla::ipc::GeckoChildProcessHost GeckoChildProcessHost;
public:
static ContentProcessParent* GetSingleton();
@@ -45,27 +81,27 @@ public:
TabParent* CreateTab(const MagicWindowHandle& hwnd);
mozilla::ipc::TestShellParent* CreateTestShell();
private:
static ContentProcessParent* gSingleton;
// Hide the raw constructor methods since we don't want client code
// using them.
- using ContentProcessProtocolParent::SendIFrameEmbeddingConstructor;
- using ContentProcessProtocolParent::SendTestShellConstructor;
+ using PContentProcessProtocolParent::SendPIFrameEmbeddingConstructor;
+ using PContentProcessProtocolParent::SendPTestShellConstructor;
ContentProcessParent();
virtual ~ContentProcessParent();
- virtual IFrameEmbeddingProtocolParent* IFrameEmbeddingConstructor(const MagicWindowHandle& parentWidget);
- virtual nsresult IFrameEmbeddingDestructor(IFrameEmbeddingProtocolParent* frame);
+ virtual PIFrameEmbeddingProtocolParent* PIFrameEmbeddingConstructor(const MagicWindowHandle& parentWidget);
+ virtual nsresult PIFrameEmbeddingDestructor(PIFrameEmbeddingProtocolParent* frame);
- virtual TestShellProtocolParent* TestShellConstructor();
- virtual nsresult TestShellDestructor(TestShellProtocolParent* shell);
+ virtual PTestShellProtocolParent* PTestShellConstructor();
+ virtual nsresult PTestShellDestructor(PTestShellProtocolParent* shell);
mozilla::Monitor mMonitor;
GeckoChildProcessHost* mSubprocess;
};
} // namespace dom
} // namespace mozilla
--- a/dom/ipc/Makefile.in
+++ b/dom/ipc/Makefile.in
@@ -51,16 +51,17 @@ EXPORTS_NAMESPACES = mozilla mozilla/dom
EXPORTS_mozilla = \
TabTypes.h \
$(NULL)
EXPORTS_mozilla/dom = \
ContentProcessChild.h \
ContentProcessParent.h \
+ ContentProcessThread.h \
$(NULL)
CPPSRCS = \
ContentProcessThread.cpp \
ContentProcessParent.cpp \
ContentProcessChild.cpp \
TabParent.cpp \
TabChild.cpp \
rename from dom/ipc/ContentProcess.ipdl
rename to dom/ipc/PContentProcess.ipdl
--- a/dom/ipc/ContentProcess.ipdl
+++ b/dom/ipc/PContentProcess.ipdl
@@ -1,29 +1,64 @@
/* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 8 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Content App.
+ *
+ * The Initial Developer of the Original Code is
+ * The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
-include protocol "IFrameEmbedding.ipdl";
-include protocol "TestShell.ipdl";
+include protocol "PIFrameEmbedding.ipdl";
+include protocol "PTestShell.ipdl";
include "mozilla/TabTypes.h";
using MagicWindowHandle;
namespace mozilla {
namespace dom {
-sync protocol ContentProcess
+sync protocol PContentProcess
{
- manages IFrameEmbedding;
- manages TestShell;
+ manages PIFrameEmbedding;
+ manages PTestShell;
child:
- IFrameEmbedding(MagicWindowHandle parentWidget);
- ~IFrameEmbedding();
+ PIFrameEmbedding(MagicWindowHandle parentWidget);
+ ~PIFrameEmbedding();
- TestShell();
- ~TestShell();
+ PTestShell();
+ ~PTestShell();
Quit();
};
}
}
rename from dom/ipc/IFrameEmbedding.ipdl
rename to dom/ipc/PIFrameEmbedding.ipdl
--- a/dom/ipc/IFrameEmbedding.ipdl
+++ b/dom/ipc/PIFrameEmbedding.ipdl
@@ -1,20 +1,55 @@
/* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 8 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Content App.
+ *
+ * The Initial Developer of the Original Code is
+ * The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
-include protocol "ContentProcess.ipdl";
+include protocol "PContentProcess.ipdl";
using PRUint32;
namespace mozilla {
namespace dom {
-async protocol IFrameEmbedding
+async protocol PIFrameEmbedding
{
- manager ContentProcess;
+ manager PContentProcess;
child:
loadURL(nsCString uri);
move(PRUint32 x,
PRUint32 y,
PRUint32 width,
PRUint32 height);
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -1,9 +1,44 @@
/* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 8; -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Content App.
+ *
+ * The Initial Developer of the Original Code is
+ * The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
#include "TabChild.h"
#include "nsIWebBrowser.h"
#include "nsEmbedCID.h"
#include "nsComponentManagerUtils.h"
#include "nsIBaseWindow.h"
#include "nsIDocShellTreeItem.h"
--- a/dom/ipc/TabChild.h
+++ b/dom/ipc/TabChild.h
@@ -1,22 +1,57 @@
/* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 8; -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Content App.
+ *
+ * The Initial Developer of the Original Code is
+ * The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
#ifndef mozilla_tabs_TabChild_h
#define mozilla_tabs_TabChild_h
-#include "mozilla/dom/IFrameEmbeddingProtocolChild.h"
+#include "mozilla/dom/PIFrameEmbeddingProtocolChild.h"
#include "nsIWebNavigation.h"
#include "nsCOMPtr.h"
namespace mozilla {
namespace dom {
class TabChild
- : public IFrameEmbeddingProtocolChild
+ : public PIFrameEmbeddingProtocolChild
{
public:
TabChild(const MagicWindowHandle& parentWidget);
virtual ~TabChild();
virtual nsresult RecvloadURL(const nsCString& uri);
virtual nsresult Recvmove(const PRUint32& x,
const PRUint32& y,
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -1,8 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* vim: sw=4 ts=4 et : */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Content App.
+ *
+ * The Initial Developer of the Original Code is
+ * The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
#include "TabParent.h"
#include "mozilla/ipc/GeckoThread.h"
#include "nsIURI.h"
using mozilla::ipc::BrowserProcessSubThread;
--- a/dom/ipc/TabParent.h
+++ b/dom/ipc/TabParent.h
@@ -1,25 +1,60 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim: sw=4 ts=4 et : */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Content App.
+ *
+ * The Initial Developer of the Original Code is
+ * The Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
#ifndef mozilla_tabs_TabParent_h
#define mozilla_tabs_TabParent_h
-#include "mozilla/dom/IFrameEmbeddingProtocolParent.h"
+#include "mozilla/dom/PIFrameEmbeddingProtocolParent.h"
#include "mozilla/ipc/GeckoChildProcessHost.h"
class nsIURI;
namespace mozilla {
namespace dom {
class TabParent
- : public IFrameEmbeddingProtocolParent
+ : public PIFrameEmbeddingProtocolParent
{
public:
TabParent();
virtual ~TabParent();
void LoadURL(nsIURI* aURI);
void Move(PRUint32 x, PRUint32 y, PRUint32 width, PRUint32 height);
};
--- a/dom/ipc/ipdl.mk
+++ b/dom/ipc/ipdl.mk
@@ -1,4 +1,40 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla Content App.
+#
+# The Initial Developer of the Original Code is
+# The Mozilla Foundation.
+# Portions created by the Initial Developer are Copyright (C) 2009
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
IPDLSRCS = \
- ContentProcess.ipdl \
- IFrameEmbedding.ipdl \
+ PContentProcess.ipdl \
+ PIFrameEmbedding.ipdl \
$(NULL)
--- a/dom/plugins/PluginInstanceChild.h
+++ b/dom/plugins/PluginInstanceChild.h
@@ -45,16 +45,18 @@
#include "npfunctions.h"
#undef _MOZ_LOG
#define _MOZ_LOG(s) printf("[PluginInstanceChild] %s\n", s)
namespace mozilla {
namespace plugins {
+class PBrowserStreamProtocolChild;
+
class PluginInstanceChild : public PPluginInstanceProtocolChild
{
#ifdef OS_WIN
friend LRESULT CALLBACK PluginWindowProc(HWND hWnd,
UINT message,
WPARAM wParam,
LPARAM lParam);
#endif
rename from ipc/test-harness/Test.ipdl
rename to ipc/test-harness/PTest.ipdl
--- a/ipc/test-harness/Test.ipdl
+++ b/ipc/test-harness/PTest.ipdl
@@ -1,14 +1,51 @@
+/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla IPDL Test Harness.
+ *
+ * The Initial Developer of the Original Code is
+ * Chris Jones <jones.chris.g@gmail.com>.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
//-----------------------------------------------------------------------------
// "Hello world" example
namespace mozilla {
namespace test {
-protocol Test
+protocol PTest
{
child:
Hello();
parent:
World();
};
@@ -19,17 +56,17 @@ parent:
// Example solution to exercise
/*
include "nsTArray.h";
using nsTArray<nsCString>;
namespace mozilla {
namespace test {
-sync protocol Test
+sync protocol PTest
{
both:
Ping();
Pong(int status);
parent:
GetValue(nsCString key);
GetValues(nsTArray<nsCString> keys);
--- a/ipc/test-harness/TestChild.cpp
+++ b/ipc/test-harness/TestChild.cpp
@@ -1,9 +1,46 @@
-#include "mozilla/test/TestChild.h"
+/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla IPDL Test Harness.
+ *
+ * The Initial Developer of the Original Code is
+ * Chris Jones <jones.chris.g@gmail.com>.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "TestChild.h"
using mozilla::test::TestChild;
// C++ file contents
TestChild::TestChild()
{
}
--- a/ipc/test-harness/TestChild.h
+++ b/ipc/test-harness/TestChild.h
@@ -1,16 +1,56 @@
-#include "mozilla/test/TestProtocolChild.h"
+/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla IPDL Test Harness.
+ *
+ * The Initial Developer of the Original Code is
+ * Chris Jones <jones.chris.g@gmail.com>.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef ipc_test_harness_TestChild_h
+#define ipc_test_harness_TestChild_h 1
+
+#include "mozilla/test/PTestProtocolChild.h"
namespace mozilla {
namespace test {
// Header file contents
class TestChild :
- public TestProtocolChild
+ public PTestProtocolChild
{
protected:
#if 1
//-----------------------------------------------------------------------------
// "Hello world" example
virtual nsresult RecvHello();
@@ -30,8 +70,10 @@ protected:
public:
TestChild();
virtual ~TestChild();
};
} // namespace test
} // namespace mozilla
+
+#endif /* ipc_test_harness_TestChild_h */
--- a/ipc/test-harness/TestParent.cpp
+++ b/ipc/test-harness/TestParent.cpp
@@ -1,9 +1,46 @@
-#include "mozilla/test/TestParent.h"
+/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla IPDL Test Harness.
+ *
+ * The Initial Developer of the Original Code is
+ * Chris Jones <jones.chris.g@gmail.com>.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "TestParent.h"
using mozilla::test::TestParent;
// C++ file contents
TestParent::TestParent()
{
}
--- a/ipc/test-harness/TestParent.h
+++ b/ipc/test-harness/TestParent.h
@@ -1,16 +1,56 @@
-#include "mozilla/test/TestProtocolParent.h"
+/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla IPDL Test Harness.
+ *
+ * The Initial Developer of the Original Code is
+ * Chris Jones <jones.chris.g@gmail.com>.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef ipc_test_harness_TestParent_h
+#define ipc_test_harness_TestParent_h 1
+
+#include "mozilla/test/PTestProtocolParent.h"
namespace mozilla {
namespace test {
// Header file contents
class TestParent :
- public TestProtocolParent
+ public PTestProtocolParent
{
protected:
#if 1
//-----------------------------------------------------------------------------
// "Hello world" example
virtual nsresult RecvWorld();
@@ -31,8 +71,10 @@ public:
TestParent();
virtual ~TestParent();
void DoStuff();
};
} // namespace test
} // namespace mozilla
+
+#endif /* ipc_test_harness_TestParent_h */
--- a/ipc/test-harness/TestProcessParent.cpp
+++ b/ipc/test-harness/TestProcessParent.cpp
@@ -1,19 +1,55 @@
-#include "mozilla/test/TestProcessParent.h"
+/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla IPDL Test Harness.
+ *
+ * The Initial Developer of the Original Code is
+ * Chris Jones <jones.chris.g@gmail.com>.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "TestProcessParent.h"
+
using mozilla::ipc::GeckoChildProcessHost;
namespace mozilla {
namespace test {
-
TestProcessParent::TestProcessParent() :
GeckoChildProcessHost(GeckoProcessType_TestHarness)
{
}
TestProcessParent::~TestProcessParent()
{
}
-
} // namespace test
} // namespace mozilla
--- a/ipc/test-harness/TestProcessParent.h
+++ b/ipc/test-harness/TestProcessParent.h
@@ -1,10 +1,47 @@
-#ifndef mozilla_test_TestProcessParent_h
-#define mozilla_test_TestProcessParent_h 1
+/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla IPDL Test Harness.
+ *
+ * The Initial Developer of the Original Code is
+ * Chris Jones <jones.chris.g@gmail.com>.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef ipc_test_harness_TestProcessParent_h
+#define ipc_test_harness_TestProcessParent_h 1
#include "mozilla/ipc/GeckoChildProcessHost.h"
namespace mozilla {
namespace test {
//-----------------------------------------------------------------------------
class TestProcessParent : public mozilla::ipc::GeckoChildProcessHost
@@ -22,9 +59,9 @@ public:
private:
DISALLOW_EVIL_CONSTRUCTORS(TestProcessParent);
};
} // namespace plugins
} // namespace mozilla
-#endif // ifndef mozilla_test_TestProcessParent_h
+#endif // ifndef ipc_test_harness_TestProcessParent_h
--- a/ipc/test-harness/TestThreadChild.cpp
+++ b/ipc/test-harness/TestThreadChild.cpp
@@ -1,11 +1,48 @@
-#include "mozilla/test/TestThreadChild.h"
+/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla IPDL Test Harness.
+ *
+ * The Initial Developer of the Original Code is
+ * Chris Jones <jones.chris.g@gmail.com>.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "TestThreadChild.h"
+
using mozilla::test::TestThreadChild;
-
using mozilla::ipc::GeckoThread;
TestThreadChild::TestThreadChild() :
GeckoThread()
{
}
TestThreadChild::~TestThreadChild()
--- a/ipc/test-harness/TestThreadChild.h
+++ b/ipc/test-harness/TestThreadChild.h
@@ -1,10 +1,47 @@
-#ifndef mozilla_test_TestThreadChild_h
-#define mozilla_test_TestThreadChild_h
+/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla IPDL Test Harness.
+ *
+ * The Initial Developer of the Original Code is
+ * Chris Jones <jones.chris.g@gmail.com>.
+ * Portions created by the Initial Developer are Copyright (C) 2009
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef ipc_test_harness_TestThreadChild_h
+#define ipc_test_harness_TestThreadChild_h 1
#include "mozilla/ipc/GeckoThread.h"
#include "mozilla/test/TestChild.h"
namespace mozilla {
namespace test {
class TestThreadChild : public mozilla::ipc::GeckoThread
@@ -19,9 +56,9 @@ protected:
private:
TestChild mChild;
};
} // namespace test
} // namespace mozilla
-#endif // ifndef mozilla_test_TestThreadChild_h
+#endif // ifndef ipc_test_harness_TestThreadChild_h
--- a/ipc/test-harness/ipdl.mk
+++ b/ipc/test-harness/ipdl.mk
@@ -1,3 +1,3 @@
IPDLSRCS = \
- Test.ipdl \
+ PTest.ipdl \
$(NULL)
rename from ipc/testshell/TestShell.ipdl
rename to ipc/testshell/PTestShell.ipdl
--- a/ipc/testshell/TestShell.ipdl
+++ b/ipc/testshell/PTestShell.ipdl
@@ -30,31 +30,31 @@
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-include protocol "ContentProcess.ipdl";
-include protocol "TestShellCommand.ipdl";
+include protocol "PContentProcess.ipdl";
+include protocol "PTestShellCommand.ipdl";
namespace mozilla {
namespace ipc {
-protocol TestShell
+protocol PTestShell
{
- manager ContentProcess;
+ manager PContentProcess;
- manages TestShellCommand;
+ manages PTestShellCommand;
child:
ExecuteCommand(nsString aCommand);
- TestShellCommand(nsString aCommand);
+ PTestShellCommand(nsString aCommand);
parent:
- ~TestShellCommand(nsString aResponse);
+ ~PTestShellCommand(nsString aResponse);
};
} // namespace ipc
} // namespace mozilla
rename from ipc/testshell/TestShellCommand.ipdl
rename to ipc/testshell/PTestShellCommand.ipdl
--- a/ipc/testshell/TestShellCommand.ipdl
+++ b/ipc/testshell/PTestShellCommand.ipdl
@@ -30,20 +30,20 @@
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-include protocol "TestShell.ipdl";
+include protocol "PTestShell.ipdl";
namespace mozilla {
namespace ipc {
-protocol TestShellCommand
+protocol PTestShellCommand
{
- manager TestShell;
+ manager PTestShell;
};
} // namespace ipc
} // namespace mozilla
--- a/ipc/testshell/TestShellChild.cpp
+++ b/ipc/testshell/TestShellChild.cpp
@@ -32,17 +32,17 @@
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "TestShellChild.h"
using mozilla::ipc::TestShellChild;
-using mozilla::ipc::TestShellCommandProtocolChild;
+using mozilla::ipc::PTestShellCommandProtocolChild;
using mozilla::ipc::XPCShellEnvironment;
TestShellChild::TestShellChild()
: mXPCShell(XPCShellEnvironment::CreateEnvironment())
{
}
nsresult
@@ -51,44 +51,44 @@ TestShellChild::RecvExecuteCommand(const
if (mXPCShell->IsQuitting()) {
NS_WARNING("Commands sent after quit command issued!");
return NS_ERROR_UNEXPECTED;
}
return mXPCShell->EvaluateString(aCommand) ? NS_OK : NS_ERROR_FAILURE;
}
-TestShellCommandProtocolChild*
-TestShellChild::TestShellCommandConstructor(const nsString& aCommand)
+PTestShellCommandProtocolChild*
+TestShellChild::PTestShellCommandConstructor(const nsString& aCommand)
{
- return new TestShellCommandProtocolChild();
+ return new PTestShellCommandProtocolChild();
}
nsresult
-TestShellChild::TestShellCommandDestructor(TestShellCommandProtocolChild* aCommand,
- const nsString& aResponse)
+TestShellChild::PTestShellCommandDestructor(PTestShellCommandProtocolChild* aCommand,
+ const nsString& aResponse)
{
NS_ENSURE_ARG_POINTER(aCommand);
delete aCommand;
return NS_OK;
}
nsresult
-TestShellChild::RecvTestShellCommandConstructor(TestShellCommandProtocolChild* aActor,
- const nsString& aCommand)
+TestShellChild::RecvPTestShellCommandConstructor(PTestShellCommandProtocolChild* aActor,
+ const nsString& aCommand)
{
NS_ASSERTION(aActor, "Shouldn't be null!");
if (mXPCShell->IsQuitting()) {
NS_WARNING("Commands sent after quit command issued!");
return NS_ERROR_UNEXPECTED;
}
nsString response;
if (!mXPCShell->EvaluateString(aCommand, &response)) {
return NS_ERROR_FAILURE;
}
- nsresult rv = SendTestShellCommandDestructor(aActor, response);
+ nsresult rv = SendPTestShellCommandDestructor(aActor, response);
NS_ENSURE_SUCCESS(rv, rv);
return NS_OK;
}
--- a/ipc/testshell/TestShellChild.h
+++ b/ipc/testshell/TestShellChild.h
@@ -29,53 +29,53 @@
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-#ifndef _IPC_TESTSHELL_TESTSHELLCHILD_H_
-#define _IPC_TESTSHELL_TESTSHELLCHILD_H_
+#ifndef ipc_testshell_TestShellChild_h
+#define ipc_testshell_TestShellChild_h 1
-#include "mozilla/ipc/TestShellProtocolChild.h"
-#include "mozilla/ipc/TestShellCommandProtocolChild.h"
+#include "mozilla/ipc/PTestShellProtocolChild.h"
+#include "mozilla/ipc/PTestShellCommandProtocolChild.h"
#include "mozilla/ipc/XPCShellEnvironment.h"
#include "nsAutoPtr.h"
namespace mozilla {
namespace ipc {
class XPCShellEnvironment;
-class TestShellChild : public TestShellProtocolChild
+class TestShellChild : public PTestShellProtocolChild
{
public:
TestShellChild();
nsresult
RecvExecuteCommand(const nsString& aCommand);
- TestShellCommandProtocolChild*
- TestShellCommandConstructor(const nsString& aCommand);
+ PTestShellCommandProtocolChild*
+ PTestShellCommandConstructor(const nsString& aCommand);
nsresult
- RecvTestShellCommandConstructor(TestShellCommandProtocolChild* aActor,
- const nsString& aCommand);
+ RecvPTestShellCommandConstructor(PTestShellCommandProtocolChild* aActor,
+ const nsString& aCommand);
nsresult
- TestShellCommandDestructor(TestShellCommandProtocolChild* aCommand,
- const nsString& aResponse);
+ PTestShellCommandDestructor(PTestShellCommandProtocolChild* aCommand,
+ const nsString& aResponse);
void SetXPCShell(XPCShellEnvironment* aXPCShell) {
mXPCShell = aXPCShell;
}
private:
nsAutoPtr<XPCShellEnvironment> mXPCShell;
};
} /* namespace ipc */
} /* namespace mozilla */
-#endif /* _IPC_TESTSHELL_TESTSHELLCHILD_H_ */
+#endif /* ipc_testshell_TestShellChild_h */
--- a/ipc/testshell/TestShellParent.cpp
+++ b/ipc/testshell/TestShellParent.cpp
@@ -35,36 +35,36 @@
* ***** END LICENSE BLOCK ***** */
#include "TestShellParent.h"
#include "nsAutoPtr.h"
using mozilla::ipc::TestShellParent;
using mozilla::ipc::TestShellCommandParent;
-using mozilla::ipc::TestShellCommandProtocolParent;
+using mozilla::ipc::PTestShellCommandProtocolParent;
-TestShellCommandProtocolParent*
-TestShellParent::TestShellCommandConstructor(const nsString& aCommand)
+PTestShellCommandProtocolParent*
+TestShellParent::PTestShellCommandConstructor(const nsString& aCommand)
{
return new TestShellCommandParent();
}
nsresult
-TestShellParent::TestShellCommandDestructor(TestShellCommandProtocolParent* aActor,
- const nsString& aResponse)
+TestShellParent::PTestShellCommandDestructor(PTestShellCommandProtocolParent* aActor,
+ const nsString& aResponse)
{
NS_ENSURE_ARG_POINTER(aActor);
delete aActor;
return NS_OK;
}
nsresult
-TestShellParent::RecvTestShellCommandDestructor(TestShellCommandProtocolParent* aActor,
- const nsString& aResponse)
+TestShellParent::RecvPTestShellCommandDestructor(PTestShellCommandProtocolParent* aActor,
+ const nsString& aResponse)
{
NS_ENSURE_ARG_POINTER(aActor);
TestShellCommandParent* command =
reinterpret_cast<TestShellCommandParent*>(aActor);
JSBool ok = command->RunCallback(aResponse);
command->ReleaseCallback();
--- a/ipc/testshell/TestShellParent.h
+++ b/ipc/testshell/TestShellParent.h
@@ -29,57 +29,57 @@
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
-#ifndef _IPC_TESTSHELL_TESTSHELLPARENT_H_
-#define _IPC_TESTSHELL_TESTSHELLPARENT_H_
+#ifndef ipc_testshell_TestShellParent_h
+#define ipc_testshell_TestShellParent_h 1
-#include "mozilla/ipc/TestShellProtocolParent.h"
-#include "mozilla/ipc/TestShellCommandProtocolParent.h"
+#include "mozilla/ipc/PTestShellProtocolParent.h"
+#include "mozilla/ipc/PTestShellCommandProtocolParent.h"
#include "jsapi.h"
#include "nsAutoJSValHolder.h"
#include "nsStringGlue.h"
namespace mozilla {
namespace ipc {
-class TestShellCommandParent : public TestShellCommandProtocolParent
+class TestShellCommandParent : public PTestShellCommandProtocolParent
{
public:
TestShellCommandParent() : mCx(NULL) { }
JSBool SetCallback(JSContext* aCx,
jsval aCallback);
JSBool RunCallback(const nsString& aResponse);
void ReleaseCallback();
private:
JSContext* mCx;
nsAutoJSValHolder mCallback;
};
-class TestShellParent : public TestShellProtocolParent
+class TestShellParent : public PTestShellProtocolParent
{
public:
- TestShellCommandProtocolParent*
- TestShellCommandConstructor(const nsString& aCommand);
+ PTestShellCommandProtocolParent*
+ PTestShellCommandConstructor(const nsString& aCommand);
nsresult
- TestShellCommandDestructor(TestShellCommandProtocolParent* aActor,
- const nsString& aResponse);
+ PTestShellCommandDestructor(PTestShellCommandProtocolParent* aActor,
+ const nsString& aResponse);
nsresult
- RecvTestShellCommandDestructor(TestShellCommandProtocolParent* aActor,
- const nsString& aResponse);
+ RecvPTestShellCommandDestructor(PTestShellCommandProtocolParent* aActor,
+ const nsString& aResponse);
};
} /* namespace ipc */
} /* namespace mozilla */
-#endif /* _IPC_TESTSHELL_TESTSHELLPARENT_H_ */
+#endif /* ipc_testshell_TestShellParent_h */
--- a/ipc/testshell/XPCShellEnvironment.cpp
+++ b/ipc/testshell/XPCShellEnvironment.cpp
@@ -71,17 +71,16 @@
#include "TestShellParent.h"
#define EXITCODE_RUNTIME_ERROR 3
#define EXITCODE_FILE_NOT_FOUND 4
using mozilla::ipc::XPCShellEnvironment;
using mozilla::ipc::TestShellChild;
using mozilla::ipc::TestShellParent;
-using mozilla::ipc::TestShellCommandProtocolParent;
namespace {
static const char kDefaultRuntimeScriptFilename[] = "xpcshell.js";
class FullTrustSecMan : public nsIScriptSecurityManager
{
public:
--- a/ipc/testshell/ipdl.mk
+++ b/ipc/testshell/ipdl.mk
@@ -1,4 +1,4 @@
IPDLSRCS = \
- TestShell.ipdl \
- TestShellCommand.ipdl \
+ PTestShell.ipdl \
+ PTestShellCommand.ipdl \
$(NULL)
--- a/toolkit/xre/nsEmbedFunctions.cpp
+++ b/toolkit/xre/nsEmbedFunctions.cpp
@@ -67,19 +67,19 @@
#include "base/message_loop.h"
#include "chrome/common/child_process.h"
#include "mozilla/ipc/GeckoChildProcessHost.h"
#include "mozilla/ipc/GeckoThread.h"
#include "ScopedXREEmbed.h"
#include "mozilla/plugins/PluginThreadChild.h"
-#include "ContentProcessThread.h"
-#include "ContentProcessParent.h"
-#include "ContentProcessChild.h"
+#include "mozilla/dom/ContentProcessThread.h"
+#include "mozilla/dom/ContentProcessParent.h"
+#include "mozilla/dom/ContentProcessChild.h"
#include "mozilla/ipc/TestShellParent.h"
#include "mozilla/ipc/XPCShellEnvironment.h"
#include "mozilla/test/TestParent.h"
#include "mozilla/test/TestProcessParent.h"
#include "mozilla/test/TestThreadChild.h"
#include "mozilla/Monitor.h"
@@ -460,17 +460,17 @@ XRE_SendTestShellCommand(JSContext* aCx,
if (!aCallback) {
if (NS_FAILED(gTestShellParent->SendExecuteCommand(command))) {
return false;
}
return true;
}
TestShellCommandParent* callback = static_cast<TestShellCommandParent*>(
- gTestShellParent->SendTestShellCommandConstructor(command));
+ gTestShellParent->SendPTestShellCommandConstructor(command));
NS_ENSURE_TRUE(callback, false);
jsval callbackVal = *reinterpret_cast<jsval*>(aCallback);
NS_ENSURE_TRUE(callback->SetCallback(aCx, callbackVal), false);
return true;
}