Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(663)

Side by Side Diff: webkit/plugins/npapi/plugin_group.h

Issue 7041005: Content settings extension API: Implement ContentSetting.getResourceIdentifiers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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; 19 class DictionaryValue;
20 class FilePath; 20 class FilePath;
21 class TableModelArrayControllerTest; 21 class TableModelArrayControllerTest;
22 class PluginExceptionsTableModelTest; 22 class PluginExceptionsTableModelTest;
23 class Version; 23 class Version;
24 24
25 namespace webkit { 25 namespace webkit {
26 namespace npapi { 26 namespace npapi {
27 27
28 class PluginList; 28 class PluginList;
29 namespace plugin_test_internal { 29 class MockPluginList;
30 class PluginListWithoutFileIO;
31 }
32 30
33 // Hard-coded version ranges for plugin groups. 31 // Hard-coded version ranges for plugin groups.
34 struct VersionRangeDefinition { 32 struct VersionRangeDefinition {
35 // Matcher for lowest version matched by this range (inclusive). May be empty 33 // Matcher for lowest version matched by this range (inclusive). May be empty
36 // to match everything iff |version_matcher_high| is also empty. 34 // to match everything iff |version_matcher_high| is also empty.
37 const char* version_matcher_low; 35 const char* version_matcher_low;
38 // Matcher for highest version matched by this range (exclusive). May be empty 36 // Matcher for highest version matched by this range (exclusive). May be empty
39 // to match anything higher than |version_matcher_low|. 37 // to match anything higher than |version_matcher_low|.
40 const char* version_matcher_high; 38 const char* version_matcher_high;
41 const char* min_version; // Minimum secure version. 39 const char* min_version; // Minimum secure version.
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 void DisableOutdatedPlugins(); 193 void DisableOutdatedPlugins();
196 194
197 // Parse a version string as used by a plug-in. This method is more lenient 195 // Parse a version string as used by a plug-in. This method is more lenient
198 // in accepting weird version strings than Version::GetFromString(). 196 // in accepting weird version strings than Version::GetFromString().
199 static Version* CreateVersionFromString(const string16& version_string); 197 static Version* CreateVersionFromString(const string16& version_string);
200 198
201 std::vector<WebPluginInfo> web_plugin_infos() { return web_plugin_infos_; } 199 std::vector<WebPluginInfo> web_plugin_infos() { return web_plugin_infos_; }
202 200
203 private: 201 private:
204 friend class PluginList; 202 friend class PluginList;
205 friend class plugin_test_internal::PluginListWithoutFileIO; 203 friend class MockPluginList;
206 friend class PluginGroupTest; 204 friend class PluginGroupTest;
207 friend class ::TableModelArrayControllerTest; 205 friend class ::TableModelArrayControllerTest;
208 friend class ::PluginExceptionsTableModelTest; 206 friend class ::PluginExceptionsTableModelTest;
209 FRIEND_TEST_ALL_PREFIXES(PluginListTest, DisableOutdated); 207 FRIEND_TEST_ALL_PREFIXES(PluginListTest, DisableOutdated);
210 208
211 // Generates the (short) identifier string for the given plugin. 209 // Generates the (short) identifier string for the given plugin.
212 static std::string GetIdentifier(const WebPluginInfo& wpi); 210 static std::string GetIdentifier(const WebPluginInfo& wpi);
213 211
214 // Generates the long identifier (based on the full file path) for the given 212 // Generates the long identifier (based on the full file path) for the given
215 // plugin, to be called when the short identifier is not unique. 213 // plugin, to be called when the short identifier is not unique.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 bool enabled_; 286 bool enabled_;
289 std::vector<VersionRange> version_ranges_; 287 std::vector<VersionRange> version_ranges_;
290 scoped_ptr<Version> version_; 288 scoped_ptr<Version> version_;
291 std::vector<WebPluginInfo> web_plugin_infos_; 289 std::vector<WebPluginInfo> web_plugin_infos_;
292 }; 290 };
293 291
294 } // namespace npapi 292 } // namespace npapi
295 } // namespace webkit 293 } // namespace webkit
296 294
297 #endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_GROUP_H_ 295 #endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_GROUP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698