Bug 189378: add pref to disable plugins in the browser, r=josh
--HG-- extra : rebase_source : 7f70e2585d6b2840fa801969e5af50c5e81caca8
This commit is contained in:
Родитель
00143cd5a5
Коммит
907786e0ea
|
@ -1708,6 +1708,11 @@ nsPluginHost::nsPluginHost()
|
|||
mDefaultPluginDisabled = tmp;
|
||||
}
|
||||
|
||||
rv = mPrefService->GetBoolPref("plugin.disable", &tmp);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
mPluginsDisabled = tmp;
|
||||
}
|
||||
|
||||
#ifdef WINCE
|
||||
mDefaultPluginDisabled = PR_TRUE;
|
||||
#endif
|
||||
|
@ -3694,6 +3699,9 @@ NS_IMETHODIMP nsPluginHost::LoadPlugins()
|
|||
if (mPluginsLoaded)
|
||||
return NS_OK;
|
||||
|
||||
if (mPluginsDisabled)
|
||||
return NS_OK;
|
||||
|
||||
PRBool pluginschanged;
|
||||
nsresult rv = FindPlugins(PR_TRUE, &pluginschanged);
|
||||
if (NS_FAILED(rv))
|
||||
|
|
|
@ -259,6 +259,9 @@ private:
|
|||
// set by pref plugin.default_plugin_disabled
|
||||
PRPackedBool mDefaultPluginDisabled;
|
||||
|
||||
// set by pref plugin.disable
|
||||
PRPackedBool mPluginsDisabled;
|
||||
|
||||
nsPluginInstanceTagList mPluginInstanceTagList;
|
||||
nsTArray<PRLibrary*> mUnusedLibraries;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче