2009-06-30 22:51:05 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
|
|
* vim: sw=4 ts=4 et :
|
2012-05-21 15:12:37 +04:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2009-06-30 22:51:05 +04:00
|
|
|
|
2010-05-11 08:18:00 +04:00
|
|
|
#ifndef dom_plugins_PluginProcessChild_h
|
|
|
|
#define dom_plugins_PluginProcessChild_h 1
|
2009-06-30 22:51:05 +04:00
|
|
|
|
2010-05-11 08:18:00 +04:00
|
|
|
#include "mozilla/ipc/ProcessChild.h"
|
2009-09-09 10:31:35 +04:00
|
|
|
#include "mozilla/plugins/PluginModuleChild.h"
|
2009-06-30 22:51:05 +04:00
|
|
|
|
2016-06-04 10:42:40 +03:00
|
|
|
#if defined(XP_WIN)
|
|
|
|
#include "mozilla/mscom/MainThreadRuntime.h"
|
|
|
|
#endif
|
|
|
|
|
2009-06-30 22:51:05 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace plugins {
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2010-05-11 08:18:00 +04:00
|
|
|
class PluginProcessChild : public mozilla::ipc::ProcessChild {
|
|
|
|
protected:
|
|
|
|
typedef mozilla::ipc::ProcessChild ProcessChild;
|
|
|
|
|
2009-06-30 22:51:05 +04:00
|
|
|
public:
|
2015-04-01 11:40:35 +03:00
|
|
|
explicit PluginProcessChild(ProcessId aParentPid)
|
|
|
|
: ProcessChild(aParentPid), mPlugin(true)
|
2010-05-11 08:18:00 +04:00
|
|
|
{ }
|
2009-06-30 22:51:05 +04:00
|
|
|
|
2010-05-11 08:18:00 +04:00
|
|
|
virtual ~PluginProcessChild()
|
|
|
|
{ }
|
|
|
|
|
2017-02-05 08:52:38 +03:00
|
|
|
virtual bool Init(int aArgc, char* aArgv[]) override;
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void CleanUp() override;
|
2010-02-04 01:17:09 +03:00
|
|
|
|
2010-05-11 08:18:00 +04:00
|
|
|
protected:
|
|
|
|
static PluginProcessChild* current() {
|
|
|
|
return static_cast<PluginProcessChild*>(ProcessChild::current());
|
|
|
|
}
|
2009-06-30 22:51:05 +04:00
|
|
|
|
2010-05-11 08:18:00 +04:00
|
|
|
private:
|
2016-06-04 10:42:40 +03:00
|
|
|
#if defined(XP_WIN)
|
2016-11-29 09:51:45 +03:00
|
|
|
/* Drag-and-drop depends on the host initializing COM.
|
2016-06-04 10:42:40 +03:00
|
|
|
* This object initializes and configures COM. */
|
|
|
|
mozilla::mscom::MainThreadRuntime mCOMRuntime;
|
|
|
|
#endif
|
2009-09-09 10:31:35 +04:00
|
|
|
PluginModuleChild mPlugin;
|
2009-06-30 22:51:05 +04:00
|
|
|
|
2010-05-11 08:18:00 +04:00
|
|
|
DISALLOW_EVIL_CONSTRUCTORS(PluginProcessChild);
|
2009-06-30 22:51:05 +04:00
|
|
|
};
|
|
|
|
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace plugins
|
|
|
|
} // namespace mozilla
|
2009-06-30 22:51:05 +04:00
|
|
|
|
2010-05-11 08:18:00 +04:00
|
|
|
#endif // ifndef dom_plugins_PluginProcessChild_h
|