summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins/plugin_list.h
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/plugins/plugin_list.h')
-rw-r--r--webkit/glue/plugins/plugin_list.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/webkit/glue/plugins/plugin_list.h b/webkit/glue/plugins/plugin_list.h
index 0017399..91bf23f 100644
--- a/webkit/glue/plugins/plugin_list.h
+++ b/webkit/glue/plugins/plugin_list.h
@@ -5,6 +5,7 @@
#ifndef WEBKIT_GLUE_PLUGINS_PLUGIN_LIST_H_
#define WEBKIT_GLUE_PLUGINS_PLUGIN_LIST_H_
+#include <set>
#include <string>
#include <vector>
#include <set>
@@ -114,9 +115,12 @@ class PluginList {
// Shutdown all plugins. Should be called at process teardown.
void Shutdown();
- // Get all the plugins
+ // Get all the plugins.
void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins);
+ // Get all the enabled plugins.
+ void GetEnabledPlugins(bool refresh, std::vector<WebPluginInfo>* plugins);
+
// Returns true if a plugin is found for the given url and mime type.
// The mime type which corresponds to the URL is optionally returned
// back.
@@ -137,6 +141,19 @@ class PluginList {
void LoadPlugin(const FilePath& filename,
std::vector<WebPluginInfo>* plugins);
+ // Enable a specific plugin, specified by path. Returns |true| iff a plugin
+ // currently in the plugin list was actually enabled as a result; regardless
+ // of return value, if a plugin is found in the future with the given name, it
+ // will be enabled. Note that plugins are enabled by default as far as
+ // |PluginList| is concerned.
+ bool EnablePlugin(const FilePath& filename);
+
+ // Disable a specific plugin, specified by path. Returns |true| iff a plugin
+ // currently in the plugin list was actually disabled as a result; regardless
+ // of return value, if a plugin is found in the future with the given name, it
+ // will be disabled.
+ bool DisablePlugin(const FilePath& filename);
+
private:
// Constructors are private for singletons
PluginList();
@@ -222,6 +239,9 @@ class PluginList {
// Holds information about internal plugins.
std::vector<PluginVersionInfo> internal_plugins_;
+ // Path names of plugins to disable (the default is to enable them all).
+ std::set<FilePath> disabled_plugins_;
+
// Need synchronization for the above members since this object can be
// accessed on multiple threads.
Lock lock_;