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 // This class responds to requests from renderers for the list of plugins, and | 5 // This class responds to requests from renderers for the list of plugins, and |
6 // also a proxy object for plugin instances. | 6 // also a proxy object for plugin instances. |
7 | 7 |
8 #ifndef CONTENT_BROWSER_PLUGIN_SERVICE_H_ | 8 #ifndef CONTENT_BROWSER_PLUGIN_SERVICE_H_ |
9 #define CONTENT_BROWSER_PLUGIN_SERVICE_H_ | 9 #define CONTENT_BROWSER_PLUGIN_SERVICE_H_ |
10 #pragma once | 10 #pragma once |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "base/memory/scoped_ptr.h" | 30 #include "base/memory/scoped_ptr.h" |
31 #include "base/win/registry.h" | 31 #include "base/win/registry.h" |
32 #endif | 32 #endif |
33 | 33 |
34 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 34 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
35 #include "base/files/file_path_watcher.h" | 35 #include "base/files/file_path_watcher.h" |
36 #endif | 36 #endif |
37 | 37 |
38 struct PepperPluginInfo; | 38 struct PepperPluginInfo; |
39 class PluginDirWatcherDelegate; | 39 class PluginDirWatcherDelegate; |
| 40 class PluginLoader; |
40 | 41 |
41 namespace base { | 42 namespace base { |
42 class MessageLoopProxy; | 43 class MessageLoopProxy; |
43 } | 44 } |
44 | 45 |
45 namespace content { | 46 namespace content { |
46 class BrowserContext; | 47 class BrowserContext; |
47 class ResourceContext; | 48 class ResourceContext; |
48 class PluginServiceFilter; | 49 class PluginServiceFilter; |
49 struct PluginServiceFilterParams; | 50 struct PluginServiceFilterParams; |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 const NotificationDetails& details); | 192 const NotificationDetails& details); |
192 | 193 |
193 void RegisterPepperPlugins(); | 194 void RegisterPepperPlugins(); |
194 | 195 |
195 PepperPluginInfo* GetRegisteredPpapiPluginInfo(const FilePath& plugin_path); | 196 PepperPluginInfo* GetRegisteredPpapiPluginInfo(const FilePath& plugin_path); |
196 | 197 |
197 // Function that is run on the FILE thread to load the plugins synchronously. | 198 // Function that is run on the FILE thread to load the plugins synchronously. |
198 void GetPluginsInternal(base::MessageLoopProxy* target_loop, | 199 void GetPluginsInternal(base::MessageLoopProxy* target_loop, |
199 const GetPluginsCallback& callback); | 200 const GetPluginsCallback& callback); |
200 | 201 |
| 202 #if defined(OS_POSIX) |
| 203 void LoadPluginsOutOfProcess( |
| 204 base::MessageLoopProxy* target_loop, |
| 205 const PluginService::GetPluginsCallback& callback); |
| 206 #endif |
| 207 |
201 // Binding directly to GetAllowedPluginForOpenChannelToPlugin() isn't possible | 208 // Binding directly to GetAllowedPluginForOpenChannelToPlugin() isn't possible |
202 // because more arity is needed <http://crbug.com/98542>. This just forwards. | 209 // because more arity is needed <http://crbug.com/98542>. This just forwards. |
203 void ForwardGetAllowedPluginForOpenChannelToPlugin( | 210 void ForwardGetAllowedPluginForOpenChannelToPlugin( |
204 const content::PluginServiceFilterParams& params, | 211 const content::PluginServiceFilterParams& params, |
205 const GURL& url, | 212 const GURL& url, |
206 const std::string& mime_type, | 213 const std::string& mime_type, |
207 PluginProcessHost::Client* client, | 214 PluginProcessHost::Client* client, |
208 const std::vector<webkit::WebPluginInfo>&); | 215 const std::vector<webkit::WebPluginInfo>&); |
209 // Helper so we can do the plugin lookup on the FILE thread. | 216 // Helper so we can do the plugin lookup on the FILE thread. |
210 void GetAllowedPluginForOpenChannelToPlugin( | 217 void GetAllowedPluginForOpenChannelToPlugin( |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 scoped_refptr<PluginDirWatcherDelegate> file_watcher_delegate_; | 257 scoped_refptr<PluginDirWatcherDelegate> file_watcher_delegate_; |
251 #endif | 258 #endif |
252 | 259 |
253 std::vector<PepperPluginInfo> ppapi_plugins_; | 260 std::vector<PepperPluginInfo> ppapi_plugins_; |
254 | 261 |
255 // Weak pointer; outlives us. | 262 // Weak pointer; outlives us. |
256 content::PluginServiceFilter* filter_; | 263 content::PluginServiceFilter* filter_; |
257 | 264 |
258 std::set<PluginProcessHost::Client*> pending_plugin_clients_; | 265 std::set<PluginProcessHost::Client*> pending_plugin_clients_; |
259 | 266 |
| 267 #if defined(OS_POSIX) |
| 268 scoped_refptr<PluginLoader> plugin_loader_; |
| 269 #endif |
| 270 |
260 DISALLOW_COPY_AND_ASSIGN(PluginService); | 271 DISALLOW_COPY_AND_ASSIGN(PluginService); |
261 }; | 272 }; |
262 | 273 |
263 DISABLE_RUNNABLE_METHOD_REFCOUNT(PluginService); | 274 DISABLE_RUNNABLE_METHOD_REFCOUNT(PluginService); |
264 | 275 |
265 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_H_ | 276 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_H_ |
OLD | NEW |