OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/process/process.h" | 14 #include "base/process/process.h" |
15 #include "base/scoped_native_library.h" | 15 #include "base/scoped_native_library.h" |
16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
17 #include "content/child/child_thread.h" | 17 #include "content/child/child_thread.h" |
18 #include "content/public/common/pepper_plugin_info.h" | 18 #include "content/public/common/pepper_plugin_info.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/connection.h" | 21 #include "ppapi/proxy/connection.h" |
22 #include "ppapi/proxy/plugin_dispatcher.h" | 22 #include "ppapi/proxy/plugin_dispatcher.h" |
23 #include "ppapi/proxy/plugin_globals.h" | 23 #include "ppapi/proxy/plugin_globals.h" |
24 #include "ppapi/proxy/plugin_proxy_delegate.h" | 24 #include "ppapi/proxy/plugin_proxy_delegate.h" |
25 | 25 |
26 #if defined(OS_WIN) | 26 #if defined(OS_WIN) |
27 #include "base/win/scoped_handle.h" | 27 #include "base/win/scoped_handle.h" |
28 #endif | 28 #endif |
29 | 29 |
| 30 namespace base { |
30 class CommandLine; | 31 class CommandLine; |
31 | |
32 namespace base { | |
33 class FilePath; | 32 class FilePath; |
34 } | 33 } |
35 | 34 |
36 namespace IPC { | 35 namespace IPC { |
37 struct ChannelHandle; | 36 struct ChannelHandle; |
38 } | 37 } |
39 | 38 |
40 namespace content { | 39 namespace content { |
41 | 40 |
42 class PpapiWebKitPlatformSupportImpl; | 41 class PpapiWebKitPlatformSupportImpl; |
43 | 42 |
44 class PpapiThread : public ChildThread, | 43 class PpapiThread : public ChildThread, |
45 public ppapi::proxy::PluginDispatcher::PluginDelegate, | 44 public ppapi::proxy::PluginDispatcher::PluginDelegate, |
46 public ppapi::proxy::PluginProxyDelegate { | 45 public ppapi::proxy::PluginProxyDelegate { |
47 public: | 46 public: |
48 PpapiThread(const CommandLine& command_line, bool is_broker); | 47 PpapiThread(const base::CommandLine& command_line, bool is_broker); |
49 virtual ~PpapiThread(); | 48 virtual ~PpapiThread(); |
50 virtual void Shutdown() OVERRIDE; | 49 virtual void Shutdown() OVERRIDE; |
51 | 50 |
52 private: | 51 private: |
53 // Make sure the enum list in tools/histogram/histograms.xml is updated with | 52 // Make sure the enum list in tools/histogram/histograms.xml is updated with |
54 // any change in this list. | 53 // any change in this list. |
55 enum LoadResult { | 54 enum LoadResult { |
56 LOAD_SUCCESS, | 55 LOAD_SUCCESS, |
57 LOAD_FAILED, | 56 LOAD_FAILED, |
58 ENTRY_POINT_MISSING, | 57 ENTRY_POINT_MISSING, |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 // Caches the handle to the peer process if this is a broker. | 151 // Caches the handle to the peer process if this is a broker. |
153 base::win::ScopedHandle peer_handle_; | 152 base::win::ScopedHandle peer_handle_; |
154 #endif | 153 #endif |
155 | 154 |
156 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread); | 155 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread); |
157 }; | 156 }; |
158 | 157 |
159 } // namespace content | 158 } // namespace content |
160 | 159 |
161 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ | 160 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ |
OLD | NEW |