зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1381853 - lazy load browser-sync.js into the browser window, r=mconley.
This commit is contained in:
Родитель
d65f4676a6
Коммит
d05f708f77
|
@ -2,6 +2,9 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// This file is loaded into the browser window scope.
|
||||
/* eslint-env mozilla/browser-window */
|
||||
|
||||
Cu.import("resource://services-sync/UIState.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "EnsureFxAccountsWebChannel",
|
||||
|
|
|
@ -132,6 +132,8 @@ XPCOMUtils.defineLazyScriptGetter(this, ["SocialUI",
|
|||
"SocialShare",
|
||||
"SocialActivationListener"],
|
||||
"chrome://browser/content/browser-social.js");
|
||||
XPCOMUtils.defineLazyScriptGetter(this, "gSync",
|
||||
"chrome://browser/content/browser-sync.js");
|
||||
|
||||
|
||||
// lazy service getters
|
||||
|
@ -1966,7 +1968,9 @@ if (AppConstants.platform == "macosx") {
|
|||
gPrivateBrowsingUI.init();
|
||||
|
||||
// initialize the sync UI
|
||||
requestIdleCallback(() => {
|
||||
gSync.init();
|
||||
}, {timeout: 1000 * 5});
|
||||
|
||||
if (AppConstants.E10S_TESTING_ONLY) {
|
||||
gRemoteTabsUI.init();
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
<script type="application/javascript" src="chrome://browser/content/browser-places.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/browser-plugins.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/browser-sidebar.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/browser-sync.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/browser-tabsintitlebar.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/browser-thumbnails.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/browser-trackingprotection.js"/>
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
/* global sinon */
|
||||
Services.scriptloader.loadSubScript("resource://testing-common/sinon-2.3.2.js");
|
||||
|
||||
Cu.import("resource://services-sync/UIState.jsm", this);
|
||||
|
||||
registerCleanupFunction(function() {
|
||||
delete window.sinon;
|
||||
});
|
||||
|
|
|
@ -7,6 +7,8 @@ registerCleanupFunction(function() {
|
|||
delete window.sinon;
|
||||
});
|
||||
|
||||
Cu.import("resource://services-sync/UIState.jsm");
|
||||
|
||||
const mockRemoteClients = [
|
||||
{ id: "0", name: "foo", type: "mobile" },
|
||||
{ id: "1", name: "bar", type: "desktop" },
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
<script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/browser.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/browser-places.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/browser-sync.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/nsContextMenu.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/web-panels.js"/>
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
<script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/browser.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/browser-places.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/browser-sync.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/nsContextMenu.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/webext-panels.js"/>
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
|
||||
Cu.import("resource://services-sync/UIState.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "fxAccounts",
|
||||
"resource://gre/modules/FxAccounts.jsm");
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче