summaryrefslogtreecommitdiffstats
path: root/application/basilisk/base/content/browser.js
diff options
context:
space:
mode:
authorAscrod <32915892+Ascrod@users.noreply.github.com>2019-04-18 20:35:10 -0400
committerAscrod <32915892+Ascrod@users.noreply.github.com>2019-04-18 20:35:10 -0400
commitaf7e140d4ed8f5bc9a69da2f0338ad3cb1319dec (patch)
tree4aac6c4383fb9e279fccb13c65a4e44595fd4cf6 /application/basilisk/base/content/browser.js
parent40fc72376411587e7bf9985fb9545eca1c9aaa8e (diff)
parent51722cd4fecb5c8c79a302f2771cad71535df5ea (diff)
downloadUXP-af7e140d4ed8f5bc9a69da2f0338ad3cb1319dec.tar
UXP-af7e140d4ed8f5bc9a69da2f0338ad3cb1319dec.tar.gz
UXP-af7e140d4ed8f5bc9a69da2f0338ad3cb1319dec.tar.lz
UXP-af7e140d4ed8f5bc9a69da2f0338ad3cb1319dec.tar.xz
UXP-af7e140d4ed8f5bc9a69da2f0338ad3cb1319dec.zip
Merge branch 'master' into default-pref
Diffstat (limited to 'application/basilisk/base/content/browser.js')
-rw-r--r--application/basilisk/base/content/browser.js37
1 files changed, 27 insertions, 10 deletions
diff --git a/application/basilisk/base/content/browser.js b/application/basilisk/base/content/browser.js
index 7e8f7d821..926a369dd 100644
--- a/application/basilisk/base/content/browser.js
+++ b/application/basilisk/base/content/browser.js
@@ -46,7 +46,6 @@ Cu.import("resource://gre/modules/NotificationDB.jsm");
["Task", "resource://gre/modules/Task.jsm"],
["UpdateUtils", "resource://gre/modules/UpdateUtils.jsm"],
["Weave", "resource://services-sync/main.js"],
- ["fxAccounts", "resource://gre/modules/FxAccounts.jsm"],
#ifdef MOZ_DEVTOOLS
// Note: Do not delete! It is used for: base/content/nsContextMenu.js
["gDevTools", "resource://devtools/client/framework/gDevTools.jsm"],
@@ -103,6 +102,12 @@ XPCOMUtils.defineLazyGetter(this, "PageMenuParent", function() {
return new tmp.PageMenuParent();
});
+#ifdef MOZ_SERVICES_SYNC
+XPCOMUtils.defineLazyModuleGetter(this, "Weave",
+ "resource://services-sync/main.js");
+#endif
+
+
XPCOMUtils.defineLazyGetter(this, "PopupNotifications", function () {
let tmp = {};
Cu.import("resource://gre/modules/PopupNotifications.jsm", tmp);
@@ -208,6 +213,10 @@ var gInitialPages = [
"about:logopage"
];
+#ifdef MOZ_SERVICES_SYNC
+#include browser-syncui.js
+#endif
+
function* browserWindows() {
let windows = Services.wm.getEnumerator("navigator:browser");
while (windows.hasMoreElements())
@@ -1305,13 +1314,14 @@ var gBrowserInit = {
FullScreen.init();
PointerLock.init();
- // initialize the sync UI
- gSyncUI.init();
- gFxAccounts.init();
-
if (AppConstants.MOZ_DATA_REPORTING)
gDataNotificationInfoBar.init();
+#ifdef MOZ_SERVICES_SYNC
+ // initialize the sync UI
+ gSyncUI.init();
+#endif
+
gBrowserThumbnails.init();
gMenuButtonBadgeManager.init();
@@ -1445,8 +1455,6 @@ var gBrowserInit = {
FullScreen.uninit();
- gFxAccounts.uninit();
-
Services.obs.removeObserver(gPluginHandler.NPAPIPluginCrashed, "plugin-crashed");
try {
@@ -1607,8 +1615,10 @@ if (AppConstants.platform == "macosx") {
// initialize the private browsing UI
gPrivateBrowsingUI.init();
+#ifdef MOZ_SERVICES_SYNC
// initialize the sync UI
gSyncUI.init();
+#endif
};
gBrowserInit.nonBrowserWindowShutdown = function() {
@@ -3175,12 +3185,14 @@ var PrintPreviewListener = {
this._chromeState.globalNotificationsOpen = !globalNotificationBox.notificationsHidden;
globalNotificationBox.notificationsHidden = true;
+#ifdef MOZ_SERVICES_SYNC
this._chromeState.syncNotificationsOpen = false;
var syncNotifications = document.getElementById("sync-notifications");
if (syncNotifications) {
this._chromeState.syncNotificationsOpen = !syncNotifications.notificationsHidden;
syncNotifications.notificationsHidden = true;
}
+#endif
},
_showChrome: function () {
if (this._chromeState.notificationsOpen)
@@ -3192,8 +3204,10 @@ var PrintPreviewListener = {
if (this._chromeState.globalNotificationsOpen)
document.getElementById("global-notificationbox").notificationsHidden = false;
+#ifdef MOZ_SERVICES_SYNC
if (this._chromeState.syncNotificationsOpen)
document.getElementById("sync-notifications").notificationsHidden = false;
+#endif
if (this._chromeState.sidebarOpen)
SidebarUI.show(this._sidebarCommand);
@@ -6232,9 +6246,14 @@ function checkEmptyPageOrigin(browser = gBrowser.selectedBrowser,
return ssm.isSystemPrincipal(contentPrincipal);
}
+#ifdef MOZ_SERVICES_SYNC
function BrowserOpenSyncTabs() {
- switchToTabHavingURI("about:sync-tabs", true);
+ if (gSyncUI._needsSetup())
+ gSyncUI.openSetup();
+ else
+ switchToTabHavingURI("about:sync-tabs", true);
}
+#endif
/**
* Format a URL
@@ -7534,8 +7553,6 @@ var TabContextMenu = {
this.contextTab.addEventListener("TabAttrModified", this, false);
aPopupMenu.addEventListener("popuphiding", this, false);
-
- gFxAccounts.updateTabContextMenu(aPopupMenu);
},
handleEvent(aEvent) {
switch (aEvent.type) {