Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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/. */
7 #ifndef dom_plugins_PluginProcessParent_h
8 #define dom_plugins_PluginProcessParent_h 1
10 #include "mozilla/Attributes.h"
11 #include "base/basictypes.h"
13 #include "base/file_path.h"
14 #include "base/scoped_ptr.h"
15 #include "base/thread.h"
16 #include "base/waitable_event.h"
17 #include "chrome/common/child_process_host.h"
19 #include "mozilla/ipc/GeckoChildProcessHost.h"
21 namespace mozilla {
22 namespace plugins {
23 //-----------------------------------------------------------------------------
25 class PluginProcessParent : public mozilla::ipc::GeckoChildProcessHost
26 {
27 public:
28 PluginProcessParent(const std::string& aPluginFilePath);
29 ~PluginProcessParent();
31 /**
32 * Synchronously launch the plugin process. If the process fails to launch
33 * after timeoutMs, this method will return false.
34 */
35 bool Launch(int32_t timeoutMs);
37 void Delete();
39 virtual bool CanShutdown() MOZ_OVERRIDE
40 {
41 return true;
42 }
44 const std::string& GetPluginFilePath() { return mPluginFilePath; }
46 using mozilla::ipc::GeckoChildProcessHost::GetShutDownEvent;
47 using mozilla::ipc::GeckoChildProcessHost::GetChannel;
49 private:
50 std::string mPluginFilePath;
52 DISALLOW_EVIL_CONSTRUCTORS(PluginProcessParent);
53 };
56 } // namespace plugins
57 } // namespace mozilla
59 #endif // ifndef dom_plugins_PluginProcessParent_h