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..097a1112da16329f00472ba2bf5c3cd7a2d6e61b 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,25 @@ 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. |
+ bool AddPlugin(const WebPluginInfo& plugin, |
+ int position, |
+ WebPluginInfo** group_plugin_copy); |
Bernhard Bauer
2010/12/15 17:23:45
Nit: Can you explain what |group_plugin_copy| is f
|
+ |
+ // Returns a poitner to the plugin at the end of the |web_plugin_infos_| |
Bernhard Bauer
2010/12/15 17:23:45
Nit: Pointer. Also, it's a reference. Also, make i
|
+ // 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 +210,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_; |
jam
2010/12/15 19:48:55
I don't understand why this was changed into a lis
pastarmovj
2010/12/15 21:56:04
Because pointers to elements of a vector might get
|
std::vector<int> web_plugin_positions_; |
}; |