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 common places next time | |
Bernhard Bauer
2013/06/06 08:28:50
s/common/well-known/?
seva
2013/06/06 22:11:25
I don't know how well known these are :) everythin
Bernhard Bauer
2013/06/07 10:33:43
Standard is relative as well, I guess ;-)
But "st
| |
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
182 static void ParseMIMEDescription(const std::string& description, | 186 static void ParseMIMEDescription(const std::string& description, |
183 std::vector<webkit::WebPluginMimeType>* mime_types); | 187 std::vector<webkit::WebPluginMimeType>* mime_types); |
184 | 188 |
185 // Extract a version number from a description string. | 189 // Extract a version number from a description string. |
186 // This API is only used on Unixes, and is exposed here for testing. | 190 // This API is only used on Unixes, and is exposed here for testing. |
187 static void ExtractVersionString(const std::string& version, | 191 static void ExtractVersionString(const std::string& version, |
188 webkit::WebPluginInfo* info); | 192 webkit::WebPluginInfo* info); |
189 #endif | 193 #endif |
190 | 194 |
191 protected: | 195 protected: |
196 // Flag indicating whether third_party plugins will be searched for | |
197 // in common places. | |
198 bool plugins_discovery_disabled_; | |
Bernhard Bauer
2013/06/06 08:28:50
I don't think this needs to be protected.
seva
2013/06/06 22:11:25
Indeed; moved down to private: section. Thanks.
| |
199 | |
192 // Constructors are private for singletons but we expose this one | 200 // Constructors are private for singletons but we expose this one |
193 // for subclasses for test purposes. | 201 // for subclasses for test purposes. |
194 PluginList(); | 202 PluginList(); |
195 | 203 |
196 private: | 204 private: |
197 enum LoadingState { | 205 enum LoadingState { |
198 LOADING_STATE_NEEDS_REFRESH, | 206 LOADING_STATE_NEEDS_REFRESH, |
199 LOADING_STATE_REFRESHING, | 207 LOADING_STATE_REFRESHING, |
200 LOADING_STATE_UP_TO_DATE, | 208 LOADING_STATE_UP_TO_DATE, |
201 }; | 209 }; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
284 // accessed on multiple threads. | 292 // accessed on multiple threads. |
285 base::Lock lock_; | 293 base::Lock lock_; |
286 | 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 |