| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_GROUP_H_ | 5 #ifndef WEBKIT_PLUGINS_NPAPI_PLUGIN_GROUP_H_ |
| 6 #define WEBKIT_PLUGINS_NPAPI_PLUGIN_GROUP_H_ | 6 #define WEBKIT_PLUGINS_NPAPI_PLUGIN_GROUP_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/string16.h" | 16 #include "base/string16.h" |
| 17 #include "webkit/plugins/npapi/webplugininfo.h" | 17 #include "webkit/plugins/npapi/webplugininfo.h" |
| 18 | 18 |
| 19 class DictionaryValue; | |
| 20 class FilePath; | 19 class FilePath; |
| 21 class TableModelArrayControllerTest; | 20 class TableModelArrayControllerTest; |
| 22 class PluginExceptionsTableModelTest; | 21 class PluginExceptionsTableModelTest; |
| 23 class Version; | 22 class Version; |
| 24 | 23 |
| 24 namespace base { |
| 25 class DictionaryValue; |
| 26 } |
| 27 |
| 25 namespace webkit { | 28 namespace webkit { |
| 26 namespace npapi { | 29 namespace npapi { |
| 27 | 30 |
| 28 class PluginList; | 31 class PluginList; |
| 29 class MockPluginList; | 32 class MockPluginList; |
| 30 | 33 |
| 31 // Hard-coded version ranges for plugin groups. | 34 // Hard-coded version ranges for plugin groups. |
| 32 struct VersionRangeDefinition { | 35 struct VersionRangeDefinition { |
| 33 // Matcher for lowest version matched by this range (inclusive). May be empty | 36 // Matcher for lowest version matched by this range (inclusive). May be empty |
| 34 // to match everything iff |version_matcher_high| is also empty. | 37 // to match everything iff |version_matcher_high| is also empty. |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 return web_plugin_infos_; | 161 return web_plugin_infos_; |
| 159 } | 162 } |
| 160 | 163 |
| 161 // Checks whether a plugin exists in the group with the given path. | 164 // Checks whether a plugin exists in the group with the given path. |
| 162 bool ContainsPlugin(const FilePath& path) const; | 165 bool ContainsPlugin(const FilePath& path) const; |
| 163 | 166 |
| 164 // Returns the description of the highest-priority plug-in in the group. | 167 // Returns the description of the highest-priority plug-in in the group. |
| 165 const string16& description() const { return description_; } | 168 const string16& description() const { return description_; } |
| 166 | 169 |
| 167 // Returns a DictionaryValue with data to display in the UI. | 170 // Returns a DictionaryValue with data to display in the UI. |
| 168 DictionaryValue* GetDataForUI() const; | 171 base::DictionaryValue* GetDataForUI() const; |
| 169 | 172 |
| 170 // Returns a DictionaryValue with data to save in the preferences. | 173 // Returns a DictionaryValue with data to save in the preferences. |
| 171 DictionaryValue* GetSummary() const; | 174 base::DictionaryValue* GetSummary() const; |
| 172 | 175 |
| 173 // Returns the update URL. | 176 // Returns the update URL. |
| 174 std::string GetUpdateURL() const { return update_url_; } | 177 std::string GetUpdateURL() const { return update_url_; } |
| 175 | 178 |
| 176 // Returns true if this plugin group is whitelisted. | 179 // Returns true if this plugin group is whitelisted. |
| 177 bool IsWhitelisted() const; | 180 bool IsWhitelisted() const; |
| 178 | 181 |
| 179 // Returns true if the highest-priority plugin in this group has known | 182 // Returns true if the highest-priority plugin in this group has known |
| 180 // security problems. | 183 // security problems. |
| 181 bool IsVulnerable() const; | 184 bool IsVulnerable() const; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 bool enabled_; | 289 bool enabled_; |
| 287 std::vector<VersionRange> version_ranges_; | 290 std::vector<VersionRange> version_ranges_; |
| 288 scoped_ptr<Version> version_; | 291 scoped_ptr<Version> version_; |
| 289 std::vector<WebPluginInfo> web_plugin_infos_; | 292 std::vector<WebPluginInfo> web_plugin_infos_; |
| 290 }; | 293 }; |
| 291 | 294 |
| 292 } // namespace npapi | 295 } // namespace npapi |
| 293 } // namespace webkit | 296 } // namespace webkit |
| 294 | 297 |
| 295 #endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_GROUP_H_ | 298 #endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_GROUP_H_ |
| OLD | NEW |