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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 virtual bool IsPluginUnstable(const base::FilePath& plugin_path) OVERRIDE; | 101 virtual bool IsPluginUnstable(const base::FilePath& plugin_path) OVERRIDE; |
102 virtual void RefreshPlugins() OVERRIDE; | 102 virtual void RefreshPlugins() OVERRIDE; |
103 virtual void AddExtraPluginPath(const base::FilePath& path) OVERRIDE; | 103 virtual void AddExtraPluginPath(const base::FilePath& path) OVERRIDE; |
104 virtual void RemoveExtraPluginPath(const base::FilePath& path) OVERRIDE; | 104 virtual void RemoveExtraPluginPath(const base::FilePath& path) OVERRIDE; |
105 virtual void AddExtraPluginDir(const base::FilePath& path) OVERRIDE; | 105 virtual void AddExtraPluginDir(const base::FilePath& path) OVERRIDE; |
106 virtual void RegisterInternalPlugin( | 106 virtual void RegisterInternalPlugin( |
107 const webkit::WebPluginInfo& info, bool add_at_beginning) OVERRIDE; | 107 const webkit::WebPluginInfo& info, bool add_at_beginning) OVERRIDE; |
108 virtual void UnregisterInternalPlugin(const base::FilePath& path) OVERRIDE; | 108 virtual void UnregisterInternalPlugin(const base::FilePath& path) OVERRIDE; |
109 virtual void GetInternalPlugins( | 109 virtual void GetInternalPlugins( |
110 std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE; | 110 std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE; |
| 111 virtual bool NPAPIPluginsSupported() OVERRIDE; |
111 virtual void DisablePluginsDiscoveryForTesting() OVERRIDE; | 112 virtual void DisablePluginsDiscoveryForTesting() OVERRIDE; |
112 #if defined(OS_MACOSX) | 113 #if defined(OS_MACOSX) |
113 virtual void AppActivated() OVERRIDE; | 114 virtual void AppActivated() OVERRIDE; |
| 115 #elif defined(OS_WIN) |
| 116 virtual bool GetPluginInfoFromWindow(HWND window, |
| 117 base::string16* plugin_name, |
| 118 base::string16* plugin_version) OVERRIDE; |
| 119 |
| 120 // Returns true iff the given HWND is a plugin. |
| 121 bool IsPluginWindow(HWND window); |
114 #endif | 122 #endif |
115 | 123 |
116 // Returns the plugin process host corresponding to the plugin process that | 124 // Returns the plugin process host corresponding to the plugin process that |
117 // has been started by this service. This will start a process to host the | 125 // has been started by this service. This will start a process to host the |
118 // 'plugin_path' if needed. If the process fails to start, the return value | 126 // 'plugin_path' if needed. If the process fails to start, the return value |
119 // is NULL. Must be called on the IO thread. | 127 // is NULL. Must be called on the IO thread. |
120 PluginProcessHost* FindOrStartNpapiPluginProcess( | 128 PluginProcessHost* FindOrStartNpapiPluginProcess( |
121 int render_process_id, const base::FilePath& plugin_path); | 129 int render_process_id, const base::FilePath& plugin_path); |
122 PpapiPluginProcessHost* FindOrStartPpapiPluginProcess( | 130 PpapiPluginProcessHost* FindOrStartPpapiPluginProcess( |
123 int render_process_id, | 131 int render_process_id, |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 | 244 |
237 // Used to detect if a given plug-in is crashing over and over. | 245 // Used to detect if a given plug-in is crashing over and over. |
238 std::map<base::FilePath, std::vector<base::Time> > crash_times_; | 246 std::map<base::FilePath, std::vector<base::Time> > crash_times_; |
239 | 247 |
240 DISALLOW_COPY_AND_ASSIGN(PluginServiceImpl); | 248 DISALLOW_COPY_AND_ASSIGN(PluginServiceImpl); |
241 }; | 249 }; |
242 | 250 |
243 } // namespace content | 251 } // namespace content |
244 | 252 |
245 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ | 253 #endif // CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ |
OLD | NEW |