2009-08-12 20:18:08 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* vim: sw=4 ts=4 et : */
|
|
|
|
|
|
|
|
#ifndef mozilla_dom_ContentProcessParent_h
|
|
|
|
#define mozilla_dom_ContentProcessParent_h
|
|
|
|
|
|
|
|
#include "mozilla/dom/ContentProcessProtocolParent.h"
|
|
|
|
#include "mozilla/ipc/GeckoChildProcessHost.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
2009-08-12 22:31:48 +04:00
|
|
|
namespace ipc {
|
|
|
|
class TestShellParent;
|
|
|
|
}
|
|
|
|
|
2009-08-12 20:18:08 +04:00
|
|
|
namespace dom {
|
|
|
|
|
|
|
|
class TabParent;
|
|
|
|
|
|
|
|
class ContentProcessParent
|
|
|
|
: private ContentProcessProtocolParent
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
typedef mozilla::ipc::GeckoChildProcessHost GeckoChildProcessHost;
|
|
|
|
|
|
|
|
public:
|
|
|
|
static ContentProcessParent* GetSingleton();
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
// TODO: implement this somewhere!
|
|
|
|
static ContentProcessParent* FreeSingleton();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
TabParent* CreateTab(const MagicWindowHandle& hwnd);
|
2009-08-12 22:31:48 +04:00
|
|
|
mozilla::ipc::TestShellParent* CreateTestShell();
|
2009-08-12 20:18:08 +04:00
|
|
|
|
|
|
|
private:
|
|
|
|
static ContentProcessParent* gSingleton;
|
|
|
|
|
2009-08-12 22:31:48 +04:00
|
|
|
// Hide the raw constructor methods since we don't want client code
|
|
|
|
// using them.
|
2009-08-12 20:18:08 +04:00
|
|
|
using ContentProcessProtocolParent::SendIFrameEmbeddingConstructor;
|
2009-08-12 22:31:48 +04:00
|
|
|
using ContentProcessProtocolParent::SendTestShellConstructor;
|
2009-08-12 20:18:08 +04:00
|
|
|
|
|
|
|
ContentProcessParent();
|
|
|
|
virtual ~ContentProcessParent();
|
|
|
|
|
|
|
|
virtual IFrameEmbeddingProtocolParent* IFrameEmbeddingConstructor(const MagicWindowHandle& parentWidget);
|
|
|
|
virtual nsresult IFrameEmbeddingDestructor(IFrameEmbeddingProtocolParent* frame);
|
|
|
|
|
2009-08-12 22:31:48 +04:00
|
|
|
virtual TestShellProtocolParent* TestShellConstructor();
|
|
|
|
virtual nsresult TestShellDestructor(TestShellProtocolParent* shell);
|
|
|
|
|
2009-08-12 20:18:08 +04:00
|
|
|
GeckoChildProcessHost mSubprocess;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif
|