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 |
(...skipping 10 matching lines...) Expand all Loading... |
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 #include "webkit/plugins/ppapi/plugin_module.h" | 24 #include "webkit/plugins/ppapi/plugin_module.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 class CommandLine; | 30 class CommandLine; |
| 31 |
| 32 namespace base { |
31 class FilePath; | 33 class FilePath; |
| 34 } |
32 | 35 |
33 namespace IPC { | 36 namespace IPC { |
34 struct ChannelHandle; | 37 struct ChannelHandle; |
35 } | 38 } |
36 | 39 |
37 namespace content { | 40 namespace content { |
38 | 41 |
39 class PpapiWebKitPlatformSupportImpl; | 42 class PpapiWebKitPlatformSupportImpl; |
40 | 43 |
41 class PpapiThread : public ChildThread, | 44 class PpapiThread : public ChildThread, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 84 |
82 // PluginProxyDelegate. | 85 // PluginProxyDelegate. |
83 // SendToBrowser() is intended to be safe to use on another thread so | 86 // SendToBrowser() is intended to be safe to use on another thread so |
84 // long as the main PpapiThread outlives it. | 87 // long as the main PpapiThread outlives it. |
85 virtual IPC::Sender* GetBrowserSender() OVERRIDE; | 88 virtual IPC::Sender* GetBrowserSender() OVERRIDE; |
86 virtual std::string GetUILanguage() OVERRIDE; | 89 virtual std::string GetUILanguage() OVERRIDE; |
87 virtual void PreCacheFont(const void* logfontw) OVERRIDE; | 90 virtual void PreCacheFont(const void* logfontw) OVERRIDE; |
88 virtual void SetActiveURL(const std::string& url) OVERRIDE; | 91 virtual void SetActiveURL(const std::string& url) OVERRIDE; |
89 | 92 |
90 // Message handlers. | 93 // Message handlers. |
91 void OnLoadPlugin(const FilePath& path, | 94 void OnLoadPlugin(const base::FilePath& path, |
92 const ppapi::PpapiPermissions& permissions); | 95 const ppapi::PpapiPermissions& permissions); |
93 void OnCreateChannel(base::ProcessId renderer_pid, | 96 void OnCreateChannel(base::ProcessId renderer_pid, |
94 int renderer_child_id, | 97 int renderer_child_id, |
95 bool incognito); | 98 bool incognito); |
96 void OnResourceReply( | 99 void OnResourceReply( |
97 const ppapi::proxy::ResourceMessageReplyParams& reply_params, | 100 const ppapi::proxy::ResourceMessageReplyParams& reply_params, |
98 const IPC::Message& nested_msg); | 101 const IPC::Message& nested_msg); |
99 void OnSetNetworkState(bool online); | 102 void OnSetNetworkState(bool online); |
100 void OnCrash(); | 103 void OnCrash(); |
101 void OnHang(); | 104 void OnHang(); |
102 | 105 |
103 // Sets up the channel to the given renderer. On success, returns true and | 106 // Sets up the channel to the given renderer. On success, returns true and |
104 // fills the given ChannelHandle with the information from the new channel. | 107 // fills the given ChannelHandle with the information from the new channel. |
105 bool SetupRendererChannel(base::ProcessId renderer_pid, | 108 bool SetupRendererChannel(base::ProcessId renderer_pid, |
106 int renderer_child_id, | 109 int renderer_child_id, |
107 bool incognito, | 110 bool incognito, |
108 IPC::ChannelHandle* handle); | 111 IPC::ChannelHandle* handle); |
109 | 112 |
110 // Sets up the name of the plugin for logging using the given path. | 113 // Sets up the name of the plugin for logging using the given path. |
111 void SavePluginName(const FilePath& path); | 114 void SavePluginName(const base::FilePath& path); |
112 | 115 |
113 // True if running in a broker process rather than a normal plugin process. | 116 // True if running in a broker process rather than a normal plugin process. |
114 bool is_broker_; | 117 bool is_broker_; |
115 | 118 |
116 base::ScopedNativeLibrary library_; | 119 base::ScopedNativeLibrary library_; |
117 | 120 |
118 ppapi::PpapiPermissions permissions_; | 121 ppapi::PpapiPermissions permissions_; |
119 | 122 |
120 // Global state tracking for the proxy. | 123 // Global state tracking for the proxy. |
121 ppapi::proxy::PluginGlobals plugin_globals_; | 124 ppapi::proxy::PluginGlobals plugin_globals_; |
(...skipping 29 matching lines...) Expand all Loading... |
151 #endif | 154 #endif |
152 | 155 |
153 DispatcherMessageListener dispatcher_message_listener_; | 156 DispatcherMessageListener dispatcher_message_listener_; |
154 | 157 |
155 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread); | 158 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread); |
156 }; | 159 }; |
157 | 160 |
158 } // namespace content | 161 } // namespace content |
159 | 162 |
160 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ | 163 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ |
OLD | NEW |