| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 void RefreshPlugins(); | 90 void RefreshPlugins(); |
| 91 | 91 |
| 92 // Add/Remove an extra plugin to load when we actually do the loading. Must | 92 // Add/Remove an extra plugin to load when we actually do the loading. Must |
| 93 // be called before the plugins have been loaded. | 93 // be called before the plugins have been loaded. |
| 94 void AddExtraPluginPath(const FilePath& plugin_path); | 94 void AddExtraPluginPath(const FilePath& plugin_path); |
| 95 void RemoveExtraPluginPath(const FilePath& plugin_path); | 95 void RemoveExtraPluginPath(const FilePath& plugin_path); |
| 96 | 96 |
| 97 // Same as above, but specifies a directory in which to search for plugins. | 97 // Same as above, but specifies a directory in which to search for plugins. |
| 98 void AddExtraPluginDir(const FilePath& plugin_dir); | 98 void AddExtraPluginDir(const FilePath& plugin_dir); |
| 99 | 99 |
| 100 // Get the ordered list of directories from which to load plugins |
| 101 void GetPluginDirectories(std::vector<FilePath>* plugin_dirs); |
| 102 |
| 100 // Register an internal plugin with the specified plugin information and | 103 // Register an internal plugin with the specified plugin information and |
| 101 // function pointers. An internal plugin must be registered before it can | 104 // function pointers. An internal plugin must be registered before it can |
| 102 // be loaded using PluginList::LoadPlugin(). | 105 // be loaded using PluginList::LoadPlugin(). |
| 103 void RegisterInternalPlugin(const FilePath& path); | 106 void RegisterInternalPlugin(const FilePath& path); |
| 104 void RegisterInternalPlugin(const FilePath& filename, | 107 void RegisterInternalPlugin(const FilePath& filename, |
| 105 const std::string& name, | 108 const std::string& name, |
| 106 const std::string& description, | 109 const std::string& description, |
| 107 const std::string& mime_type, | 110 const std::string& mime_type, |
| 108 const PluginEntryPoints& entry_points); | 111 const PluginEntryPoints& entry_points); |
| 109 | 112 |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 const std::string &extension, | 279 const std::string &extension, |
| 277 std::string* actual_mime_type); | 280 std::string* actual_mime_type); |
| 278 | 281 |
| 279 // | 282 // |
| 280 // Platform functions | 283 // Platform functions |
| 281 // | 284 // |
| 282 | 285 |
| 283 // Do any initialization. | 286 // Do any initialization. |
| 284 void PlatformInit(); | 287 void PlatformInit(); |
| 285 | 288 |
| 286 // Get the ordered list of directories from which to load plugins | |
| 287 void GetPluginDirectories(std::vector<FilePath>* plugin_dirs); | |
| 288 | |
| 289 // | 289 // |
| 290 // Command-line switches | 290 // Command-line switches |
| 291 // | 291 // |
| 292 | 292 |
| 293 #if defined(OS_WIN) | 293 #if defined(OS_WIN) |
| 294 // true if we shouldn't load the new WMP plugin. | 294 // true if we shouldn't load the new WMP plugin. |
| 295 bool dont_load_new_wmp_; | 295 bool dont_load_new_wmp_; |
| 296 | 296 |
| 297 // Loads plugins registered under HKCU\Software\MozillaPlugins and | 297 // Loads plugins registered under HKCU\Software\MozillaPlugins and |
| 298 // HKLM\Software\MozillaPlugins. | 298 // HKLM\Software\MozillaPlugins. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 | 340 |
| 341 friend struct base::DefaultLazyInstanceTraits<PluginList>; | 341 friend struct base::DefaultLazyInstanceTraits<PluginList>; |
| 342 | 342 |
| 343 DISALLOW_COPY_AND_ASSIGN(PluginList); | 343 DISALLOW_COPY_AND_ASSIGN(PluginList); |
| 344 }; | 344 }; |
| 345 | 345 |
| 346 } // namespace npapi | 346 } // namespace npapi |
| 347 } // namespace webkit | 347 } // namespace webkit |
| 348 | 348 |
| 349 #endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_LIST_H_ | 349 #endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_LIST_H_ |
| OLD | NEW |