зеркало из https://github.com/mozilla/gecko-dev.git
Bug 716107 part 1 - Add 'fullscreen' permissions to Page Info. r=dao
This commit is contained in:
Родитель
79b2b0b197
Коммит
7433ea1120
|
@ -89,6 +89,7 @@
|
|||
<command id="cmd_popupDef" oncommand="onCheckboxClick('popup');"/>
|
||||
<command id="cmd_cookieDef" oncommand="onCheckboxClick('cookie');"/>
|
||||
<command id="cmd_installDef" oncommand="onCheckboxClick('install');"/>
|
||||
<command id="cmd_fullscreenDef" oncommand="onCheckboxClick('fullscreen');"/>
|
||||
<command id="cmd_geoDef" oncommand="onCheckboxClick('geo');"/>
|
||||
<command id="cmd_indexedDBDef" oncommand="onCheckboxClick('indexedDB');"/>
|
||||
<command id="cmd_pluginsDef" oncommand="onCheckboxClick('plugins');"/>
|
||||
|
@ -96,6 +97,7 @@
|
|||
<command id="cmd_popupToggle" oncommand="onRadioClick('popup');"/>
|
||||
<command id="cmd_cookieToggle" oncommand="onRadioClick('cookie');"/>
|
||||
<command id="cmd_installToggle" oncommand="onRadioClick('install');"/>
|
||||
<command id="cmd_fullscreenToggle" oncommand="onRadioClick('fullscreen');"/>
|
||||
<command id="cmd_geoToggle" oncommand="onRadioClick('geo');"/>
|
||||
<command id="cmd_indexedDBToggle" oncommand="onRadioClick('indexedDB');"/>
|
||||
<command id="cmd_pluginsToggle" oncommand="onRadioClick('plugins');"/>
|
||||
|
@ -416,6 +418,19 @@
|
|||
</radiogroup>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<vbox class="permission">
|
||||
<label class="permissionLabel" id="permFullscreenLabel"
|
||||
value="&permFullscreen;" control="fullscreenRadioGroup"/>
|
||||
<hbox role="group" aria-labelledby="permFullscreenLabel">
|
||||
<checkbox id="fullscreenDef" command="cmd_fullscreenDef" label="&permUseDefault;"/>
|
||||
<spacer flex="1"/>
|
||||
<radiogroup id="fullscreenRadioGroup" orient="horizontal">
|
||||
<radio id="fullscreen#0" command="cmd_fullscreenToggle" label="&permAskAlways;"/>
|
||||
<radio id="fullscreen#1" command="cmd_fullscreenToggle" label="&permAllow;"/>
|
||||
<radio id="fullscreen#2" command="cmd_fullscreenToggle" label="&permBlock;"/>
|
||||
</radiogroup>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</vbox>
|
||||
|
||||
|
|
|
@ -33,9 +33,11 @@
|
|||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
const ALLOW = nsIPermissionManager.ALLOW_ACTION; // 1
|
||||
const BLOCK = nsIPermissionManager.DENY_ACTION; // 2
|
||||
const SESSION = nsICookiePermission.ACCESS_SESSION;// 8
|
||||
|
||||
const UNKNOWN = nsIPermissionManager.UNKNOWN_ACTION; // 0
|
||||
const ALLOW = nsIPermissionManager.ALLOW_ACTION; // 1
|
||||
const BLOCK = nsIPermissionManager.DENY_ACTION; // 2
|
||||
const SESSION = nsICookiePermission.ACCESS_SESSION; // 8
|
||||
|
||||
const nsIIndexedDatabaseManager =
|
||||
Components.interfaces.nsIIndexedDatabaseManager;
|
||||
|
@ -88,6 +90,10 @@ var gPermObj = {
|
|||
if (gPrefs.getBoolPref("plugins.click_to_play"))
|
||||
return BLOCK;
|
||||
return ALLOW;
|
||||
},
|
||||
fullscreen: function getFullscreenDefaultPermissions()
|
||||
{
|
||||
return UNKNOWN;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -200,6 +206,9 @@ function onRadioClick(aPartId)
|
|||
if (aPartId == "indexedDB" && permission == BLOCK) {
|
||||
permissionManager.remove(gPermURI.host, "indexedDB-unlimited");
|
||||
}
|
||||
if (aPartId == "fullscreen" && permission == UNKNOWN) {
|
||||
permissionManager.remove(gPermURI.host, "fullscreen");
|
||||
}
|
||||
}
|
||||
|
||||
function setRadioState(aPartId, aValue)
|
||||
|
|
|
@ -99,6 +99,7 @@
|
|||
<!ENTITY permInstall "Install Extensions or Themes">
|
||||
<!ENTITY permGeo "Share Location">
|
||||
<!ENTITY permPlugins "Activate Plugins">
|
||||
<!ENTITY permFullscreen "Enter Fullscreen">
|
||||
|
||||
<!ENTITY permIndexedDB "Maintain Offline Storage">
|
||||
<!ENTITY permClearStorage "Clear Storage">
|
||||
|
|
Загрузка…
Ссылка в новой задаче