mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 23:35:34 +00:00
Bug 1715838 - Creates preference for new screenshot components. r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D117654
This commit is contained in:
parent
4c923c87d0
commit
371a34a387
@ -2040,6 +2040,9 @@ pref("browser.suppress_first_window_animation", true);
|
||||
// Preference that allows individual users to disable Screenshots.
|
||||
pref("extensions.screenshots.disabled", false);
|
||||
|
||||
// Preference that determines whether Screenshots is opened as a dedicated browser component
|
||||
pref("screenshots.browser.component.enabled", false);
|
||||
|
||||
// DoH Rollout: whether to enable automatic performance-based TRR-selection.
|
||||
// This pref is controlled by a Normandy rollout so we don't overload providers.
|
||||
pref("doh-rollout.trr-selection.enabled", false);
|
||||
|
@ -1291,7 +1291,9 @@ class nsContextMenu {
|
||||
}
|
||||
|
||||
takeScreenshot() {
|
||||
Services.obs.notifyObservers(null, "menuitem-screenshot", true);
|
||||
if (!SCREENSHOT_BROWSER_COMPONENT) {
|
||||
Services.obs.notifyObservers(null, "menuitem-screenshot", true);
|
||||
}
|
||||
}
|
||||
|
||||
// View Partial Source
|
||||
@ -2226,3 +2228,10 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
||||
"extensions.screenshots.disabled",
|
||||
false
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
this,
|
||||
"SCREENSHOT_BROWSER_COMPONENT",
|
||||
"screenshots.browser.component.enabled",
|
||||
false
|
||||
);
|
||||
|
@ -53,6 +53,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
||||
false
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
this,
|
||||
"SCREENSHOT_BROWSER_COMPONENT",
|
||||
"screenshots.browser.component.enabled",
|
||||
false
|
||||
);
|
||||
|
||||
function setAttributes(aNode, aAttrs) {
|
||||
let doc = aNode.ownerDocument;
|
||||
for (let [name, value] of Object.entries(aAttrs)) {
|
||||
@ -502,7 +509,9 @@ if (!screenshotsDisabled) {
|
||||
id: "screenshot-button",
|
||||
l10nId: "screenshot-toolbarbutton",
|
||||
onCommand(aEvent) {
|
||||
Services.obs.notifyObservers(null, "menuitem-screenshot");
|
||||
if (!SCREENSHOT_BROWSER_COMPONENT) {
|
||||
Services.obs.notifyObservers(null, "menuitem-screenshot");
|
||||
}
|
||||
},
|
||||
onCreated(aNode) {
|
||||
aNode.ownerGlobal.MozXULElement.insertFTLIfNeeded(
|
||||
|
Loading…
Reference in New Issue
Block a user