Chromium Code Reviews| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 95 // Asynchronously loads plugins if necessary and then calls back to the | 95 // Asynchronously loads plugins if necessary and then calls back to the |
| 96 // provided function on the calling MessageLoop on completion. | 96 // provided function on the calling MessageLoop on completion. |
| 97 virtual void GetPlugins(const GetPluginsCallback& callback) = 0; | 97 virtual void GetPlugins(const GetPluginsCallback& callback) = 0; |
| 98 | 98 |
| 99 // Returns information about a pepper plugin if it exists, otherwise NULL. | 99 // Returns information about a pepper plugin if it exists, otherwise NULL. |
| 100 // The caller does not own the pointer, and it's not guaranteed to live past | 100 // The caller does not own the pointer, and it's not guaranteed to live past |
| 101 // the call stack. | 101 // the call stack. |
| 102 virtual PepperPluginInfo* GetRegisteredPpapiPluginInfo( | 102 virtual PepperPluginInfo* GetRegisteredPpapiPluginInfo( |
| 103 const base::FilePath& plugin_path) = 0; | 103 const base::FilePath& plugin_path) = 0; |
| 104 | 104 |
| 105 // Returns whether any Pepper plugin supporting |mime_type| is registered. | |
| 106 // Does not determine whether the plugin could actually be instantiated | |
| 107 // (e.g. by checking Content Settings). | |
|
Bernhard Bauer
2013/09/16 19:16:03
Not sure whether we want to mention content settin
ddorwin
2013/09/16 21:44:51
Done. I changed it to two generic examples. I thin
| |
| 108 // Also does not check whether the plugin can be loaded | |
| 109 // (e.g. has all its dependencies). | |
| 110 virtual bool IsPepperPluginRegisteredForMimeType( | |
| 111 const std::string& mime_type) = 0; | |
| 112 | |
| 105 virtual void SetFilter(PluginServiceFilter* filter) = 0; | 113 virtual void SetFilter(PluginServiceFilter* filter) = 0; |
| 106 virtual PluginServiceFilter* GetFilter() = 0; | 114 virtual PluginServiceFilter* GetFilter() = 0; |
| 107 | 115 |
| 108 // If the plugin with the given path is running, cleanly shuts it down. | 116 // If the plugin with the given path is running, cleanly shuts it down. |
| 109 virtual void ForcePluginShutdown(const base::FilePath& plugin_path) = 0; | 117 virtual void ForcePluginShutdown(const base::FilePath& plugin_path) = 0; |
| 110 | 118 |
| 111 // Used to monitor plug-in stability. An unstable plug-in is one that has | 119 // Used to monitor plug-in stability. An unstable plug-in is one that has |
| 112 // crashed more than a set number of times in a set time period. | 120 // crashed more than a set number of times in a set time period. |
| 113 virtual bool IsPluginUnstable(const base::FilePath& plugin_path) = 0; | 121 virtual bool IsPluginUnstable(const base::FilePath& plugin_path) = 0; |
| 114 | 122 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 157 // This can be called from any thread. | 165 // This can be called from any thread. |
| 158 virtual bool GetPluginInfoFromWindow(HWND window, | 166 virtual bool GetPluginInfoFromWindow(HWND window, |
| 159 base::string16* plugin_name, | 167 base::string16* plugin_name, |
| 160 base::string16* plugin_version) = 0; | 168 base::string16* plugin_version) = 0; |
| 161 #endif | 169 #endif |
| 162 }; | 170 }; |
| 163 | 171 |
| 164 } // namespace content | 172 } // namespace content |
| 165 | 173 |
| 166 #endif // CONTENT_PUBLIC_BROWSER_PLUGIN_SERVICE_H_ | 174 #endif // CONTENT_PUBLIC_BROWSER_PLUGIN_SERVICE_H_ |
| OLD | NEW |