michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * vim: sw=4 ts=4 et : michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef dom_plugins_PluginProcessParent_h michael@0: #define dom_plugins_PluginProcessParent_h 1 michael@0: michael@0: #include "mozilla/Attributes.h" michael@0: #include "base/basictypes.h" michael@0: michael@0: #include "base/file_path.h" michael@0: #include "base/scoped_ptr.h" michael@0: #include "base/thread.h" michael@0: #include "base/waitable_event.h" michael@0: #include "chrome/common/child_process_host.h" michael@0: michael@0: #include "mozilla/ipc/GeckoChildProcessHost.h" michael@0: michael@0: namespace mozilla { michael@0: namespace plugins { michael@0: //----------------------------------------------------------------------------- michael@0: michael@0: class PluginProcessParent : public mozilla::ipc::GeckoChildProcessHost michael@0: { michael@0: public: michael@0: PluginProcessParent(const std::string& aPluginFilePath); michael@0: ~PluginProcessParent(); michael@0: michael@0: /** michael@0: * Synchronously launch the plugin process. If the process fails to launch michael@0: * after timeoutMs, this method will return false. michael@0: */ michael@0: bool Launch(int32_t timeoutMs); michael@0: michael@0: void Delete(); michael@0: michael@0: virtual bool CanShutdown() MOZ_OVERRIDE michael@0: { michael@0: return true; michael@0: } michael@0: michael@0: const std::string& GetPluginFilePath() { return mPluginFilePath; } michael@0: michael@0: using mozilla::ipc::GeckoChildProcessHost::GetShutDownEvent; michael@0: using mozilla::ipc::GeckoChildProcessHost::GetChannel; michael@0: michael@0: private: michael@0: std::string mPluginFilePath; michael@0: michael@0: DISALLOW_EVIL_CONSTRUCTORS(PluginProcessParent); michael@0: }; michael@0: michael@0: michael@0: } // namespace plugins michael@0: } // namespace mozilla michael@0: michael@0: #endif // ifndef dom_plugins_PluginProcessParent_h