Bug 1716884 - Allow experimenting with disabling Keep in Dock / Pin to taskbar r=andreio
Add new NimbusFeature.shellService that is available at startup, e.g., for default browser prompt. Differential Revision: https://phabricator.services.mozilla.com/D118092
This commit is contained in:
@@ -13,15 +13,11 @@ const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
const { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"WindowsRegistry",
|
||||
"resource://gre/modules/WindowsRegistry.jsm"
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
Subprocess: "resource://gre/modules/Subprocess.jsm",
|
||||
NimbusFeatures: "resource://nimbus/ExperimentAPI.jsm",
|
||||
setTimeout: "resource://gre/modules/Timer.jsm",
|
||||
Subprocess: "resource://gre/modules/Subprocess.jsm",
|
||||
WindowsRegistry: "resource://gre/modules/WindowsRegistry.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(
|
||||
@@ -277,6 +273,11 @@ let ShellServiceInternal = {
|
||||
);
|
||||
}
|
||||
|
||||
// Pretend pinning is not needed/supported if remotely disabled.
|
||||
if (NimbusFeatures.shellService.getVariable("disablePin")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Currently this only works on certain Windows versions.
|
||||
try {
|
||||
// First check if we can even pin the app where an exception means no.
|
||||
|
||||
Reference in New Issue
Block a user