| 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_GLUE_PLUGINS_PLUGIN_GROUP_H_ | 5 #ifndef WEBKIT_GLUE_PLUGINS_PLUGIN_GROUP_H_ |
| 6 #define WEBKIT_GLUE_PLUGINS_PLUGIN_GROUP_H_ | 6 #define WEBKIT_GLUE_PLUGINS_PLUGIN_GROUP_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // the lookup key. | 94 // the lookup key. |
| 95 static bool IsPluginPathDisabledByPolicy(const FilePath& plugin_path); | 95 static bool IsPluginPathDisabledByPolicy(const FilePath& plugin_path); |
| 96 | 96 |
| 97 // Returns true if the given plugin matches this group. | 97 // Returns true if the given plugin matches this group. |
| 98 bool Match(const WebPluginInfo& plugin) const; | 98 bool Match(const WebPluginInfo& plugin) const; |
| 99 | 99 |
| 100 // Adds the given plugin to this group. Provide the position of the | 100 // Adds the given plugin to this group. Provide the position of the |
| 101 // plugin as given by PluginList so we can display its priority. | 101 // plugin as given by PluginList so we can display its priority. |
| 102 void AddPlugin(const WebPluginInfo& plugin, int position); | 102 void AddPlugin(const WebPluginInfo& plugin, int position); |
| 103 | 103 |
| 104 bool IsEmpty() const; |
| 105 |
| 104 // Enables/disables this group. This enables/disables all plugins in the | 106 // Enables/disables this group. This enables/disables all plugins in the |
| 105 // group. | 107 // group. |
| 106 void Enable(bool enable); | 108 void Enable(bool enable); |
| 107 | 109 |
| 108 // Returns whether the plugin group is enabled or not. | 110 // Returns whether the plugin group is enabled or not. |
| 109 bool Enabled() const { return enabled_; } | 111 bool Enabled() const { return enabled_; } |
| 110 | 112 |
| 111 // Returns a unique identifier for this group, if one is defined, or the empty | 113 // Returns a unique identifier for this group, if one is defined, or the empty |
| 112 // string otherwise. | 114 // string otherwise. |
| 113 const std::string& identifier() const { return identifier_; } | 115 const std::string& identifier() const { return identifier_; } |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 string16 description_; | 198 string16 description_; |
| 197 std::string update_url_; | 199 std::string update_url_; |
| 198 bool enabled_; | 200 bool enabled_; |
| 199 std::vector<VersionRange> version_ranges_; | 201 std::vector<VersionRange> version_ranges_; |
| 200 scoped_ptr<Version> version_; | 202 scoped_ptr<Version> version_; |
| 201 std::vector<WebPluginInfo> web_plugin_infos_; | 203 std::vector<WebPluginInfo> web_plugin_infos_; |
| 202 std::vector<int> web_plugin_positions_; | 204 std::vector<int> web_plugin_positions_; |
| 203 }; | 205 }; |
| 204 | 206 |
| 205 #endif // WEBKIT_GLUE_PLUGINS_PLUGIN_GROUP_H_ | 207 #endif // WEBKIT_GLUE_PLUGINS_PLUGIN_GROUP_H_ |
| OLD | NEW |