Index: webkit/glue/plugins/plugin_group.h |
diff --git a/webkit/glue/plugins/plugin_group.h b/webkit/glue/plugins/plugin_group.h |
index 5098787635b1f7d6d26b5f06b146964b0707995c..30674da20dbe7fd32fbce723df495ec9f819db8c 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> |
jam
2010/12/17 19:14:45
not needed?
pastarmovj
2010/12/20 19:57:37
Done.
|
#include <map> |
#include <set> |
#include <string> |
@@ -90,20 +91,22 @@ class PluginGroup { |
// the lookup key. |
static bool IsPluginNameDisabledByPolicy(const string16& plugin_name); |
- // Tests to see if a plugin is on the blacklist using its path as |
- // the lookup key. |
- static bool IsPluginPathDisabledByPolicy(const FilePath& plugin_path); |
- |
// Returns true if the given plugin matches this group. |
bool Match(const WebPluginInfo& plugin) const; |
- // 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); |
+ // Adds the given plugin to this group. |
+ // Retuns true if plugin has been added and false if it was already added. |
Bernhard Bauer
2010/12/17 18:50:59
Nit: "Returns true if the plugin has been added an
pastarmovj
2010/12/20 19:57:37
Done.
|
+ bool AddPlugin(const WebPluginInfo& plugin, int priority); |
jam
2010/12/17 19:14:45
can you document what priority is? although i don
|
+ |
+ bool EnablePlugin(const FilePath& filename); |
jam
2010/12/17 19:14:45
comments please
pastarmovj
2010/12/20 19:57:37
Done.
|
+ bool DisablePlugin(const FilePath& filename); |
// Enables/disables this group. This enables/disables all plugins in the |
// group. |
- void Enable(bool enable); |
+ bool Enable(bool enable); |
jam
2010/12/17 19:14:45
nit: perhaps call this EnabledGroup to make it cle
pastarmovj
2010/12/20 19:57:37
Done.
|
+ |
+ // Refreshes the enabled flag based on the state of its plugins. |
+ void RefreshEnabledState(); |
Bernhard Bauer
2010/12/17 18:50:59
Can we make this private?
pastarmovj
2010/12/20 19:57:37
Done.
|
// Returns whether the plugin group is enabled or not. |
bool Enabled() const { return enabled_; } |
@@ -116,6 +119,10 @@ class PluginGroup { |
// is empty. |
string16 GetGroupName() const; |
+ const std::vector<WebPluginInfo>& GetPlugins() const; |
+ |
+ bool HasPlugin(const FilePath& path) const; |
Bernhard Bauer
2010/12/17 18:50:59
Nit: Maybe ContainsPlugin?
pastarmovj
2010/12/20 19:57:37
Done.
|
+ |
// Returns the description of the highest-priority plug-in in the group. |
const string16& description() const { return description_; } |
@@ -164,6 +171,10 @@ class PluginGroup { |
// the created PluginGroup. |
static PluginGroup* FromWebPluginInfo(const WebPluginInfo& wpi); |
+ // Creates an empty PluginGroup from a given name. The caller takes |
+ // ownership of the created PluginGroup. |
+ static PluginGroup* CreateEmptyGroup(const string16& name); |
+ |
// Returns |true| if |version| is contained in [low, high) of |range|. |
static bool IsVersionInRange(const Version& version, |
const VersionRange& range); |
@@ -199,7 +210,6 @@ class PluginGroup { |
std::vector<VersionRange> version_ranges_; |
scoped_ptr<Version> version_; |
std::vector<WebPluginInfo> web_plugin_infos_; |
- std::vector<int> web_plugin_positions_; |
}; |
#endif // WEBKIT_GLUE_PLUGINS_PLUGIN_GROUP_H_ |