| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ | 5 #ifndef CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ |
| 6 #define CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ | 6 #define CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/process.h" | 15 #include "base/process.h" |
| 16 #include "base/scoped_native_library.h" | 16 #include "base/scoped_native_library.h" |
| 17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
| 18 #include "content/common/child_thread.h" | 18 #include "content/common/child_thread.h" |
| 19 #include "ppapi/c/pp_module.h" | 19 #include "ppapi/c/pp_module.h" |
| 20 #include "ppapi/c/trusted/ppp_broker.h" | 20 #include "ppapi/c/trusted/ppp_broker.h" |
| 21 #include "ppapi/proxy/plugin_dispatcher.h" | 21 #include "ppapi/proxy/plugin_dispatcher.h" |
| 22 #include "ppapi/proxy/plugin_globals.h" | 22 #include "ppapi/proxy/plugin_globals.h" |
| 23 #include "ppapi/proxy/plugin_proxy_delegate.h" | 23 #include "ppapi/proxy/plugin_proxy_delegate.h" |
| 24 | 24 |
| 25 class CommandLine; |
| 25 class FilePath; | 26 class FilePath; |
| 26 class PpapiWebKitPlatformSupportImpl; | 27 class PpapiWebKitPlatformSupportImpl; |
| 27 | 28 |
| 28 namespace IPC { | 29 namespace IPC { |
| 29 struct ChannelHandle; | 30 struct ChannelHandle; |
| 30 } | 31 } |
| 31 | 32 |
| 32 class PpapiThread : public ChildThread, | 33 class PpapiThread : public ChildThread, |
| 33 public ppapi::proxy::PluginDispatcher::PluginDelegate, | 34 public ppapi::proxy::PluginDispatcher::PluginDelegate, |
| 34 public ppapi::proxy::PluginProxyDelegate { | 35 public ppapi::proxy::PluginProxyDelegate { |
| 35 public: | 36 public: |
| 36 explicit PpapiThread(bool is_broker); | 37 PpapiThread(const CommandLine& command_line, bool is_broker); |
| 37 virtual ~PpapiThread(); | 38 virtual ~PpapiThread(); |
| 38 | 39 |
| 39 private: | 40 private: |
| 40 // ChildThread overrides. | 41 // ChildThread overrides. |
| 41 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 42 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 42 | 43 |
| 43 // PluginDispatcher::PluginDelegate implementation. | 44 // PluginDispatcher::PluginDelegate implementation. |
| 44 virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet() OVERRIDE; | 45 virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet() OVERRIDE; |
| 45 virtual base::MessageLoopProxy* GetIPCMessageLoop() OVERRIDE; | 46 virtual base::MessageLoopProxy* GetIPCMessageLoop() OVERRIDE; |
| 46 virtual base::WaitableEvent* GetShutdownEvent() OVERRIDE; | 47 virtual base::WaitableEvent* GetShutdownEvent() OVERRIDE; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 std::map<uint32, ppapi::proxy::PluginDispatcher*> plugin_dispatchers_; | 98 std::map<uint32, ppapi::proxy::PluginDispatcher*> plugin_dispatchers_; |
| 98 uint32 next_plugin_dispatcher_id_; | 99 uint32 next_plugin_dispatcher_id_; |
| 99 | 100 |
| 100 // The WebKitPlatformSupport implementation. | 101 // The WebKitPlatformSupport implementation. |
| 101 scoped_ptr<PpapiWebKitPlatformSupportImpl> webkit_platform_support_; | 102 scoped_ptr<PpapiWebKitPlatformSupportImpl> webkit_platform_support_; |
| 102 | 103 |
| 103 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread); | 104 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread); |
| 104 }; | 105 }; |
| 105 | 106 |
| 106 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ | 107 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ |
| OLD | NEW |