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_PUBLIC_BROWSER_PLUGIN_SERVICE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_PLUGIN_SERVICE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_PLUGIN_SERVICE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_PLUGIN_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 // on the path from the version info previously registered. | 136 // on the path from the version info previously registered. |
137 virtual void UnregisterInternalPlugin(const base::FilePath& path) = 0; | 137 virtual void UnregisterInternalPlugin(const base::FilePath& path) = 0; |
138 | 138 |
139 // Gets a list of all the registered internal plugins. | 139 // Gets a list of all the registered internal plugins. |
140 virtual void GetInternalPlugins(std::vector<WebPluginInfo>* plugins) = 0; | 140 virtual void GetInternalPlugins(std::vector<WebPluginInfo>* plugins) = 0; |
141 | 141 |
142 // Returns true iff NPAPI plugins are supported on the current platform. | 142 // Returns true iff NPAPI plugins are supported on the current platform. |
143 // This can be called from any thread. | 143 // This can be called from any thread. |
144 virtual bool NPAPIPluginsSupported() = 0; | 144 virtual bool NPAPIPluginsSupported() = 0; |
145 | 145 |
| 146 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 147 // This is equivalent to specifying kEnableNpapi, but is useful for unittests. |
| 148 virtual void EnableNpapiPluginsForTesting() = 0; |
| 149 #endif |
| 150 |
146 // This is equivalent to specifying kDisablePluginsDiscovery, but is useful | 151 // This is equivalent to specifying kDisablePluginsDiscovery, but is useful |
147 // for unittests. | 152 // for unittests. |
148 virtual void DisablePluginsDiscoveryForTesting() = 0; | 153 virtual void DisablePluginsDiscoveryForTesting() = 0; |
149 | 154 |
150 #if defined(OS_MACOSX) | 155 #if defined(OS_MACOSX) |
151 // Called when the application is made active so that modal plugin windows can | 156 // Called when the application is made active so that modal plugin windows can |
152 // be made forward too. | 157 // be made forward too. |
153 virtual void AppActivated() = 0; | 158 virtual void AppActivated() = 0; |
154 #elif defined(OS_WIN) | 159 #elif defined(OS_WIN) |
155 // Returns the name and version of a plugin HWND. If the HWND isn't a valid | 160 // Returns the name and version of a plugin HWND. If the HWND isn't a valid |
156 // plugin, returns false. | 161 // plugin, returns false. |
157 // This can be called from any thread. | 162 // This can be called from any thread. |
158 virtual bool GetPluginInfoFromWindow(HWND window, | 163 virtual bool GetPluginInfoFromWindow(HWND window, |
159 base::string16* plugin_name, | 164 base::string16* plugin_name, |
160 base::string16* plugin_version) = 0; | 165 base::string16* plugin_version) = 0; |
161 #endif | 166 #endif |
162 | 167 |
163 // Returns true iff PPAPI "dev channel" methods are supported. | 168 // Returns true iff PPAPI "dev channel" methods are supported. |
164 virtual bool PpapiDevChannelSupported(BrowserContext* browser_context, | 169 virtual bool PpapiDevChannelSupported(BrowserContext* browser_context, |
165 const GURL& document_url) = 0; | 170 const GURL& document_url) = 0; |
166 }; | 171 }; |
167 | 172 |
168 } // namespace content | 173 } // namespace content |
169 | 174 |
170 #endif // CONTENT_PUBLIC_BROWSER_PLUGIN_SERVICE_H_ | 175 #endif // CONTENT_PUBLIC_BROWSER_PLUGIN_SERVICE_H_ |
OLD | NEW |