| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 namespace content { | 46 namespace content { |
| 47 class BrowserContext; | 47 class BrowserContext; |
| 48 class PluginServiceFilter; | 48 class PluginServiceFilter; |
| 49 class ResourceContext; | 49 class ResourceContext; |
| 50 struct PepperPluginInfo; | 50 struct PepperPluginInfo; |
| 51 } | 51 } |
| 52 | 52 |
| 53 namespace webkit { | 53 namespace webkit { |
| 54 namespace npapi { | 54 namespace npapi { |
| 55 class PluginGroup; | |
| 56 class PluginList; | 55 class PluginList; |
| 57 } | 56 } |
| 58 } | 57 } |
| 59 | 58 |
| 60 // base::Bind() has limited arity, and the filter-related methods tend to | 59 // base::Bind() has limited arity, and the filter-related methods tend to |
| 61 // surpass that limit. | 60 // surpass that limit. |
| 62 struct PluginServiceFilterParams { | 61 struct PluginServiceFilterParams { |
| 63 int render_process_id; | 62 int render_process_id; |
| 64 int render_view_id; | 63 int render_view_id; |
| 65 GURL page_url; | 64 GURL page_url; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 89 const GURL& page_url, | 88 const GURL& page_url, |
| 90 const std::string& mime_type, | 89 const std::string& mime_type, |
| 91 bool allow_wildcard, | 90 bool allow_wildcard, |
| 92 bool* is_stale, | 91 bool* is_stale, |
| 93 webkit::WebPluginInfo* info, | 92 webkit::WebPluginInfo* info, |
| 94 std::string* actual_mime_type) OVERRIDE; | 93 std::string* actual_mime_type) OVERRIDE; |
| 95 virtual bool GetPluginInfoByPath(const FilePath& plugin_path, | 94 virtual bool GetPluginInfoByPath(const FilePath& plugin_path, |
| 96 webkit::WebPluginInfo* info) OVERRIDE; | 95 webkit::WebPluginInfo* info) OVERRIDE; |
| 97 virtual string16 GetPluginDisplayNameByPath(const FilePath& path) OVERRIDE; | 96 virtual string16 GetPluginDisplayNameByPath(const FilePath& path) OVERRIDE; |
| 98 virtual void GetPlugins(const GetPluginsCallback& callback) OVERRIDE; | 97 virtual void GetPlugins(const GetPluginsCallback& callback) OVERRIDE; |
| 99 virtual void GetPluginGroups( | |
| 100 const GetPluginGroupsCallback& callback) OVERRIDE; | |
| 101 virtual content::PepperPluginInfo* GetRegisteredPpapiPluginInfo( | 98 virtual content::PepperPluginInfo* GetRegisteredPpapiPluginInfo( |
| 102 const FilePath& plugin_path) OVERRIDE; | 99 const FilePath& plugin_path) OVERRIDE; |
| 103 virtual void SetFilter(content::PluginServiceFilter* filter) OVERRIDE; | 100 virtual void SetFilter(content::PluginServiceFilter* filter) OVERRIDE; |
| 104 virtual content::PluginServiceFilter* GetFilter() OVERRIDE; | 101 virtual content::PluginServiceFilter* GetFilter() OVERRIDE; |
| 105 virtual void ForcePluginShutdown(const FilePath& plugin_path) OVERRIDE; | 102 virtual void ForcePluginShutdown(const FilePath& plugin_path) OVERRIDE; |
| 106 virtual bool IsPluginUnstable(const FilePath& plugin_path) OVERRIDE; | 103 virtual bool IsPluginUnstable(const FilePath& plugin_path) OVERRIDE; |
| 107 virtual void RefreshPlugins() OVERRIDE; | 104 virtual void RefreshPlugins() OVERRIDE; |
| 108 virtual void AddExtraPluginPath(const FilePath& path) OVERRIDE; | 105 virtual void AddExtraPluginPath(const FilePath& path) OVERRIDE; |
| 109 virtual void AddExtraPluginDir(const FilePath& path) OVERRIDE; | 106 virtual void AddExtraPluginDir(const FilePath& path) OVERRIDE; |
| 110 virtual void RemoveExtraPluginPath(const FilePath& path) OVERRIDE; | 107 virtual void RemoveExtraPluginPath(const FilePath& path) OVERRIDE; |
| 111 virtual void UnregisterInternalPlugin(const FilePath& path) OVERRIDE; | 108 virtual void UnregisterInternalPlugin(const FilePath& path) OVERRIDE; |
| 112 virtual void RegisterInternalPlugin( | 109 virtual void RegisterInternalPlugin( |
| 113 const webkit::WebPluginInfo& info, bool add_at_beginning) OVERRIDE; | 110 const webkit::WebPluginInfo& info, bool add_at_beginning) OVERRIDE; |
| 114 virtual string16 GetPluginGroupName(const std::string& plugin_name) OVERRIDE; | |
| 115 virtual webkit::npapi::PluginList* GetPluginList() OVERRIDE; | 111 virtual webkit::npapi::PluginList* GetPluginList() OVERRIDE; |
| 116 virtual void SetPluginListForTesting( | 112 virtual void SetPluginListForTesting( |
| 117 webkit::npapi::PluginList* plugin_list) OVERRIDE; | 113 webkit::npapi::PluginList* plugin_list) OVERRIDE; |
| 118 #if defined(OS_MACOSX) | 114 #if defined(OS_MACOSX) |
| 119 virtual void AppActivated() OVERRIDE; | 115 virtual void AppActivated() OVERRIDE; |
| 120 #endif | 116 #endif |
| 121 | 117 |
| 122 // Returns the plugin process host corresponding to the plugin process that | 118 // Returns the plugin process host corresponding to the plugin process that |
| 123 // has been started by this service. This will start a process to host the | 119 // has been started by this service. This will start a process to host the |
| 124 // 'plugin_path' if needed. If the process fails to start, the return value | 120 // 'plugin_path' if needed. If the process fails to start, the return value |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 scoped_refptr<PluginLoaderPosix> plugin_loader_; | 243 scoped_refptr<PluginLoaderPosix> plugin_loader_; |
| 248 #endif | 244 #endif |
| 249 | 245 |
| 250 // Used to detect if a given plug-in is crashing over and over. | 246 // Used to detect if a given plug-in is crashing over and over. |
| 251 std::map<FilePath, std::vector<base::Time> > crash_times_; | 247 std::map<FilePath, std::vector<base::Time> > crash_times_; |
| 252 | 248 |
| 253 DISALLOW_COPY_AND_ASSIGN(PluginServiceImpl); | 249 DISALLOW_COPY_AND_ASSIGN(PluginServiceImpl); |
| 254 }; | 250 }; |
| 255 | 251 |
| 256 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ | 252 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ |
| OLD | NEW |