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

Unified Diff: webkit/glue/plugins/plugin_group.h

Issue 5699005: Policy: Re-enabled plugin still disabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed PluginGroup::DisableOutdatedPlugins Created 10 years 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 side-by-side diff with in-line comments
Download patch
Index: webkit/glue/plugins/plugin_group.h
diff --git a/webkit/glue/plugins/plugin_group.h b/webkit/glue/plugins/plugin_group.h
index a7712387f7badee49f081af4a18445d8930760d4..2c4951cc821d4440e3db9fc950a271a381e8b056 100644
--- a/webkit/glue/plugins/plugin_group.h
+++ b/webkit/glue/plugins/plugin_group.h
@@ -6,6 +6,7 @@
#define WEBKIT_GLUE_PLUGINS_PLUGIN_GROUP_H_
#pragma once
+#include <list>
#include <map>
#include <set>
#include <string>
@@ -99,12 +100,23 @@ class PluginGroup {
// Adds the given plugin to this group. Provide the position of the
// plugin as given by PluginList so we can display its priority.
- void AddPlugin(const WebPluginInfo& plugin, int position);
+ // Retuns true if plugin has been added and false if it was already added.
+ WebPluginInfo* AddPlugin(const WebPluginInfo& plugin, int position);
+
+ // Returns a poitner to the plugin at the end of the |web_plugin_infos_|
+ // array.
+ std::list<WebPluginInfo>& GetPlugins();
+
+ // Returns the positions of the plugins in the group.
+ std::vector<int>& GetPluginPositions();
// Enables/disables this group. This enables/disables all plugins in the
// group.
void Enable(bool enable);
+ // Refreshes the enabled flag based on the state of its plugins.
+ void RefreshEnabledState();
+
// Returns whether the plugin group is enabled or not.
bool Enabled() const { return enabled_; }
@@ -196,7 +208,7 @@ class PluginGroup {
bool enabled_;
std::vector<VersionRange> version_ranges_;
scoped_ptr<Version> version_;
- std::vector<WebPluginInfo> web_plugin_infos_;
+ std::list<WebPluginInfo> web_plugin_infos_;
std::vector<int> web_plugin_positions_;
};

Powered by Google App Engine
This is Rietveld 408576698