| 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 // 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_IMPL_H_ | 8 #ifndef CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ |
| 9 #define CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ | 9 #define CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #if defined(OS_WIN) | 35 #if defined(OS_WIN) |
| 36 #include "base/memory/scoped_ptr.h" | 36 #include "base/memory/scoped_ptr.h" |
| 37 #include "base/win/registry.h" | 37 #include "base/win/registry.h" |
| 38 #endif | 38 #endif |
| 39 | 39 |
| 40 #if defined(OS_POSIX) && !defined(OS_OPENBSD) && !defined(OS_ANDROID) | 40 #if defined(OS_POSIX) && !defined(OS_OPENBSD) && !defined(OS_ANDROID) |
| 41 #include "base/files/file_path_watcher.h" | 41 #include "base/files/file_path_watcher.h" |
| 42 #endif | 42 #endif |
| 43 | 43 |
| 44 namespace base { | 44 namespace base { |
| 45 class MessageLoopProxy; | 45 class SingleThreadTaskRunner; |
| 46 } | 46 } |
| 47 | 47 |
| 48 namespace content { | 48 namespace content { |
| 49 class BrowserContext; | 49 class BrowserContext; |
| 50 class PluginDirWatcherDelegate; | 50 class PluginDirWatcherDelegate; |
| 51 class PluginLoaderPosix; | 51 class PluginLoaderPosix; |
| 52 class PluginServiceFilter; | 52 class PluginServiceFilter; |
| 53 class ResourceContext; | 53 class ResourceContext; |
| 54 struct PepperPluginInfo; | 54 struct PepperPluginInfo; |
| 55 | 55 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 PluginProcessHost* FindNpapiPluginProcess(const base::FilePath& plugin_path); | 174 PluginProcessHost* FindNpapiPluginProcess(const base::FilePath& plugin_path); |
| 175 PpapiPluginProcessHost* FindPpapiPluginProcess( | 175 PpapiPluginProcessHost* FindPpapiPluginProcess( |
| 176 const base::FilePath& plugin_path, | 176 const base::FilePath& plugin_path, |
| 177 const base::FilePath& profile_data_directory); | 177 const base::FilePath& profile_data_directory); |
| 178 PpapiPluginProcessHost* FindPpapiBrokerProcess( | 178 PpapiPluginProcessHost* FindPpapiBrokerProcess( |
| 179 const base::FilePath& broker_path); | 179 const base::FilePath& broker_path); |
| 180 | 180 |
| 181 void RegisterPepperPlugins(); | 181 void RegisterPepperPlugins(); |
| 182 | 182 |
| 183 // Run on the blocking pool to load the plugins synchronously. | 183 // Run on the blocking pool to load the plugins synchronously. |
| 184 void GetPluginsInternal(base::MessageLoopProxy* target_loop, | 184 void GetPluginsInternal(base::SingleThreadTaskRunner* target_task_runner, |
| 185 const GetPluginsCallback& callback); | 185 const GetPluginsCallback& callback); |
| 186 | 186 |
| 187 #if defined(OS_POSIX) | 187 #if defined(OS_POSIX) |
| 188 void GetPluginsOnIOThread( | 188 void GetPluginsOnIOThread(base::SingleThreadTaskRunner* target_task_runner, |
| 189 base::MessageLoopProxy* target_loop, | 189 const GetPluginsCallback& callback); |
| 190 const GetPluginsCallback& callback); | |
| 191 #endif | 190 #endif |
| 192 | 191 |
| 193 // Binding directly to GetAllowedPluginForOpenChannelToPlugin() isn't possible | 192 // Binding directly to GetAllowedPluginForOpenChannelToPlugin() isn't possible |
| 194 // because more arity is needed <http://crbug.com/98542>. This just forwards. | 193 // because more arity is needed <http://crbug.com/98542>. This just forwards. |
| 195 void ForwardGetAllowedPluginForOpenChannelToPlugin( | 194 void ForwardGetAllowedPluginForOpenChannelToPlugin( |
| 196 const PluginServiceFilterParams& params, | 195 const PluginServiceFilterParams& params, |
| 197 const GURL& url, | 196 const GURL& url, |
| 198 const std::string& mime_type, | 197 const std::string& mime_type, |
| 199 PluginProcessHost::Client* client, | 198 PluginProcessHost::Client* client, |
| 200 const std::vector<WebPluginInfo>&); | 199 const std::vector<WebPluginInfo>&); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 | 247 |
| 249 // Used to detect if a given plugin is crashing over and over. | 248 // Used to detect if a given plugin is crashing over and over. |
| 250 std::map<base::FilePath, std::vector<base::Time> > crash_times_; | 249 std::map<base::FilePath, std::vector<base::Time> > crash_times_; |
| 251 | 250 |
| 252 DISALLOW_COPY_AND_ASSIGN(PluginServiceImpl); | 251 DISALLOW_COPY_AND_ASSIGN(PluginServiceImpl); |
| 253 }; | 252 }; |
| 254 | 253 |
| 255 } // namespace content | 254 } // namespace content |
| 256 | 255 |
| 257 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ | 256 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ |
| OLD | NEW |