Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 : * vim: sw=4 ts=4 et :
3 : * This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #ifndef dom_plugins_PluginProcessChild_h
8 : #define dom_plugins_PluginProcessChild_h 1
9 :
10 : #include "mozilla/ipc/ProcessChild.h"
11 : #include "mozilla/plugins/PluginModuleChild.h"
12 :
13 : #if defined(XP_WIN)
14 : #include "mozilla/mscom/MainThreadRuntime.h"
15 : #endif
16 :
17 : namespace mozilla {
18 : namespace plugins {
19 : //-----------------------------------------------------------------------------
20 :
21 : class PluginProcessChild : public mozilla::ipc::ProcessChild {
22 : protected:
23 : typedef mozilla::ipc::ProcessChild ProcessChild;
24 :
25 : public:
26 0 : explicit PluginProcessChild(ProcessId aParentPid)
27 0 : : ProcessChild(aParentPid), mPlugin(true)
28 0 : { }
29 :
30 0 : virtual ~PluginProcessChild()
31 0 : { }
32 :
33 : virtual bool Init(int aArgc, char* aArgv[]) override;
34 : virtual void CleanUp() override;
35 :
36 : protected:
37 : static PluginProcessChild* current() {
38 : return static_cast<PluginProcessChild*>(ProcessChild::current());
39 : }
40 :
41 : private:
42 : #if defined(XP_WIN)
43 : /* Drag-and-drop depends on the host initializing COM.
44 : * This object initializes and configures COM. */
45 : mozilla::mscom::MainThreadRuntime mCOMRuntime;
46 : #endif
47 : PluginModuleChild mPlugin;
48 :
49 : DISALLOW_EVIL_CONSTRUCTORS(PluginProcessChild);
50 : };
51 :
52 : } // namespace plugins
53 : } // namespace mozilla
54 :
55 : #endif // ifndef dom_plugins_PluginProcessChild_h
|