mirror of
https://github.com/zen-browser/desktop.git
synced 2026-08-23 07:00:49 +00:00
46 lines
1.8 KiB
C++
46 lines
1.8 KiB
C++
diff --git a/browser/components/BrowserGlue.sys.mjs b/browser/components/BrowserGlue.sys.mjs
|
|
index b888a753a7f23a9800fe04da51a4e6b898314ff2..35eea774e1ea4b1807ec65ebc767f423d81602bd 100644
|
|
--- a/browser/components/BrowserGlue.sys.mjs
|
|
+++ b/browser/components/BrowserGlue.sys.mjs
|
|
@@ -121,6 +121,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|
WindowsGPOParser: "resource://gre/modules/policies/WindowsGPOParser.sys.mjs",
|
|
clearTimeout: "resource://gre/modules/Timer.sys.mjs",
|
|
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
|
+ gZenUIMigration: "chrome://browser/content/zen-components/ZenUIMigration.mjs",
|
|
});
|
|
|
|
if (AppConstants.MOZ_UPDATER) {
|
|
@@ -1951,6 +1952,7 @@ BrowserGlue.prototype = {
|
|
|
|
lazy.UrlbarPrefs.updateFirefoxSuggestScenario();
|
|
|
|
+ lazy.gZenUIMigration.init(this._isNewProfile, aWindow);
|
|
// A channel for "remote troubleshooting" code...
|
|
let channel = new lazy.WebChannel(
|
|
"remote-troubleshooting",
|
|
@@ -4761,6 +4763,7 @@ BrowserGlue.prototype = {
|
|
},
|
|
|
|
async _maybeShowDefaultBrowserPrompt() {
|
|
+ this._ZenMaybeShowWelcomeScreen();
|
|
// Highest priority is about:welcome window modal experiment
|
|
// Second highest priority is the upgrade dialog, which can include a "primary
|
|
// browser" request and is limited in various ways, e.g., major upgrades.
|
|
@@ -5302,6 +5305,16 @@ BrowserGlue.prototype = {
|
|
"nsIObserver",
|
|
"nsISupportsWeakReference",
|
|
]),
|
|
+
|
|
+ _ZenMaybeShowWelcomeScreen() {
|
|
+ const welcomeEnabled = Services.prefs.getBoolPref("zen.welcome-screen.enabled", true)
|
|
+ const welcomeSeen = Services.prefs.getBoolPref("zen.welcome-screen.seen", false)
|
|
+ if (welcomeEnabled && !welcomeSeen) {
|
|
+ lazy.BrowserWindowTracker.getTopWindow().gDialogBox.open(
|
|
+ "chrome://browser/content/zen-welcome/welcome.html"
|
|
+ );
|
|
+ }
|
|
+ },
|
|
};
|
|
|
|
var ContentBlockingCategoriesPrefs = {
|