Bug 1415974 - Add Hide entry in the Page Info panel for plug-ins. r=dthayer
MozReview-Commit-ID: BndE8mPz6Jd
--- a/browser/base/content/pageinfo/pageInfo.xul
+++ b/browser/base/content/pageinfo/pageInfo.xul
@@ -284,16 +284,17 @@
value="&permPlugins;" control="pluginsRadioGroup"/>
<hbox id="permPluginTemplate" role="group" aria-labelledby="permPluginsLabel" align="baseline">
<label class="permPluginTemplateLabel"/>
<spacer flex="1"/>
<radiogroup class="permPluginTemplateRadioGroup" orient="horizontal" command="cmd_pluginsToggle">
<radio class="permPluginTemplateRadioDefault" label="&permUseDefault;"/>
<radio class="permPluginTemplateRadioAsk" label="&permAskAlways;"/>
<radio class="permPluginTemplateRadioAllow" label="&permAllow;"/>
+ <radio class="permPluginTemplateRadioHide" label="&permHide;"/>
<radio class="permPluginTemplateRadioBlock" label="&permBlock;"/>
</radiogroup>
</hbox>
</vbox>
</vbox>
<hbox pack="end">
<button command="cmd_help" label="&helpButton.label;" dlgtype="help"/>
</hbox>
--- a/browser/base/content/pageinfo/permissions.js
+++ b/browser/base/content/pageinfo/permissions.js
@@ -178,16 +178,18 @@ function fillInPluginPermissionTemplate(
let permPluginTemplate = document.getElementById("permPluginTemplate").cloneNode(true);
permPluginTemplate.setAttribute("permString", aPermissionString);
let attrs = [
[ ".permPluginTemplateLabel", "value", aPluginName ],
[ ".permPluginTemplateRadioGroup", "id", aPermissionString + "RadioGroup" ],
[ ".permPluginTemplateRadioDefault", "id", aPermissionString + "#0" ],
[ ".permPluginTemplateRadioAsk", "id", aPermissionString + "#3" ],
[ ".permPluginTemplateRadioAllow", "id", aPermissionString + "#1" ],
+ // #8 comes from Ci.nsIObjectLoadingContent.PLUGIN_PERMISSION_PROMPT_ACTION_QUIET
+ [ ".permPluginTemplateRadioHide", "id", aPermissionString + "#8"],
[ ".permPluginTemplateRadioBlock", "id", aPermissionString + "#2" ]
];
for (let attr of attrs) {
permPluginTemplate.querySelector(attr[0]).setAttribute(attr[1], attr[2]);
}
return permPluginTemplate;
--- a/browser/locales/en-US/chrome/browser/pageInfo.dtd
+++ b/browser/locales/en-US/chrome/browser/pageInfo.dtd
@@ -50,16 +50,17 @@
<!ENTITY feedSubscribe.accesskey "u">
<!ENTITY permTab "Permissions">
<!ENTITY permTab.accesskey "P">
<!ENTITY permUseDefault "Use Default">
<!ENTITY permAskAlways "Always ask">
<!ENTITY permAllow "Allow">
<!ENTITY permAllowSession "Allow for Session">
+<!ENTITY permHide "Hide">
<!ENTITY permBlock "Block">
<!ENTITY permissionsFor "Permissions for:">
<!ENTITY permPlugins "Activate Plugins">
<!ENTITY securityTab "Security">
<!ENTITY securityTab.accesskey "S">
<!ENTITY securityView.certView "View Certificate">
<!ENTITY securityView.accesskey "V">