summaryrefslogtreecommitdiffstats
path: root/application/palemoon/components
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-26 09:54:20 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-26 09:54:20 +0200
commitd6213d3f057e902316ff67b9774e349573bde90f (patch)
tree2c6eb586b2b24b2066789671af0c22edcc1f5a87 /application/palemoon/components
parent4678680983c53e28371ab2a5d0524ab63cbed4b0 (diff)
downloadUXP-d6213d3f057e902316ff67b9774e349573bde90f.tar
UXP-d6213d3f057e902316ff67b9774e349573bde90f.tar.gz
UXP-d6213d3f057e902316ff67b9774e349573bde90f.tar.lz
UXP-d6213d3f057e902316ff67b9774e349573bde90f.tar.xz
UXP-d6213d3f057e902316ff67b9774e349573bde90f.zip
Bug 1192458, Part 1 - Consolidate push and desktop notification permissions
Diffstat (limited to 'application/palemoon/components')
-rw-r--r--application/palemoon/components/nsBrowserGlue.js47
-rw-r--r--application/palemoon/components/preferences/aboutPermissions.js17
2 files changed, 7 insertions, 57 deletions
diff --git a/application/palemoon/components/nsBrowserGlue.js b/application/palemoon/components/nsBrowserGlue.js
index 3908ae81f..642e27c6b 100644
--- a/application/palemoon/components/nsBrowserGlue.js
+++ b/application/palemoon/components/nsBrowserGlue.js
@@ -1751,42 +1751,6 @@ ContentPermissionPrompt.prototype = {
}
},
- _promptPush : function(aRequest) {
- var browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
- var requestingURI = aRequest.principal.URI;
-
- var message = browserBundle.formatStringFromName("push.enablePush",
- [requestingURI.host], 1);
-
- var actions = [
- {
- stringId: "push.alwaysAllow",
- action: Ci.nsIPermissionManager.ALLOW_ACTION,
- expireType: null,
- callback: function() {}
- },
- {
- stringId: "push.allowForSession",
- action: Ci.nsIPermissionManager.ALLOW_ACTION,
- expireType: Ci.nsIPermissionManager.EXPIRE_SESSION,
- callback: function() {}
- },
- {
- stringId: "push.alwaysBlock",
- action: Ci.nsIPermissionManager.DENY_ACTION,
- expireType: null,
- callback: function() {}
- }]
-
- var options = {
- learnMoreURL: Services.urlFormatter.formatURLPref("browser.push.warning.infoURL"),
- };
-
- this._showPrompt(aRequest, message, "push", actions, "push",
- "push-notification-icon", options);
-
- },
-
_promptGeo : function(aRequest) {
var browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
var requestingURI = aRequest.principal.URI;
@@ -1866,9 +1830,13 @@ ContentPermissionPrompt.prototype = {
},
];
+ var options = {
+ learnMoreURL: Services.urlFormatter.formatURLPref("browser.push.warning.infoURL"),
+ };
+
this._showPrompt(aRequest, message, "desktop-notification", actions,
"web-notifications",
- "web-notifications-notification-icon", null);
+ "web-notifications-notification-icon", options);
},
_promptPointerLock: function CPP_promtPointerLock(aRequest, autoAllow) {
@@ -1922,7 +1890,6 @@ ContentPermissionPrompt.prototype = {
const kFeatureKeys = { "geolocation" : "geo",
"desktop-notification" : "desktop-notification",
"pointerLock" : "pointerLock",
- "push" : "push"
};
// Make sure that we support the request.
@@ -1966,10 +1933,6 @@ ContentPermissionPrompt.prototype = {
case "pointerLock":
this._promptPointerLock(request, autoAllow);
break;
- case "push":
- this._promptPush(request);
- break;
- }
},
};
diff --git a/application/palemoon/components/preferences/aboutPermissions.js b/application/palemoon/components/preferences/aboutPermissions.js
index db717e1c6..f41b71658 100644
--- a/application/palemoon/components/preferences/aboutPermissions.js
+++ b/application/palemoon/components/preferences/aboutPermissions.js
@@ -449,19 +449,6 @@ var PermissionDefaults = {
let value = (aValue != this.DENY);
Services.prefs.setBoolPref("full-screen-api.pointer-lock.enabled", value);
},
-
- get push() {
- if (!Services.prefs.getBoolPref("dom.push.enabled")) {
- return this.DENY;
- }
- // We always ask for permission to push with a specific site,
- // so there is no global ALLOW.
- return this.UNKNOWN;
- },
- set push(aValue) {
- let value = (aValue != this.DENY);
- Services.prefs.setBoolPref("dom.push.enabled", value);
- },
}
/**
@@ -509,13 +496,13 @@ var AboutPermissions = {
*/
_supportedPermissions: ["password", "image", "popup", "cookie",
"desktop-notification", "install", "geo", "indexedDB",
- "fullscreen", "pointerLock", "push"],
+ "fullscreen", "pointerLock"],
/**
* Permissions that don't have a global "Allow" option.
*/
_noGlobalAllow: ["desktop-notification", "geo", "indexedDB", "fullscreen",
- "pointerLock", "push"],
+ "pointerLock"],
/**
* Permissions that don't have a global "Deny" option.