OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 WEBKIT_PLUGINS_NPAPI_PLUGIN_LIST_H_ | 5 #ifndef WEBKIT_PLUGINS_NPAPI_PLUGIN_LIST_H_ |
6 #define WEBKIT_PLUGINS_NPAPI_PLUGIN_LIST_H_ | 6 #define WEBKIT_PLUGINS_NPAPI_PLUGIN_LIST_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 void RefreshPlugins(); | 89 void RefreshPlugins(); |
90 | 90 |
91 // Add/Remove an extra plugin to load when we actually do the loading. Must | 91 // Add/Remove an extra plugin to load when we actually do the loading. Must |
92 // be called before the plugins have been loaded. | 92 // be called before the plugins have been loaded. |
93 void AddExtraPluginPath(const FilePath& plugin_path); | 93 void AddExtraPluginPath(const FilePath& plugin_path); |
94 void RemoveExtraPluginPath(const FilePath& plugin_path); | 94 void RemoveExtraPluginPath(const FilePath& plugin_path); |
95 | 95 |
96 // Same as above, but specifies a directory in which to search for plugins. | 96 // Same as above, but specifies a directory in which to search for plugins. |
97 void AddExtraPluginDir(const FilePath& plugin_dir); | 97 void AddExtraPluginDir(const FilePath& plugin_dir); |
98 | 98 |
| 99 // Get the ordered list of directories from which to load plugins |
| 100 void GetPluginDirectories(std::vector<FilePath>* plugin_dirs); |
| 101 |
99 // Register an internal plugin with the specified plugin information and | 102 // Register an internal plugin with the specified plugin information and |
100 // function pointers. An internal plugin must be registered before it can | 103 // function pointers. An internal plugin must be registered before it can |
101 // be loaded using PluginList::LoadPlugin(). | 104 // be loaded using PluginList::LoadPlugin(). |
102 void RegisterInternalPlugin(const PluginVersionInfo& info); | 105 void RegisterInternalPlugin(const PluginVersionInfo& info); |
103 | 106 |
104 // Removes a specified internal plugin from the list. The search will match | 107 // Removes a specified internal plugin from the list. The search will match |
105 // on the path from the version info previously registered. | 108 // on the path from the version info previously registered. |
106 // | 109 // |
107 // This is generally only necessary for tests. | 110 // This is generally only necessary for tests. |
108 void UnregisterInternalPlugin(const FilePath& path); | 111 void UnregisterInternalPlugin(const FilePath& path); |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 const std::string &extension, | 269 const std::string &extension, |
267 std::string* actual_mime_type); | 270 std::string* actual_mime_type); |
268 | 271 |
269 // | 272 // |
270 // Platform functions | 273 // Platform functions |
271 // | 274 // |
272 | 275 |
273 // Do any initialization. | 276 // Do any initialization. |
274 void PlatformInit(); | 277 void PlatformInit(); |
275 | 278 |
276 // Get the ordered list of directories from which to load plugins | |
277 void GetPluginDirectories(std::vector<FilePath>* plugin_dirs); | |
278 | |
279 // | 279 // |
280 // Command-line switches | 280 // Command-line switches |
281 // | 281 // |
282 | 282 |
283 #if defined(OS_WIN) | 283 #if defined(OS_WIN) |
284 // true if we shouldn't load the new WMP plugin. | 284 // true if we shouldn't load the new WMP plugin. |
285 bool dont_load_new_wmp_; | 285 bool dont_load_new_wmp_; |
286 | 286 |
287 // Loads plugins registered under HKCU\Software\MozillaPlugins and | 287 // Loads plugins registered under HKCU\Software\MozillaPlugins and |
288 // HKLM\Software\MozillaPlugins. | 288 // HKLM\Software\MozillaPlugins. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 | 330 |
331 friend struct base::DefaultLazyInstanceTraits<PluginList>; | 331 friend struct base::DefaultLazyInstanceTraits<PluginList>; |
332 | 332 |
333 DISALLOW_COPY_AND_ASSIGN(PluginList); | 333 DISALLOW_COPY_AND_ASSIGN(PluginList); |
334 }; | 334 }; |
335 | 335 |
336 } // namespace npapi | 336 } // namespace npapi |
337 } // namespace webkit | 337 } // namespace webkit |
338 | 338 |
339 #endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_LIST_H_ | 339 #endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_LIST_H_ |
OLD | NEW |