diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-15 09:42:23 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-15 09:42:23 +0000 |
commit | 3eff9e2e46c00ec5c0316fef6c44355793f1906d (patch) | |
tree | b4a346aefc756be26707cfa00952d906df8c95ba /content | |
parent | 682ef685be471686d07513f4e44e59c9a71cf356 (diff) | |
download | chromium_src-3eff9e2e46c00ec5c0316fef6c44355793f1906d.zip chromium_src-3eff9e2e46c00ec5c0316fef6c44355793f1906d.tar.gz chromium_src-3eff9e2e46c00ec5c0316fef6c44355793f1906d.tar.bz2 |
Revert 101269 - Store plug-in enabled/disabled state in PluginPrefs instead of WebPluginInfo, to allow different sets of enabled/disabled plug-ins to be specified per profile.
BUG=80794
TEST=Open two profiles, disable different plugins in them.
Review URL: http://codereview.chromium.org/7848025
TBR=bauerb@chromium.org
Review URL: http://codereview.chromium.org/7901015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101272 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/common/pepper_plugin_registry.cc | 13 | ||||
-rw-r--r-- | content/common/pepper_plugin_registry.h | 3 | ||||
-rw-r--r-- | content/common/view_messages.h | 1 |
3 files changed, 16 insertions, 1 deletions
diff --git a/content/common/pepper_plugin_registry.cc b/content/common/pepper_plugin_registry.cc index 5bb2f29..9fb1381 100644 --- a/content/common/pepper_plugin_registry.cc +++ b/content/common/pepper_plugin_registry.cc @@ -89,12 +89,22 @@ webkit::WebPluginInfo PepperPluginInfo::ToWebPluginInfo() const { info.desc = ASCIIToUTF16(description); info.mime_types = mime_types; + webkit::WebPluginInfo::EnabledStates enabled_state = + webkit::WebPluginInfo::USER_ENABLED_POLICY_UNMANAGED; + + if (!enabled) { + enabled_state = + webkit::WebPluginInfo::USER_DISABLED_POLICY_UNMANAGED; + } + + info.enabled = enabled_state; return info; } PepperPluginInfo::PepperPluginInfo() : is_internal(false), - is_out_of_process(false) { + is_out_of_process(false), + enabled(true) { } PepperPluginInfo::~PepperPluginInfo() { @@ -109,6 +119,7 @@ bool MakePepperPluginInfo(const webkit::WebPluginInfo& webplugin_info, webplugin_info.type == webkit::WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS; + pepper_info->enabled = webkit::IsPluginEnabled(webplugin_info); pepper_info->path = FilePath(webplugin_info.path); pepper_info->name = UTF16ToASCII(webplugin_info.name); pepper_info->description = UTF16ToASCII(webplugin_info.desc); diff --git a/content/common/pepper_plugin_registry.h b/content/common/pepper_plugin_registry.h index b3b94ab..ee2404a4 100644 --- a/content/common/pepper_plugin_registry.h +++ b/content/common/pepper_plugin_registry.h @@ -33,6 +33,9 @@ struct CONTENT_EXPORT PepperPluginInfo { // True when this plugin should be run out of process. Defaults to false. bool is_out_of_process; + // Whether the plugin is enabled. Defaults to true. + bool enabled; + FilePath path; // Internal plugins have "internal-[name]" as path. std::string name; std::string description; diff --git a/content/common/view_messages.h b/content/common/view_messages.h index e2612c2e..1165ffc 100644 --- a/content/common/view_messages.h +++ b/content/common/view_messages.h @@ -466,6 +466,7 @@ IPC_STRUCT_TRAITS_BEGIN(webkit::WebPluginInfo) IPC_STRUCT_TRAITS_MEMBER(version) IPC_STRUCT_TRAITS_MEMBER(desc) IPC_STRUCT_TRAITS_MEMBER(mime_types) + IPC_STRUCT_TRAITS_MEMBER(enabled) IPC_STRUCT_TRAITS_MEMBER(type) IPC_STRUCT_TRAITS_END() |