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

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

Issue 6259008: When we detect a PDF with an unsupported feature, ask the user if they want t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
« no previous file with comments | « ppapi/c/private/ppb_pdf.h ('k') | webkit/plugins/npapi/plugin_group.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_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>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // It contains all WebPluginInfo structs (at least one) matching its definition. 71 // It contains all WebPluginInfo structs (at least one) matching its definition.
72 // In addition, it knows about a security "baseline", i.e. the minimum version 72 // In addition, it knows about a security "baseline", i.e. the minimum version
73 // of a plugin that is needed in order not to exhibit known security 73 // of a plugin that is needed in order not to exhibit known security
74 // vulnerabilities. 74 // vulnerabilities.
75 75
76 class PluginGroup { 76 class PluginGroup {
77 public: 77 public:
78 // Used by about:plugins to disable Reader plugin when internal PDF viewer is 78 // Used by about:plugins to disable Reader plugin when internal PDF viewer is
79 // enabled. 79 // enabled.
80 static const char* kAdobeReaderGroupName; 80 static const char* kAdobeReaderGroupName;
81 static const char* kAdobeReaderUpdateURL;
81 82
82 PluginGroup(const PluginGroup& other); 83 PluginGroup(const PluginGroup& other);
83 84
84 ~PluginGroup(); 85 ~PluginGroup();
85 86
86 PluginGroup& operator=(const PluginGroup& other); 87 PluginGroup& operator=(const PluginGroup& other);
87 88
88 // Configures the set of plugin name patterns for disabling plugins via 89 // Configures the set of plugin name patterns for disabling plugins via
89 // enterprise configuration management. 90 // enterprise configuration management.
90 static void SetPolicyDisabledPluginPatterns(const std::set<string16>& set); 91 static void SetPolicyDisabledPluginPatterns(const std::set<string16>& set);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 bool IsVulnerable() const; 139 bool IsVulnerable() const;
139 140
140 // Disables all plugins in this group that are older than the 141 // Disables all plugins in this group that are older than the
141 // minimum version. 142 // minimum version.
142 void DisableOutdatedPlugins(); 143 void DisableOutdatedPlugins();
143 144
144 // Parse a version string as used by a plug-in. This method is more lenient 145 // Parse a version string as used by a plug-in. This method is more lenient
145 // in accepting weird version strings than Version::GetFromString(). 146 // in accepting weird version strings than Version::GetFromString().
146 static Version* CreateVersionFromString(const string16& version_string); 147 static Version* CreateVersionFromString(const string16& version_string);
147 148
149 std::vector<WebPluginInfo> web_plugin_infos() { return web_plugin_infos_; }
150
148 private: 151 private:
149 typedef std::map<std::string, PluginGroup*> PluginMap; 152 typedef std::map<std::string, PluginGroup*> PluginMap;
150 153
151 friend class PluginList; 154 friend class PluginList;
152 friend class PluginGroupTest; 155 friend class PluginGroupTest;
153 friend class ::TableModelArrayControllerTest; 156 friend class ::TableModelArrayControllerTest;
154 friend class ::PluginExceptionsTableModelTest; 157 friend class ::PluginExceptionsTableModelTest;
155 158
156 // Generates the (short) identifier string for the given plugin. 159 // Generates the (short) identifier string for the given plugin.
157 static std::string GetIdentifier(const WebPluginInfo& wpi); 160 static std::string GetIdentifier(const WebPluginInfo& wpi);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 std::vector<VersionRange> version_ranges_; 207 std::vector<VersionRange> version_ranges_;
205 scoped_ptr<Version> version_; 208 scoped_ptr<Version> version_;
206 std::vector<WebPluginInfo> web_plugin_infos_; 209 std::vector<WebPluginInfo> web_plugin_infos_;
207 std::vector<int> web_plugin_positions_; 210 std::vector<int> web_plugin_positions_;
208 }; 211 };
209 212
210 } // namespace npapi 213 } // namespace npapi
211 } // namespace webkit 214 } // namespace webkit
212 215
213 #endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_GROUP_H_ 216 #endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_GROUP_H_
OLDNEW
« no previous file with comments | « ppapi/c/private/ppb_pdf.h ('k') | webkit/plugins/npapi/plugin_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698