зеркало из https://github.com/mozilla/pjs.git
Rename remaining protocols
--HG-- rename : dom/ipc/ContentProcess.ipdl => dom/ipc/PContentProcess.ipdl rename : dom/ipc/IFrameEmbedding.ipdl => dom/ipc/PIFrameEmbedding.ipdl rename : ipc/test-harness/Test.ipdl => ipc/test-harness/PTest.ipdl rename : ipc/testshell/TestShell.ipdl => ipc/testshell/PTestShell.ipdl rename : ipc/testshell/TestShellCommand.ipdl => ipc/testshell/PTestShellCommand.ipdl
This commit is contained in:
Родитель
123af8fa57
Коммит
761a7fffb6
|
@ -1,29 +0,0 @@
|
|||
/* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 8 -*- */
|
||||
|
||||
include protocol "IFrameEmbedding.ipdl";
|
||||
include protocol "TestShell.ipdl";
|
||||
|
||||
include "mozilla/TabTypes.h";
|
||||
|
||||
using MagicWindowHandle;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
sync protocol ContentProcess
|
||||
{
|
||||
manages IFrameEmbedding;
|
||||
manages TestShell;
|
||||
|
||||
child:
|
||||
IFrameEmbedding(MagicWindowHandle parentWidget);
|
||||
~IFrameEmbedding();
|
||||
|
||||
TestShell();
|
||||
~TestShell();
|
||||
|
||||
Quit();
|
||||
};
|
||||
|
||||
}
|
||||
}
|
|
@ -1,5 +1,40 @@
|
|||
/* -*- 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"
|
||||
|
@ -38,10 +73,10 @@ ContentProcessChild::Init(MessageLoop* aIOLoop, IPC::Channel* aChannel)
|
|||
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;
|
||||
}
|
||||
|
@ -50,16 +85,16 @@ ContentProcessChild::IFrameEmbeddingConstructor(const MagicWindowHandle& hwnd)
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -68,7 +103,7 @@ ContentProcessChild::TestShellConstructor()
|
|||
}
|
||||
|
||||
nsresult
|
||||
ContentProcessChild::TestShellDestructor(TestShellProtocolChild* shell)
|
||||
ContentProcessChild::PTestShellDestructor(PTestShellProtocolChild* shell)
|
||||
{
|
||||
mTestShells.RemoveElement(shell);
|
||||
return NS_OK;
|
||||
|
|
|
@ -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 ***** */
|
||||
|
||||
#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"
|
||||
|
@ -13,7 +48,7 @@ namespace mozilla {
|
|||
namespace dom {
|
||||
|
||||
class ContentProcessChild
|
||||
: public ContentProcessProtocolChild
|
||||
: public PContentProcessProtocolChild
|
||||
{
|
||||
public:
|
||||
ContentProcessChild();
|
||||
|
@ -26,11 +61,11 @@ public:
|
|||
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();
|
||||
|
@ -38,8 +73,8 @@ public:
|
|||
private:
|
||||
static ContentProcessChild* sSingleton;
|
||||
|
||||
nsTArray<nsAutoPtr<IFrameEmbeddingProtocolChild> > mIFrames;
|
||||
nsTArray<nsAutoPtr<TestShellProtocolChild> > mTestShells;
|
||||
nsTArray<nsAutoPtr<PIFrameEmbeddingProtocolChild> > mIFrames;
|
||||
nsTArray<nsAutoPtr<PTestShellProtocolChild> > mTestShells;
|
||||
|
||||
PRBool mQuit;
|
||||
|
||||
|
|
|
@ -1,3 +1,41 @@
|
|||
/* -*- 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"
|
||||
|
@ -46,13 +84,13 @@ ContentProcessParent::GetSingleton()
|
|||
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()
|
||||
|
@ -102,27 +140,27 @@ ContentProcessParent::OnWaitableEventSignaled(base::WaitableEvent *event)
|
|||
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;
|
||||
|
|
|
@ -1,18 +1,54 @@
|
|||
/* -*- 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;
|
||||
}
|
||||
|
@ -22,7 +58,7 @@ namespace dom {
|
|||
class TabParent;
|
||||
|
||||
class ContentProcessParent
|
||||
: private ContentProcessProtocolParent,
|
||||
: private PContentProcessProtocolParent,
|
||||
public base::WaitableEventWatcher::Delegate,
|
||||
public nsIObserver
|
||||
{
|
||||
|
@ -50,17 +86,17 @@ private:
|
|||
|
||||
// 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;
|
||||
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
/* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 8 -*- */
|
||||
|
||||
include protocol "ContentProcess.ipdl";
|
||||
|
||||
using PRUint32;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
async protocol IFrameEmbedding
|
||||
{
|
||||
manager ContentProcess;
|
||||
|
||||
child:
|
||||
loadURL(nsCString uri);
|
||||
|
||||
move(PRUint32 x,
|
||||
PRUint32 y,
|
||||
PRUint32 width,
|
||||
PRUint32 height);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
|
@ -56,6 +56,7 @@ EXPORTS_mozilla = \
|
|||
EXPORTS_mozilla/dom = \
|
||||
ContentProcessChild.h \
|
||||
ContentProcessParent.h \
|
||||
ContentProcessThread.h \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
|
|
|
@ -0,0 +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 "PIFrameEmbedding.ipdl";
|
||||
include protocol "PTestShell.ipdl";
|
||||
|
||||
include "mozilla/TabTypes.h";
|
||||
|
||||
using MagicWindowHandle;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
sync protocol PContentProcess
|
||||
{
|
||||
manages PIFrameEmbedding;
|
||||
manages PTestShell;
|
||||
|
||||
child:
|
||||
PIFrameEmbedding(MagicWindowHandle parentWidget);
|
||||
~PIFrameEmbedding();
|
||||
|
||||
PTestShell();
|
||||
~PTestShell();
|
||||
|
||||
Quit();
|
||||
};
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
/* -*- 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 "PContentProcess.ipdl";
|
||||
|
||||
using PRUint32;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
async protocol PIFrameEmbedding
|
||||
{
|
||||
manager PContentProcess;
|
||||
|
||||
child:
|
||||
loadURL(nsCString uri);
|
||||
|
||||
move(PRUint32 x,
|
||||
PRUint32 y,
|
||||
PRUint32 width,
|
||||
PRUint32 height);
|
||||
};
|
||||
|
||||
}
|
||||
}
|
|
@ -1,4 +1,39 @@
|
|||
/* -*- 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"
|
||||
|
||||
|
|
|
@ -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 ***** */
|
||||
|
||||
#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"
|
||||
|
||||
|
@ -11,7 +46,7 @@ namespace mozilla {
|
|||
namespace dom {
|
||||
|
||||
class TabChild
|
||||
: public IFrameEmbeddingProtocolChild
|
||||
: public PIFrameEmbeddingProtocolChild
|
||||
{
|
||||
public:
|
||||
TabChild(const MagicWindowHandle& parentWidget);
|
||||
|
|
|
@ -1,3 +1,41 @@
|
|||
/* -*- 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"
|
||||
|
|
|
@ -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 ***** */
|
||||
|
||||
#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"
|
||||
|
||||
|
@ -14,7 +49,7 @@ namespace mozilla {
|
|||
namespace dom {
|
||||
|
||||
class TabParent
|
||||
: public IFrameEmbeddingProtocolParent
|
||||
: public PIFrameEmbeddingProtocolParent
|
||||
{
|
||||
public:
|
||||
TabParent();
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -50,6 +50,8 @@
|
|||
namespace mozilla {
|
||||
namespace plugins {
|
||||
|
||||
class PBrowserStreamProtocolChild;
|
||||
|
||||
class PluginInstanceChild : public PPluginInstanceProtocolChild
|
||||
{
|
||||
#ifdef OS_WIN
|
||||
|
|
|
@ -0,0 +1,109 @@
|
|||
/* -*- 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 PTest
|
||||
{
|
||||
child:
|
||||
Hello();
|
||||
|
||||
parent:
|
||||
World();
|
||||
};
|
||||
|
||||
} // namespace test
|
||||
} // namespace mozilla
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Example solution to exercise
|
||||
/*
|
||||
include "nsTArray.h";
|
||||
using nsTArray<nsCString>;
|
||||
|
||||
namespace mozilla {
|
||||
namespace test {
|
||||
|
||||
sync protocol PTest
|
||||
{
|
||||
both:
|
||||
Ping();
|
||||
Pong(int status);
|
||||
|
||||
parent:
|
||||
GetValue(nsCString key);
|
||||
GetValues(nsTArray<nsCString> keys);
|
||||
sync SetValue(nsCString key, nsCString val) returns (bool ok);
|
||||
|
||||
child:
|
||||
TellValue(nsCString key, nsCString val);
|
||||
TellValues(nsTArray<nsCString> keys, nsTArray<nsCString> vals);
|
||||
|
||||
state START:
|
||||
send Ping goto START;
|
||||
recv Pong goto START;
|
||||
|
||||
recv SetValue goto HAVE_VALUES;
|
||||
|
||||
state HAVE_VALUES:
|
||||
send Ping goto HAVE_VALUES;
|
||||
recv Pong goto HAVE_VALUES;
|
||||
|
||||
recv SetValue goto HAVE_VALUES;
|
||||
|
||||
recv GetValue goto TELLING_VALUE;
|
||||
recv GetValues goto TELLING_VALUES;
|
||||
|
||||
state TELLING_VALUE:
|
||||
send Ping goto TELLING_VALUE;
|
||||
recv Pong goto TELLING_VALUE;
|
||||
|
||||
send TellValue goto HAVE_VALUES;
|
||||
|
||||
state TELLING_VALUES:
|
||||
send Ping goto TELLING_VALUES;
|
||||
recv Pong goto TELLING_VALUES;
|
||||
|
||||
send TellValues goto HAVE_VALUES;
|
||||
};
|
||||
|
||||
} // namespace test
|
||||
} // namespace mozilla
|
||||
*/
|
|
@ -1,72 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// "Hello world" example
|
||||
namespace mozilla {
|
||||
namespace test {
|
||||
|
||||
protocol Test
|
||||
{
|
||||
child:
|
||||
Hello();
|
||||
|
||||
parent:
|
||||
World();
|
||||
};
|
||||
|
||||
} // namespace test
|
||||
} // namespace mozilla
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Example solution to exercise
|
||||
/*
|
||||
include "nsTArray.h";
|
||||
using nsTArray<nsCString>;
|
||||
|
||||
namespace mozilla {
|
||||
namespace test {
|
||||
|
||||
sync protocol Test
|
||||
{
|
||||
both:
|
||||
Ping();
|
||||
Pong(int status);
|
||||
|
||||
parent:
|
||||
GetValue(nsCString key);
|
||||
GetValues(nsTArray<nsCString> keys);
|
||||
sync SetValue(nsCString key, nsCString val) returns (bool ok);
|
||||
|
||||
child:
|
||||
TellValue(nsCString key, nsCString val);
|
||||
TellValues(nsTArray<nsCString> keys, nsTArray<nsCString> vals);
|
||||
|
||||
state START:
|
||||
send Ping goto START;
|
||||
recv Pong goto START;
|
||||
|
||||
recv SetValue goto HAVE_VALUES;
|
||||
|
||||
state HAVE_VALUES:
|
||||
send Ping goto HAVE_VALUES;
|
||||
recv Pong goto HAVE_VALUES;
|
||||
|
||||
recv SetValue goto HAVE_VALUES;
|
||||
|
||||
recv GetValue goto TELLING_VALUE;
|
||||
recv GetValues goto TELLING_VALUES;
|
||||
|
||||
state TELLING_VALUE:
|
||||
send Ping goto TELLING_VALUE;
|
||||
recv Pong goto TELLING_VALUE;
|
||||
|
||||
send TellValue goto HAVE_VALUES;
|
||||
|
||||
state TELLING_VALUES:
|
||||
send Ping goto TELLING_VALUES;
|
||||
recv Pong goto TELLING_VALUES;
|
||||
|
||||
send TellValues goto HAVE_VALUES;
|
||||
};
|
||||
|
||||
} // namespace test
|
||||
} // namespace mozilla
|
||||
*/
|
|
@ -1,4 +1,41 @@
|
|||
#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;
|
||||
|
||||
|
|
|
@ -1,11 +1,51 @@
|
|||
#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:
|
||||
|
||||
|
@ -35,3 +75,5 @@ public:
|
|||
|
||||
} // namespace test
|
||||
} // namespace mozilla
|
||||
|
||||
#endif /* ipc_test_harness_TestChild_h */
|
||||
|
|
|
@ -1,4 +1,41 @@
|
|||
#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;
|
||||
|
||||
|
|
|
@ -1,11 +1,51 @@
|
|||
#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
|
||||
|
@ -36,3 +76,5 @@ public:
|
|||
|
||||
} // namespace test
|
||||
} // namespace mozilla
|
||||
|
||||
#endif /* ipc_test_harness_TestParent_h */
|
||||
|
|
|
@ -1,10 +1,47 @@
|
|||
#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)
|
||||
{
|
||||
|
@ -14,6 +51,5 @@ TestProcessParent::~TestProcessParent()
|
|||
{
|
||||
}
|
||||
|
||||
|
||||
} // namespace test
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -1,5 +1,42 @@
|
|||
#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"
|
||||
|
||||
|
@ -27,4 +64,4 @@ private:
|
|||
} // namespace plugins
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // ifndef mozilla_test_TestProcessParent_h
|
||||
#endif // ifndef ipc_test_harness_TestProcessParent_h
|
||||
|
|
|
@ -1,6 +1,43 @@
|
|||
#include "mozilla/test/TestThreadChild.h"
|
||||
using mozilla::test::TestThreadChild;
|
||||
/* -*- 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() :
|
||||
|
|
|
@ -1,5 +1,42 @@
|
|||
#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"
|
||||
|
@ -24,4 +61,4 @@ private:
|
|||
} // namespace test
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // ifndef mozilla_test_TestThreadChild_h
|
||||
#endif // ifndef ipc_test_harness_TestThreadChild_h
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
IPDLSRCS = \
|
||||
Test.ipdl \
|
||||
PTest.ipdl \
|
||||
$(NULL)
|
||||
|
|
|
@ -35,25 +35,25 @@
|
|||
*
|
||||
* ***** 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
|
|
@ -35,14 +35,14 @@
|
|||
*
|
||||
* ***** 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
|
|
@ -37,7 +37,7 @@
|
|||
#include "TestShellChild.h"
|
||||
|
||||
using mozilla::ipc::TestShellChild;
|
||||
using mozilla::ipc::TestShellCommandProtocolChild;
|
||||
using mozilla::ipc::PTestShellCommandProtocolChild;
|
||||
using mozilla::ipc::XPCShellEnvironment;
|
||||
|
||||
TestShellChild::TestShellChild()
|
||||
|
@ -56,15 +56,15 @@ TestShellChild::RecvExecuteCommand(const nsString& aCommand)
|
|||
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;
|
||||
|
@ -72,8 +72,8 @@ TestShellChild::TestShellCommandDestructor(TestShellCommandProtocolChild* aComma
|
|||
}
|
||||
|
||||
nsresult
|
||||
TestShellChild::RecvTestShellCommandConstructor(TestShellCommandProtocolChild* aActor,
|
||||
const nsString& aCommand)
|
||||
TestShellChild::RecvPTestShellCommandConstructor(PTestShellCommandProtocolChild* aActor,
|
||||
const nsString& aCommand)
|
||||
{
|
||||
NS_ASSERTION(aActor, "Shouldn't be null!");
|
||||
|
||||
|
@ -87,7 +87,7 @@ TestShellChild::RecvTestShellCommandConstructor(TestShellCommandProtocolChild* a
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsresult rv = SendTestShellCommandDestructor(aActor, response);
|
||||
nsresult rv = SendPTestShellCommandDestructor(aActor, response);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
@ -34,11 +34,11 @@
|
|||
*
|
||||
* ***** 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"
|
||||
|
@ -48,7 +48,7 @@ namespace ipc {
|
|||
|
||||
class XPCShellEnvironment;
|
||||
|
||||
class TestShellChild : public TestShellProtocolChild
|
||||
class TestShellChild : public PTestShellProtocolChild
|
||||
{
|
||||
public:
|
||||
TestShellChild();
|
||||
|
@ -56,16 +56,16 @@ public:
|
|||
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;
|
||||
|
@ -78,4 +78,4 @@ private:
|
|||
} /* namespace ipc */
|
||||
} /* namespace mozilla */
|
||||
|
||||
#endif /* _IPC_TESTSHELL_TESTSHELLCHILD_H_ */
|
||||
#endif /* ipc_testshell_TestShellChild_h */
|
||||
|
|
|
@ -40,17 +40,17 @@
|
|||
|
||||
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;
|
||||
|
@ -58,8 +58,8 @@ TestShellParent::TestShellCommandDestructor(TestShellCommandProtocolParent* aAct
|
|||
}
|
||||
|
||||
nsresult
|
||||
TestShellParent::RecvTestShellCommandDestructor(TestShellCommandProtocolParent* aActor,
|
||||
const nsString& aResponse)
|
||||
TestShellParent::RecvPTestShellCommandDestructor(PTestShellCommandProtocolParent* aActor,
|
||||
const nsString& aResponse)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aActor);
|
||||
|
||||
|
|
|
@ -34,11 +34,11 @@
|
|||
*
|
||||
* ***** 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"
|
||||
|
@ -47,7 +47,7 @@
|
|||
namespace mozilla {
|
||||
namespace ipc {
|
||||
|
||||
class TestShellCommandParent : public TestShellCommandProtocolParent
|
||||
class TestShellCommandParent : public PTestShellCommandProtocolParent
|
||||
{
|
||||
public:
|
||||
TestShellCommandParent() : mCx(NULL) { }
|
||||
|
@ -64,22 +64,22 @@ private:
|
|||
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 */
|
||||
|
|
|
@ -76,7 +76,6 @@
|
|||
using mozilla::ipc::XPCShellEnvironment;
|
||||
using mozilla::ipc::TestShellChild;
|
||||
using mozilla::ipc::TestShellParent;
|
||||
using mozilla::ipc::TestShellCommandProtocolParent;
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
IPDLSRCS = \
|
||||
TestShell.ipdl \
|
||||
TestShellCommand.ipdl \
|
||||
PTestShell.ipdl \
|
||||
PTestShellCommand.ipdl \
|
||||
$(NULL)
|
||||
|
|
|
@ -72,9 +72,9 @@
|
|||
#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"
|
||||
|
@ -465,7 +465,7 @@ XRE_SendTestShellCommand(JSContext* aCx,
|
|||
}
|
||||
|
||||
TestShellCommandParent* callback = static_cast<TestShellCommandParent*>(
|
||||
gTestShellParent->SendTestShellCommandConstructor(command));
|
||||
gTestShellParent->SendPTestShellCommandConstructor(command));
|
||||
NS_ENSURE_TRUE(callback, false);
|
||||
|
||||
jsval callbackVal = *reinterpret_cast<jsval*>(aCallback);
|
||||
|
|
Загрузка…
Ссылка в новой задаче