| Index: webkit/glue/plugins/plugin_list.h
|
| diff --git a/webkit/glue/plugins/plugin_list.h b/webkit/glue/plugins/plugin_list.h
|
| index 00173998bdfbdcace98c4cad36e64707d59f6c8c..91bf23fd360d5bb8ad458de1c280f08e6dc0dace 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_;
|
|
|