| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 bool LoadPlugin(const FilePath& filename, | 167 bool LoadPlugin(const FilePath& filename, |
| 168 ScopedVector<PluginGroup>* plugin_groups, | 168 ScopedVector<PluginGroup>* plugin_groups, |
| 169 webkit::WebPluginInfo* plugin_info); | 169 webkit::WebPluginInfo* plugin_info); |
| 170 | 170 |
| 171 // The following functions are used to support probing for WebPluginInfo | 171 // The following functions are used to support probing for WebPluginInfo |
| 172 // using a different instance of this class. | 172 // using a different instance of this class. |
| 173 | 173 |
| 174 // Computes a list of all plugins to potentially load from all sources. | 174 // Computes a list of all plugins to potentially load from all sources. |
| 175 void GetPluginPathsToLoad(std::vector<FilePath>* plugin_paths); | 175 void GetPluginPathsToLoad(std::vector<FilePath>* plugin_paths); |
| 176 | 176 |
| 177 // Returns the list of hardcoded plug-in groups for testing. |
| 178 const std::vector<PluginGroup*>& GetHardcodedPluginGroups() const; |
| 179 |
| 177 // Clears the internal list of PluginGroups and copies them from the vector. | 180 // Clears the internal list of PluginGroups and copies them from the vector. |
| 178 void SetPlugins(const std::vector<webkit::WebPluginInfo>& plugins); | 181 void SetPlugins(const std::vector<webkit::WebPluginInfo>& plugins); |
| 179 | 182 |
| 180 void set_will_load_plugins_callback(const base::Closure& callback); | 183 void set_will_load_plugins_callback(const base::Closure& callback); |
| 181 | 184 |
| 182 virtual ~PluginList(); | 185 virtual ~PluginList(); |
| 183 | 186 |
| 184 protected: | 187 protected: |
| 185 // This constructor is used in unit tests to override the platform-dependent | 188 // This constructor is used in unit tests to override the platform-dependent |
| 186 // real-world plugin group definitions with custom ones. | 189 // real-world plugin group definitions with custom ones. |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 // accessed on multiple threads. | 298 // accessed on multiple threads. |
| 296 base::Lock lock_; | 299 base::Lock lock_; |
| 297 | 300 |
| 298 DISALLOW_COPY_AND_ASSIGN(PluginList); | 301 DISALLOW_COPY_AND_ASSIGN(PluginList); |
| 299 }; | 302 }; |
| 300 | 303 |
| 301 } // namespace npapi | 304 } // namespace npapi |
| 302 } // namespace webkit | 305 } // namespace webkit |
| 303 | 306 |
| 304 #endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_LIST_H_ | 307 #endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_LIST_H_ |
| OLD | NEW |