зеркало из https://github.com/mozilla/gecko-dev.git
bug 1294341 - pref to control which CTP plugins should be hidden r=bsmedberg
This commit is contained in:
Родитель
34a9b72257
Коммит
c5b78b24d7
|
@ -329,6 +329,12 @@ operator<(const RefPtr<nsPluginElement>& lhs,
|
|||
return lhs->PluginTag()->Name() < rhs->PluginTag()->Name();
|
||||
}
|
||||
|
||||
static bool
|
||||
PluginShouldBeHidden(nsCString aName) {
|
||||
// This only supports one hidden plugin
|
||||
return Preferences::GetCString("plugins.navigator.hidden_ctp_plugin").Equals(aName);
|
||||
}
|
||||
|
||||
void
|
||||
nsPluginArray::EnsurePlugins()
|
||||
{
|
||||
|
@ -357,8 +363,7 @@ nsPluginArray::EnsurePlugins()
|
|||
if (pluginTag->IsClicktoplay()) {
|
||||
nsCString name;
|
||||
pluginTag->GetName(name);
|
||||
if (name.EqualsLiteral("Shockwave Flash") &&
|
||||
Preferences::GetBool("plugins.navigator_hide_disabled_flash", false)) {
|
||||
if (PluginShouldBeHidden(name)) {
|
||||
RefPtr<nsPluginHost> pluginHost = nsPluginHost::GetInst();
|
||||
nsCString permString;
|
||||
nsresult rv = pluginHost->GetPermissionStringForTag(pluginTag, 0, permString);
|
||||
|
|
|
@ -2755,7 +2755,10 @@ pref("hangmonitor.timeout", 0);
|
|||
pref("plugins.load_appdir_plugins", false);
|
||||
// If true, plugins will be click to play
|
||||
pref("plugins.click_to_play", false);
|
||||
|
||||
#ifdef NIGHTLY_BUILD
|
||||
// This only supports one hidden ctp plugin, edit nsPluginArray.cpp if adding a second
|
||||
pref("plugins.navigator.hidden_ctp_plugin", "Shockwave Flash");
|
||||
#endif
|
||||
// The default value for nsIPluginTag.enabledState (STATE_ENABLED = 2)
|
||||
pref("plugin.default.state", 2);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче