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 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 <utility> | 10 #include <utility> |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // Returns true if we're in debug-plugin-loading mode. This is controlled | 58 // Returns true if we're in debug-plugin-loading mode. This is controlled |
59 // by a command line switch. | 59 // by a command line switch. |
60 static bool DebugPluginLoading(); | 60 static bool DebugPluginLoading(); |
61 | 61 |
62 // Returns true if the plugin supports |mime_type|. |mime_type| should be all | 62 // Returns true if the plugin supports |mime_type|. |mime_type| should be all |
63 // lower case. | 63 // lower case. |
64 static bool SupportsType(const webkit::WebPluginInfo& plugin, | 64 static bool SupportsType(const webkit::WebPluginInfo& plugin, |
65 const std::string& mime_type, | 65 const std::string& mime_type, |
66 bool allow_wildcard); | 66 bool allow_wildcard); |
67 | 67 |
| 68 // Disables discovery of third_party plugins in standard places next time |
| 69 // plugins are loaded. |
| 70 void DisablePluginsDiscovery(); |
| 71 |
68 // Cause the plugin list to refresh next time they are accessed, regardless | 72 // Cause the plugin list to refresh next time they are accessed, regardless |
69 // of whether they are already loaded. | 73 // of whether they are already loaded. |
70 void RefreshPlugins(); | 74 void RefreshPlugins(); |
71 | 75 |
72 // Add/Remove an extra plugin to load when we actually do the loading. Must | 76 // Add/Remove an extra plugin to load when we actually do the loading. Must |
73 // be called before the plugins have been loaded. | 77 // be called before the plugins have been loaded. |
74 void AddExtraPluginPath(const base::FilePath& plugin_path); | 78 void AddExtraPluginPath(const base::FilePath& plugin_path); |
75 void RemoveExtraPluginPath(const base::FilePath& plugin_path); | 79 void RemoveExtraPluginPath(const base::FilePath& plugin_path); |
76 | 80 |
77 // Same as above, but specifies a directory in which to search for plugins. | 81 // Same as above, but specifies a directory in which to search for plugins. |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 // A list holding all plug-ins. | 281 // A list holding all plug-ins. |
278 std::vector<webkit::WebPluginInfo> plugins_list_; | 282 std::vector<webkit::WebPluginInfo> plugins_list_; |
279 | 283 |
280 // Callback that is invoked whenever the PluginList will reload the plugins. | 284 // Callback that is invoked whenever the PluginList will reload the plugins. |
281 base::Closure will_load_plugins_callback_; | 285 base::Closure will_load_plugins_callback_; |
282 | 286 |
283 // Need synchronization for the above members since this object can be | 287 // Need synchronization for the above members since this object can be |
284 // accessed on multiple threads. | 288 // accessed on multiple threads. |
285 base::Lock lock_; | 289 base::Lock lock_; |
286 | 290 |
| 291 // Flag indicating whether third_party plugins will be searched for |
| 292 // in common places. |
| 293 bool plugins_discovery_disabled_; |
| 294 |
287 DISALLOW_COPY_AND_ASSIGN(PluginList); | 295 DISALLOW_COPY_AND_ASSIGN(PluginList); |
288 }; | 296 }; |
289 | 297 |
290 } // namespace npapi | 298 } // namespace npapi |
291 } // namespace webkit | 299 } // namespace webkit |
292 | 300 |
293 #endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_LIST_H_ | 301 #endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_LIST_H_ |
OLD | NEW |