зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1834831 - update imports of browser/modules JSMs r=webdriver-reviewers,perftest-reviewers,zeid,extension-reviewers,settings-reviewers,pip-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,sessionstore-reviewers,tabbrowser-reviewers,whimboo,mhowell,sgalich,robwu,sparky,Standard8,mconley,dao,sclements
Differential Revision: https://phabricator.services.mozilla.com/D179169
This commit is contained in:
Родитель
fde7c77c81
Коммит
130ce23c4c
|
@ -6,8 +6,11 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
|||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.jsm",
|
||||
ASRouter: "resource://activity-stream/lib/ASRouter.jsm",
|
||||
});
|
||||
|
||||
|
|
|
@ -2,16 +2,11 @@
|
|||
* 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/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
SessionStore: "resource:///modules/sessionstore/SessionStore.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
TabCrashHandler: "resource:///modules/ContentCrashHandlers.jsm",
|
||||
TabCrashHandler: "resource:///modules/ContentCrashHandlers.sys.mjs",
|
||||
});
|
||||
|
||||
// A list of all of the open about:tabcrashed pages.
|
||||
|
|
|
@ -8,11 +8,9 @@
|
|||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"BrowserWindowTracker",
|
||||
"resource:///modules/BrowserWindowTracker.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
});
|
||||
|
||||
class PopupShownObserver {
|
||||
_weakContext = null;
|
||||
|
|
|
@ -4,11 +4,9 @@
|
|||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"FaviconLoader",
|
||||
"resource:///modules/FaviconLoader.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
FaviconLoader: "resource:///modules/FaviconLoader.sys.mjs",
|
||||
});
|
||||
|
||||
export class LinkHandlerChild extends JSWindowActorChild {
|
||||
constructor() {
|
||||
|
|
|
@ -381,7 +381,7 @@ function prompt(
|
|||
// then chose to just build their own prompting mechanism instead.
|
||||
//
|
||||
// So, what you are looking at here is not a real nsIContentPermissionRequest, but
|
||||
// something that looks really similar and will be transmitted to webrtcUI.jsm
|
||||
// something that looks really similar and will be transmitted to webrtcUI.sys.mjs
|
||||
// for showing the prompt.
|
||||
// Note that we basically do the permission delegate check in
|
||||
// nsIContentPermissionRequest, but because webrtc uses their own prompting
|
||||
|
|
|
@ -9,12 +9,8 @@ const lazy = {};
|
|||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
SitePermissions: "resource:///modules/SitePermissions.sys.mjs",
|
||||
webrtcUI: "resource:///modules/webrtcUI.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"webrtcUI",
|
||||
"resource:///modules/webrtcUI.jsm"
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(
|
||||
lazy,
|
||||
|
|
|
@ -5,11 +5,9 @@
|
|||
// This file is loaded into the browser window scope.
|
||||
/* eslint-env mozilla/browser-window */
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"TabsPanel",
|
||||
"resource:///modules/TabsList.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
TabsPanel: "resource:///modules/TabsList.sys.mjs",
|
||||
});
|
||||
|
||||
var gTabsPanel = {
|
||||
kElements: {
|
||||
|
|
|
@ -1394,9 +1394,11 @@ var BookmarkingUI = {
|
|||
},
|
||||
|
||||
isOnNewTabPage({ currentURI }) {
|
||||
// Prevent loading AboutNewTab.jsm during startup path if it
|
||||
// Prevent loading AboutNewTab.sys.mjs during startup path if it
|
||||
// is only the newTabURL getter we are interested in.
|
||||
let newTabURL = Cu.isModuleLoaded("resource:///modules/AboutNewTab.jsm")
|
||||
let newTabURL = Cu.isESModuleLoaded(
|
||||
"resource:///modules/AboutNewTab.sys.mjs"
|
||||
)
|
||||
? AboutNewTab.newTabURL
|
||||
: "about:newtab";
|
||||
// Don't treat a custom "about:blank" new tab URL as the "New Tab Page"
|
||||
|
|
|
@ -15,10 +15,14 @@ ChromeUtils.importESModule("resource://gre/modules/NotificationDB.sys.mjs");
|
|||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AMTelemetry: "resource://gre/modules/AddonManager.sys.mjs",
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
|
||||
AboutReaderParent: "resource:///actors/AboutReaderParent.sys.mjs",
|
||||
AddonManager: "resource://gre/modules/AddonManager.sys.mjs",
|
||||
BrowserSearchTelemetry: "resource:///modules/BrowserSearchTelemetry.sys.mjs",
|
||||
BrowserTelemetryUtils: "resource://gre/modules/BrowserTelemetryUtils.sys.mjs",
|
||||
BrowserUIUtils: "resource:///modules/BrowserUIUtils.sys.mjs",
|
||||
BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.sys.mjs",
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
Color: "resource://gre/modules/Color.sys.mjs",
|
||||
ContextualIdentityService:
|
||||
"resource://gre/modules/ContextualIdentityService.sys.mjs",
|
||||
|
@ -29,8 +33,10 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
DownloadUtils: "resource://gre/modules/DownloadUtils.sys.mjs",
|
||||
DownloadsCommon: "resource:///modules/DownloadsCommon.sys.mjs",
|
||||
E10SUtils: "resource://gre/modules/E10SUtils.sys.mjs",
|
||||
ExtensionsUI: "resource:///modules/ExtensionsUI.sys.mjs",
|
||||
FirefoxViewNotificationManager:
|
||||
"resource:///modules/firefox-view-notification-manager.sys.mjs",
|
||||
HomePage: "resource:///modules/HomePage.sys.mjs",
|
||||
LightweightThemeConsumer:
|
||||
"resource://gre/modules/LightweightThemeConsumer.sys.mjs",
|
||||
Log: "resource://gre/modules/Log.sys.mjs",
|
||||
|
@ -38,8 +44,11 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
LoginManagerParent: "resource://gre/modules/LoginManagerParent.sys.mjs",
|
||||
MigrationUtils: "resource:///modules/MigrationUtils.sys.mjs",
|
||||
NetUtil: "resource://gre/modules/NetUtil.sys.mjs",
|
||||
NewTabPagePreloading: "resource:///modules/NewTabPagePreloading.sys.mjs",
|
||||
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
|
||||
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||
OpenInTabsUtils: "resource:///modules/OpenInTabsUtils.sys.mjs",
|
||||
PageActions: "resource:///modules/PageActions.sys.mjs",
|
||||
PageThumbs: "resource://gre/modules/PageThumbs.sys.mjs",
|
||||
PanelMultiView: "resource:///modules/PanelMultiView.sys.mjs",
|
||||
PanelView: "resource:///modules/PanelMultiView.sys.mjs",
|
||||
|
@ -50,6 +59,7 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
PluralForm: "resource://gre/modules/PluralForm.sys.mjs",
|
||||
Pocket: "chrome://pocket/content/Pocket.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
ProcessHangMonitor: "resource:///modules/ProcessHangMonitor.sys.mjs",
|
||||
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
|
||||
PromptUtils: "resource://gre/modules/PromptUtils.sys.mjs",
|
||||
ReaderMode: "resource://gre/modules/ReaderMode.sys.mjs",
|
||||
|
@ -61,9 +71,11 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
SessionStartup: "resource:///modules/sessionstore/SessionStartup.sys.mjs",
|
||||
SessionStore: "resource:///modules/sessionstore/SessionStore.sys.mjs",
|
||||
ShortcutUtils: "resource://gre/modules/ShortcutUtils.sys.mjs",
|
||||
SiteDataManager: "resource:///modules/SiteDataManager.sys.mjs",
|
||||
SitePermissions: "resource:///modules/SitePermissions.sys.mjs",
|
||||
SubDialog: "resource://gre/modules/SubDialog.sys.mjs",
|
||||
SubDialogManager: "resource://gre/modules/SubDialog.sys.mjs",
|
||||
TabCrashHandler: "resource:///modules/ContentCrashHandlers.sys.mjs",
|
||||
TabModalPrompt: "chrome://global/content/tabprompts.sys.mjs",
|
||||
TabsSetupFlowManager:
|
||||
"resource:///modules/firefox-view-tabs-setup-manager.sys.mjs",
|
||||
|
@ -80,26 +92,14 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
UrlbarValueFormatter: "resource:///modules/UrlbarValueFormatter.sys.mjs",
|
||||
Weave: "resource://services-sync/main.sys.mjs",
|
||||
WebNavigationFrames: "resource://gre/modules/WebNavigationFrames.sys.mjs",
|
||||
webrtcUI: "resource:///modules/webrtcUI.sys.mjs",
|
||||
WebsiteFilter: "resource:///modules/policies/WebsiteFilter.sys.mjs",
|
||||
ZoomUI: "resource:///modules/ZoomUI.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.jsm",
|
||||
NewTabPagePreloading: "resource:///modules/NewTabPagePreloading.jsm",
|
||||
BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.jsm",
|
||||
BrowserUIUtils: "resource:///modules/BrowserUIUtils.jsm",
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
CFRPageActions: "resource://activity-stream/lib/CFRPageActions.jsm",
|
||||
ExtensionsUI: "resource:///modules/ExtensionsUI.jsm",
|
||||
HomePage: "resource:///modules/HomePage.jsm",
|
||||
OpenInTabsUtils: "resource:///modules/OpenInTabsUtils.jsm",
|
||||
PageActions: "resource:///modules/PageActions.jsm",
|
||||
ProcessHangMonitor: "resource:///modules/ProcessHangMonitor.jsm",
|
||||
SiteDataManager: "resource:///modules/SiteDataManager.jsm",
|
||||
TabCrashHandler: "resource:///modules/ContentCrashHandlers.jsm",
|
||||
Translation: "resource:///modules/translation/TranslationParent.jsm",
|
||||
webrtcUI: "resource:///modules/webrtcUI.jsm",
|
||||
ZoomUI: "resource:///modules/ZoomUI.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "fxAccounts", () => {
|
||||
|
@ -479,8 +479,8 @@ XPCOMUtils.defineLazyGetter(this, "Win7Features", () => {
|
|||
WINTASKBAR_CONTRACTID in Cc &&
|
||||
Cc[WINTASKBAR_CONTRACTID].getService(Ci.nsIWinTaskbar).available
|
||||
) {
|
||||
let { AeroPeek } = ChromeUtils.import(
|
||||
"resource:///modules/WindowsPreviewPerTab.jsm"
|
||||
let { AeroPeek } = ChromeUtils.importESModule(
|
||||
"resource:///modules/WindowsPreviewPerTab.sys.mjs"
|
||||
);
|
||||
return {
|
||||
onOpenWindow() {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
* 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/. */
|
||||
|
||||
const { SiteDataManager } = ChromeUtils.import(
|
||||
"resource:///modules/SiteDataManager.jsm"
|
||||
const { SiteDataManager } = ChromeUtils.importESModule(
|
||||
"resource:///modules/SiteDataManager.sys.mjs"
|
||||
);
|
||||
const { DownloadUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/DownloadUtils.sys.mjs"
|
||||
|
|
|
@ -80,15 +80,11 @@
|
|||
|
||||
window._gBrowser = {
|
||||
init() {
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"AsyncTabSwitcher",
|
||||
"resource:///modules/AsyncTabSwitcher.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AsyncTabSwitcher: "resource:///modules/AsyncTabSwitcher.sys.mjs",
|
||||
PictureInPicture: "resource://gre/modules/PictureInPicture.sys.mjs",
|
||||
UrlbarProviderOpenTabs:
|
||||
"resource:///modules/UrlbarProviderOpenTabs.sys.mjs",
|
||||
PictureInPicture: "resource://gre/modules/PictureInPicture.sys.mjs",
|
||||
});
|
||||
XPCOMUtils.defineLazyServiceGetters(this, {
|
||||
MacSharingService: [
|
||||
|
@ -104,11 +100,9 @@
|
|||
});
|
||||
|
||||
if (AppConstants.MOZ_CRASHREPORTER) {
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"TabCrashHandler",
|
||||
"resource:///modules/ContentCrashHandlers.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
TabCrashHandler: "resource:///modules/ContentCrashHandlers.sys.mjs",
|
||||
});
|
||||
}
|
||||
|
||||
Services.obs.addObserver(this, "contextual-identity-updated");
|
||||
|
|
|
@ -1,17 +1,9 @@
|
|||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"AboutNewTab",
|
||||
"resource:///modules/AboutNewTab.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
TabCrashHandler: "resource:///modules/ContentCrashHandlers.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"TabCrashHandler",
|
||||
"resource:///modules/ContentCrashHandlers.jsm"
|
||||
);
|
||||
|
||||
/**
|
||||
* Wait for a <notification> to be closed then call the specified callback.
|
||||
|
|
|
@ -1,16 +1,13 @@
|
|||
"use strict";
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
|
||||
PerfTestHelpers: "resource://testing-common/PerfTestHelpers.sys.mjs",
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
UrlbarTestUtils: "resource://testing-common/UrlbarTestUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.jsm",
|
||||
});
|
||||
|
||||
/**
|
||||
* This function can be called if the test needs to trigger frame dirtying
|
||||
* outside of the normal mechanism.
|
||||
|
|
|
@ -94,7 +94,9 @@ function promiseIndicatorWindow() {
|
|||
}
|
||||
|
||||
async function assertWebRTCIndicatorStatus(expected) {
|
||||
let ui = ChromeUtils.import("resource:///modules/webrtcUI.jsm").webrtcUI;
|
||||
let ui = ChromeUtils.importESModule(
|
||||
"resource:///modules/webrtcUI.sys.mjs"
|
||||
).webrtcUI;
|
||||
let expectedState = expected ? "visible" : "hidden";
|
||||
let msg = "WebRTC indicator " + expectedState;
|
||||
if (!expected && ui.showGlobalIndicator) {
|
||||
|
|
|
@ -12,7 +12,9 @@ var { XPCOMUtils } = ChromeUtils.importESModule(
|
|||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
|
||||
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
ContextualIdentityService:
|
||||
"resource://gre/modules/ContextualIdentityService.sys.mjs",
|
||||
ExtensionSettingsStore:
|
||||
|
@ -22,11 +24,6 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
URILoadingHelper: "resource:///modules/URILoadingHelper.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.jsm",
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "ReferrerInfo", () =>
|
||||
Components.Constructor(
|
||||
"@mozilla.org/referrer-info;1",
|
||||
|
|
|
@ -8,21 +8,14 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
|
|||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const { showStreamSharingMenu, webrtcUI } = ChromeUtils.import(
|
||||
"resource:///modules/webrtcUI.jsm"
|
||||
const { showStreamSharingMenu, webrtcUI } = ChromeUtils.importESModule(
|
||||
"resource:///modules/webrtcUI.sys.mjs"
|
||||
);
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"MacOSWebRTCStatusbarIndicator",
|
||||
"resource:///modules/webrtcUI.jsm"
|
||||
);
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"BrowserWindowTracker",
|
||||
"resource:///modules/BrowserWindowTracker.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
MacOSWebRTCStatusbarIndicator: "resource:///modules/webrtcUI.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(
|
||||
this,
|
||||
|
|
|
@ -2,7 +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/. */
|
||||
|
||||
const { webrtcUI } = ChromeUtils.import("resource:///modules/webrtcUI.jsm");
|
||||
const { webrtcUI } = ChromeUtils.importESModule(
|
||||
"resource:///modules/webrtcUI.sys.mjs"
|
||||
);
|
||||
|
||||
function init(event) {
|
||||
for (let id of ["audioVideoButton", "screenSharePopup"]) {
|
||||
|
|
|
@ -8,8 +8,11 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
|||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
FirstStartup: "resource://gre/modules/FirstStartup.sys.mjs",
|
||||
HeadlessShell: "resource:///modules/HeadlessShell.sys.mjs",
|
||||
HomePage: "resource:///modules/HomePage.sys.mjs",
|
||||
LaterRun: "resource:///modules/LaterRun.sys.mjs",
|
||||
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
SessionStartup: "resource:///modules/sessionstore/SessionStartup.sys.mjs",
|
||||
|
@ -17,11 +20,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
UpdatePing: "resource://gre/modules/UpdatePing.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
HomePage: "resource:///modules/HomePage.jsm",
|
||||
LaterRun: "resource:///modules/LaterRun.jsm",
|
||||
});
|
||||
XPCOMUtils.defineLazyServiceGetters(lazy, {
|
||||
UpdateManager: ["@mozilla.org/updates/update-manager;1", "nsIUpdateManager"],
|
||||
WinTaskbar: ["@mozilla.org/windows-taskbar;1", "nsIWinTaskbar"],
|
||||
|
|
|
@ -10,6 +10,7 @@ const lazy = {};
|
|||
// Ignore unused lazy property for PluginManager.
|
||||
// eslint-disable-next-line mozilla/valid-lazy
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
|
||||
ASRouterNewTabHook:
|
||||
"resource://activity-stream/lib/ASRouterNewTabHook.sys.mjs",
|
||||
ActorManagerParent: "resource://gre/modules/ActorManagerParent.sys.mjs",
|
||||
|
@ -20,18 +21,24 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
BookmarkHTMLUtils: "resource://gre/modules/BookmarkHTMLUtils.sys.mjs",
|
||||
BookmarkJSONUtils: "resource://gre/modules/BookmarkJSONUtils.sys.mjs",
|
||||
BrowserSearchTelemetry: "resource:///modules/BrowserSearchTelemetry.sys.mjs",
|
||||
BrowserUIUtils: "resource:///modules/BrowserUIUtils.sys.mjs",
|
||||
BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.sys.mjs",
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
BuiltInThemes: "resource:///modules/BuiltInThemes.sys.mjs",
|
||||
ContextualIdentityService:
|
||||
"resource://gre/modules/ContextualIdentityService.sys.mjs",
|
||||
Corroborate: "resource://gre/modules/Corroborate.sys.mjs",
|
||||
DAPTelemetrySender: "resource://gre/modules/DAPTelemetrySender.sys.mjs",
|
||||
DeferredTask: "resource://gre/modules/DeferredTask.sys.mjs",
|
||||
Discovery: "resource:///modules/Discovery.sys.mjs",
|
||||
DoHController: "resource:///modules/DoHController.sys.mjs",
|
||||
DownloadsViewableInternally:
|
||||
"resource:///modules/DownloadsViewableInternally.sys.mjs",
|
||||
E10SUtils: "resource://gre/modules/E10SUtils.sys.mjs",
|
||||
ExtensionsUI: "resource:///modules/ExtensionsUI.sys.mjs",
|
||||
FeatureGate: "resource://featuregates/FeatureGate.sys.mjs",
|
||||
FxAccounts: "resource://gre/modules/FxAccounts.sys.mjs",
|
||||
HomePage: "resource:///modules/HomePage.sys.mjs",
|
||||
Integration: "resource://gre/modules/Integration.sys.mjs",
|
||||
Interactions: "resource:///modules/Interactions.sys.mjs",
|
||||
Log: "resource://gre/modules/Log.sys.mjs",
|
||||
|
@ -42,6 +49,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||
Normandy: "resource://normandy/Normandy.sys.mjs",
|
||||
OsEnvironment: "resource://gre/modules/OsEnvironment.sys.mjs",
|
||||
PageActions: "resource:///modules/PageActions.sys.mjs",
|
||||
PageDataService: "resource:///modules/pagedata/PageDataService.sys.mjs",
|
||||
PageThumbs: "resource://gre/modules/PageThumbs.sys.mjs",
|
||||
PdfJs: "resource://pdf.js/PdfJs.sys.mjs",
|
||||
|
@ -52,6 +60,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
PluginManager: "resource:///actors/PluginParent.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
ProcessHangMonitor: "resource:///modules/ProcessHangMonitor.sys.mjs",
|
||||
ProvenanceData: "resource:///modules/ProvenanceData.sys.mjs",
|
||||
PublicSuffixList:
|
||||
"resource://gre/modules/netwerk-dns/PublicSuffixList.sys.mjs",
|
||||
|
@ -72,6 +81,8 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
SpecialMessageActions:
|
||||
"resource://messaging-system/lib/SpecialMessageActions.sys.mjs",
|
||||
TRRRacer: "resource:///modules/TRRPerformance.sys.mjs",
|
||||
TabCrashHandler: "resource:///modules/ContentCrashHandlers.sys.mjs",
|
||||
TabUnloader: "resource:///modules/TabUnloader.sys.mjs",
|
||||
TelemetryUtils: "resource://gre/modules/TelemetryUtils.sys.mjs",
|
||||
UIState: "resource://services-sync/UIState.sys.mjs",
|
||||
UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
|
||||
|
@ -82,22 +93,11 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.jsm",
|
||||
ASRouterDefaultConfig:
|
||||
"resource://activity-stream/lib/ASRouterDefaultConfig.jsm",
|
||||
ASRouter: "resource://activity-stream/lib/ASRouter.jsm",
|
||||
BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.jsm",
|
||||
BrowserUIUtils: "resource:///modules/BrowserUIUtils.jsm",
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
Discovery: "resource:///modules/Discovery.jsm",
|
||||
ExtensionsUI: "resource:///modules/ExtensionsUI.jsm",
|
||||
HomePage: "resource:///modules/HomePage.jsm",
|
||||
OnboardingMessageProvider:
|
||||
"resource://activity-stream/lib/OnboardingMessageProvider.jsm",
|
||||
PageActions: "resource:///modules/PageActions.jsm",
|
||||
ProcessHangMonitor: "resource:///modules/ProcessHangMonitor.jsm",
|
||||
TabCrashHandler: "resource:///modules/ContentCrashHandlers.jsm",
|
||||
TabUnloader: "resource:///modules/TabUnloader.jsm",
|
||||
});
|
||||
|
||||
if (AppConstants.MOZ_UPDATER) {
|
||||
|
@ -820,8 +820,8 @@ XPCOMUtils.defineLazyGetter(
|
|||
);
|
||||
|
||||
if (AppConstants.MOZ_CRASHREPORTER) {
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
UnsubmittedCrashHandler: "resource:///modules/ContentCrashHandlers.jsm",
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
UnsubmittedCrashHandler: "resource:///modules/ContentCrashHandlers.sys.mjs",
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -2563,8 +2563,8 @@ BrowserGlue.prototype = {
|
|||
WINTASKBAR_CONTRACTID in Cc &&
|
||||
Cc[WINTASKBAR_CONTRACTID].getService(Ci.nsIWinTaskbar).available
|
||||
) {
|
||||
const { WinTaskbarJumpList } = ChromeUtils.import(
|
||||
"resource:///modules/WindowsJumpLists.jsm"
|
||||
const { WinTaskbarJumpList } = ChromeUtils.importESModule(
|
||||
"resource:///modules/WindowsJumpLists.sys.mjs"
|
||||
);
|
||||
WinTaskbarJumpList.startup();
|
||||
}
|
||||
|
|
|
@ -11,17 +11,14 @@ const lazy = {};
|
|||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AddonManager: "resource://gre/modules/AddonManager.sys.mjs",
|
||||
AddonManagerPrivate: "resource://gre/modules/AddonManager.sys.mjs",
|
||||
BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.sys.mjs",
|
||||
CustomizableWidgets: "resource:///modules/CustomizableWidgets.sys.mjs",
|
||||
HomePage: "resource:///modules/HomePage.sys.mjs",
|
||||
PanelMultiView: "resource:///modules/PanelMultiView.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
ShortcutUtils: "resource://gre/modules/ShortcutUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.jsm",
|
||||
HomePage: "resource:///modules/HomePage.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "gWidgetsBundle", function () {
|
||||
const kUrl =
|
||||
"chrome://browser/locale/customizableui/customizableWidgets.properties";
|
||||
|
|
|
@ -26,15 +26,11 @@ const lazy = {};
|
|||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AddonManager: "resource://gre/modules/AddonManager.sys.mjs",
|
||||
BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.sys.mjs",
|
||||
DragPositionManager: "resource:///modules/DragPositionManager.sys.mjs",
|
||||
SessionStore: "resource:///modules/sessionstore/SessionStore.sys.mjs",
|
||||
URILoadingHelper: "resource:///modules/URILoadingHelper.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"BrowserUsageTelemetry",
|
||||
"resource:///modules/BrowserUsageTelemetry.jsm"
|
||||
);
|
||||
XPCOMUtils.defineLazyGetter(lazy, "gWidgetsBundle", function () {
|
||||
const kUrl =
|
||||
"chrome://browser/locale/customizableui/customizableWidgets.properties";
|
||||
|
|
|
@ -12,11 +12,9 @@ import { CustomizableUI } from "resource:///modules/CustomizableUI.sys.mjs";
|
|||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"BrowserUsageTelemetry",
|
||||
"resource:///modules/BrowserUsageTelemetry.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.sys.mjs",
|
||||
});
|
||||
|
||||
const WIDGET_ID = "search-container";
|
||||
const PREF_NAME = "browser.search.widget.inNavBar";
|
||||
|
|
|
@ -4,11 +4,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"HomePage",
|
||||
"resource:///modules/HomePage.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
HomePage: "resource:///modules/HomePage.sys.mjs",
|
||||
});
|
||||
|
||||
const kPrefProtonToolbarVersion = "browser.proton.toolbar.version";
|
||||
const kPrefHomeButtonUsed = "browser.engagement.home-button.has-used";
|
||||
|
|
|
@ -11,20 +11,15 @@ import {
|
|||
DownloadError,
|
||||
} from "resource://gre/modules/DownloadCore.sys.mjs";
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
DownloadList: "resource://gre/modules/DownloadList.sys.mjs",
|
||||
Downloads: "resource://gre/modules/Downloads.sys.mjs",
|
||||
DownloadsCommon: "resource:///modules/DownloadsCommon.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
});
|
||||
|
||||
/**
|
||||
* Each window tracks download spam independently, so one of these objects is
|
||||
* constructed for each window. This is responsible for tracking the spam and
|
||||
|
|
|
@ -31,6 +31,7 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
|||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
DownloadHistory: "resource://gre/modules/DownloadHistory.sys.mjs",
|
||||
DownloadUtils: "resource://gre/modules/DownloadUtils.sys.mjs",
|
||||
Downloads: "resource://gre/modules/Downloads.sys.mjs",
|
||||
|
@ -39,10 +40,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetters(lazy, {
|
||||
gClipboardHelper: [
|
||||
"@mozilla.org/widget/clipboardhelper;1",
|
||||
|
|
|
@ -15,13 +15,10 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
|||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
Downloads: "resource://gre/modules/Downloads.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "gWinTaskbar", function () {
|
||||
if (!("@mozilla.org/windows-taskbar;1" in Cc)) {
|
||||
return null;
|
||||
|
|
|
@ -12,6 +12,7 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
|||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
DownloadUtils: "resource://gre/modules/DownloadUtils.sys.mjs",
|
||||
Downloads: "resource://gre/modules/Downloads.sys.mjs",
|
||||
DownloadsCommon: "resource:///modules/DownloadsCommon.sys.mjs",
|
||||
|
@ -19,10 +20,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
UrlbarUtils: "resource:///modules/UrlbarUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(
|
||||
lazy,
|
||||
"handlerSvc",
|
||||
|
|
|
@ -8,6 +8,7 @@ var { XPCOMUtils } = ChromeUtils.importESModule(
|
|||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
Downloads: "resource://gre/modules/Downloads.sys.mjs",
|
||||
DownloadsCommon: "resource:///modules/DownloadsCommon.sys.mjs",
|
||||
DownloadsViewUI: "resource:///modules/DownloadsViewUI.sys.mjs",
|
||||
|
@ -16,10 +17,6 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
});
|
||||
|
||||
/**
|
||||
* A download element shell is responsible for handling the commands and the
|
||||
* displayed data for a single download view element.
|
||||
|
|
|
@ -5,14 +5,11 @@
|
|||
"use strict";
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
DownloadSpamProtection: "resource:///modules/DownloadSpamProtection.sys.mjs",
|
||||
PermissionTestUtils: "resource://testing-common/PermissionTestUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
});
|
||||
|
||||
const TEST_URI = "https://example.com";
|
||||
|
||||
const TEST_PATH = getRootDirectory(gTestPath).replace(
|
||||
|
|
|
@ -9,11 +9,9 @@ const { EnterprisePolicyTesting, PoliciesPrefTracker } =
|
|||
"resource://testing-common/EnterprisePolicyTesting.sys.mjs"
|
||||
);
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"HomePage",
|
||||
"resource:///modules/HomePage.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
HomePage: "resource:///modules/HomePage.sys.mjs",
|
||||
});
|
||||
|
||||
PoliciesPrefTracker.start();
|
||||
|
||||
|
|
|
@ -19,13 +19,9 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
|||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"BrowserUIUtils",
|
||||
"resource:///modules/BrowserUIUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AddonManager: "resource://gre/modules/AddonManager.sys.mjs",
|
||||
BrowserUIUtils: "resource:///modules/BrowserUIUtils.sys.mjs",
|
||||
CustomizableUI: "resource:///modules/CustomizableUI.sys.mjs",
|
||||
ExtensionSettingsStore:
|
||||
"resource://gre/modules/ExtensionSettingsStore.sys.mjs",
|
||||
|
|
|
@ -12,14 +12,10 @@
|
|||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AboutReaderParent: "resource:///actors/AboutReaderParent.sys.mjs",
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"BrowserWindowTracker",
|
||||
"resource:///modules/BrowserWindowTracker.jsm"
|
||||
);
|
||||
|
||||
var { ExtensionError } = ExtensionUtils;
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
"use strict";
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.sys.mjs",
|
||||
CustomizableUI: "resource:///modules/CustomizableUI.sys.mjs",
|
||||
ExtensionTelemetry: "resource://gre/modules/ExtensionTelemetry.sys.mjs",
|
||||
OriginControls: "resource://gre/modules/ExtensionPermissions.sys.mjs",
|
||||
|
@ -14,11 +15,6 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
clearTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"BrowserUsageTelemetry",
|
||||
"resource:///modules/BrowserUsageTelemetry.jsm"
|
||||
);
|
||||
|
||||
var { DefaultWeakMap, ExtensionError } = ExtensionUtils;
|
||||
|
||||
|
|
|
@ -17,14 +17,9 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
ExtensionPermissions: "resource://gre/modules/ExtensionPermissions.sys.mjs",
|
||||
ExtensionSettingsStore:
|
||||
"resource://gre/modules/ExtensionSettingsStore.sys.mjs",
|
||||
HomePage: "resource:///modules/HomePage.sys.mjs",
|
||||
});
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"HomePage",
|
||||
"resource:///modules/HomePage.jsm"
|
||||
);
|
||||
|
||||
const DEFAULT_SEARCH_STORE_TYPE = "default_search";
|
||||
const DEFAULT_SEARCH_SETTING_NAME = "defaultSearch";
|
||||
|
||||
|
|
|
@ -7,19 +7,11 @@
|
|||
"use strict";
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.sys.mjs",
|
||||
ExtensionTelemetry: "resource://gre/modules/ExtensionTelemetry.sys.mjs",
|
||||
PageActions: "resource:///modules/PageActions.sys.mjs",
|
||||
PanelPopup: "resource:///modules/ExtensionPopups.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PageActions",
|
||||
"resource:///modules/PageActions.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"BrowserUsageTelemetry",
|
||||
"resource:///modules/BrowserUsageTelemetry.jsm"
|
||||
);
|
||||
|
||||
var { DefaultWeakMap } = ExtensionUtils;
|
||||
|
||||
|
|
|
@ -6,12 +6,8 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"BrowserUIUtils",
|
||||
"resource:///modules/BrowserUIUtils.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
BrowserUIUtils: "resource:///modules/BrowserUIUtils.sys.mjs",
|
||||
DownloadPaths: "resource://gre/modules/DownloadPaths.sys.mjs",
|
||||
ExtensionControlledPopup:
|
||||
"resource:///modules/ExtensionControlledPopup.sys.mjs",
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
"use strict";
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
|
||||
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
|
||||
getSearchProvider: "resource://activity-stream/lib/SearchShortcuts.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.jsm",
|
||||
shortURL: "resource://activity-stream/lib/ShortURL.jsm",
|
||||
});
|
||||
|
||||
|
|
|
@ -9,16 +9,12 @@ var { ExtensionParent } = ChromeUtils.importESModule(
|
|||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
|
||||
ExtensionControlledPopup:
|
||||
"resource:///modules/ExtensionControlledPopup.sys.mjs",
|
||||
ExtensionSettingsStore:
|
||||
"resource://gre/modules/ExtensionSettingsStore.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"AboutNewTab",
|
||||
"resource:///modules/AboutNewTab.jsm"
|
||||
);
|
||||
|
||||
const STORE_TYPE = "url_overrides";
|
||||
const NEW_TAB_SETTING_NAME = "newTabURL";
|
||||
|
|
|
@ -6,12 +6,8 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"HomePage",
|
||||
"resource:///modules/HomePage.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
HomePage: "resource:///modules/HomePage.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
});
|
||||
|
||||
|
|
|
@ -11,10 +11,7 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
"resource:///modules/ExtensionControlledPopup.sys.mjs",
|
||||
ExtensionSettingsStore:
|
||||
"resource://gre/modules/ExtensionSettingsStore.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
HomePage: "resource:///modules/HomePage.jsm",
|
||||
HomePage: "resource:///modules/HomePage.sys.mjs",
|
||||
});
|
||||
|
||||
// Named this way so they correspond to the extensions
|
||||
|
|
|
@ -6,16 +6,12 @@
|
|||
requestLongerTimeout(4);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
|
||||
ExtensionControlledPopup:
|
||||
"resource:///modules/ExtensionControlledPopup.sys.mjs",
|
||||
ExtensionSettingsStore:
|
||||
"resource://gre/modules/ExtensionSettingsStore.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"AboutNewTab",
|
||||
"resource:///modules/AboutNewTab.jsm"
|
||||
);
|
||||
|
||||
function getNotificationSetting(extensionId) {
|
||||
return ExtensionSettingsStore.getSetting("newTabNotification", extensionId);
|
||||
|
|
|
@ -7,15 +7,12 @@ const { AddonTestUtils } = ChromeUtils.importESModule(
|
|||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
HomePage: "resource:///modules/HomePage.sys.mjs",
|
||||
RemoteSettings: "resource://services-settings/remote-settings.sys.mjs",
|
||||
TelemetryTestUtils: "resource://testing-common/TelemetryTestUtils.sys.mjs",
|
||||
sinon: "resource://testing-common/Sinon.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
HomePage: "resource:///modules/HomePage.jsm",
|
||||
});
|
||||
|
||||
function promisePrefChanged(expectedValue) {
|
||||
return TestUtils.waitForPrefChange("browser.startup.homepage", value =>
|
||||
value.endsWith(expectedValue)
|
||||
|
|
|
@ -8,15 +8,12 @@ const { AddonTestUtils } = ChromeUtils.importESModule(
|
|||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AddonManager: "resource://gre/modules/AddonManager.sys.mjs",
|
||||
HomePage: "resource:///modules/HomePage.sys.mjs",
|
||||
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
|
||||
RemoteSettings: "resource://services-settings/remote-settings.sys.mjs",
|
||||
sinon: "resource://testing-common/Sinon.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
HomePage: "resource:///modules/HomePage.jsm",
|
||||
});
|
||||
|
||||
AddonTestUtils.init(this);
|
||||
AddonTestUtils.overrideCertDB();
|
||||
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
const { AddonTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/AddonTestUtils.sys.mjs"
|
||||
);
|
||||
const { HomePage } = ChromeUtils.import("resource:///modules/HomePage.jsm");
|
||||
const { HomePage } = ChromeUtils.importESModule(
|
||||
"resource:///modules/HomePage.sys.mjs"
|
||||
);
|
||||
const { ExtensionPermissions } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/ExtensionPermissions.sys.mjs"
|
||||
);
|
||||
|
|
|
@ -3,11 +3,9 @@
|
|||
"use strict";
|
||||
|
||||
// Load lazy so we create the app info first.
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"PageActions",
|
||||
"resource:///modules/PageActions.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
PageActions: "resource:///modules/PageActions.sys.mjs",
|
||||
});
|
||||
|
||||
const { AddonTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/AddonTestUtils.sys.mjs"
|
||||
|
|
|
@ -10,8 +10,8 @@ const { AddonManager } = ChromeUtils.importESModule(
|
|||
"resource://gre/modules/AddonManager.sys.mjs"
|
||||
);
|
||||
|
||||
const { AboutNewTab } = ChromeUtils.import(
|
||||
"resource:///modules/AboutNewTab.jsm"
|
||||
const { AboutNewTab } = ChromeUtils.importESModule(
|
||||
"resource:///modules/AboutNewTab.sys.mjs"
|
||||
);
|
||||
|
||||
// Lazy load to avoid having Services.appinfo cached first.
|
||||
|
@ -19,7 +19,9 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
ExtensionParent: "resource://gre/modules/ExtensionParent.sys.mjs",
|
||||
});
|
||||
|
||||
const { HomePage } = ChromeUtils.import("resource:///modules/HomePage.jsm");
|
||||
const { HomePage } = ChromeUtils.importESModule(
|
||||
"resource:///modules/HomePage.sys.mjs"
|
||||
);
|
||||
|
||||
AddonTestUtils.init(this);
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
Management: "resource://gre/modules/Extension.sys.mjs",
|
||||
});
|
||||
|
||||
const { AboutNewTab } = ChromeUtils.import(
|
||||
"resource:///modules/AboutNewTab.jsm"
|
||||
const { AboutNewTab } = ChromeUtils.importESModule(
|
||||
"resource:///modules/AboutNewTab.sys.mjs"
|
||||
);
|
||||
|
||||
const { AddonTestUtils } = ChromeUtils.importESModule(
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
/* vim: set sts=2 sw=2 et tw=80: */
|
||||
"use strict";
|
||||
|
||||
const { AboutNewTab } = ChromeUtils.import(
|
||||
"resource:///modules/AboutNewTab.jsm"
|
||||
const { AboutNewTab } = ChromeUtils.importESModule(
|
||||
"resource:///modules/AboutNewTab.sys.mjs"
|
||||
);
|
||||
|
||||
const { AddonTestUtils } = ChromeUtils.importESModule(
|
||||
|
|
|
@ -14,13 +14,10 @@ const lazy = {};
|
|||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
SyncedTabs: "resource://services-sync/SyncedTabs.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
});
|
||||
|
||||
export const FirefoxViewNotificationManager = new (class {
|
||||
#currentlyShowing;
|
||||
constructor() {
|
||||
|
|
|
@ -13,12 +13,10 @@ const lazy = {};
|
|||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AttributionCode: "resource:///modules/AttributionCode.sys.mjs",
|
||||
ClientID: "resource://gre/modules/ClientID.sys.mjs",
|
||||
PingCentre: "resource:///modules/PingCentre.sys.mjs",
|
||||
TelemetrySession: "resource://gre/modules/TelemetrySession.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
PingCentre: "resource:///modules/PingCentre.jsm",
|
||||
});
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
lazy,
|
||||
"structuredIngestionEndpointBase",
|
||||
|
|
|
@ -77,7 +77,7 @@ export class _Search extends React.PureComponent {
|
|||
onInputMount(input) {
|
||||
if (input) {
|
||||
// The "healthReportKey" and needs to be "newtab" or "abouthome" so that
|
||||
// BrowserUsageTelemetry.jsm knows to handle events with this name, and
|
||||
// BrowserUsageTelemetry.sys.mjs knows to handle events with this name, and
|
||||
// can add the appropriate telemetry probes for search. Without the correct
|
||||
// name, certain tests like browser_UsageTelemetry_content.js will fail
|
||||
// (See github ticket #2348 for more details)
|
||||
|
|
|
@ -14628,7 +14628,7 @@ class _Search extends (external_React_default()).PureComponent {
|
|||
onInputMount(input) {
|
||||
if (input) {
|
||||
// The "healthReportKey" and needs to be "newtab" or "abouthome" so that
|
||||
// BrowserUsageTelemetry.jsm knows to handle events with this name, and
|
||||
// BrowserUsageTelemetry.sys.mjs knows to handle events with this name, and
|
||||
// can add the appropriate telemetry probes for search. Without the correct
|
||||
// name, certain tests like browser_UsageTelemetry_content.js will fail
|
||||
// (See github ticket #2348 for more details)
|
||||
|
|
|
@ -23,9 +23,12 @@ const lazy = {};
|
|||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AddonManager: "resource://gre/modules/AddonManager.sys.mjs",
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
|
||||
AttributionCode: "resource:///modules/AttributionCode.sys.mjs",
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
ClientEnvironment: "resource://normandy/lib/ClientEnvironment.sys.mjs",
|
||||
CustomizableUI: "resource:///modules/CustomizableUI.sys.mjs",
|
||||
HomePage: "resource:///modules/HomePage.sys.mjs",
|
||||
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||
ProfileAge: "resource://gre/modules/ProfileAge.sys.mjs",
|
||||
Region: "resource://gre/modules/Region.sys.mjs",
|
||||
|
@ -36,9 +39,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
ASRouterPreferences: "resource://activity-stream/lib/ASRouterPreferences.jsm",
|
||||
HomePage: "resource:///modules/HomePage.jsm",
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.jsm",
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "fxAccounts", () => {
|
||||
|
|
|
@ -12,15 +12,12 @@ const lazy = {};
|
|||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AboutReaderParent: "resource:///actors/AboutReaderParent.sys.mjs",
|
||||
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
|
||||
EveryWindow: "resource:///modules/EveryWindow.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
clearTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
EveryWindow: "resource:///modules/EveryWindow.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
||||
const { Logger } = ChromeUtils.importESModule(
|
||||
"resource://messaging-system/lib/Logger.sys.mjs"
|
||||
|
|
|
@ -13,8 +13,8 @@ const {
|
|||
const { shortURL } = ChromeUtils.import(
|
||||
"resource://activity-stream/lib/ShortURL.jsm"
|
||||
);
|
||||
const { AboutNewTab } = ChromeUtils.import(
|
||||
"resource:///modules/AboutNewTab.jsm"
|
||||
const { AboutNewTab } = ChromeUtils.importESModule(
|
||||
"resource:///modules/AboutNewTab.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
|
|
@ -23,22 +23,15 @@ const { classifySite } = ChromeUtils.import(
|
|||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"AboutNewTab",
|
||||
"resource:///modules/AboutNewTab.jsm"
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PingCentre",
|
||||
"resource:///modules/PingCentre.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
|
||||
ClientID: "resource://gre/modules/ClientID.sys.mjs",
|
||||
ExperimentAPI: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||
ExtensionSettingsStore:
|
||||
"resource://gre/modules/ExtensionSettingsStore.sys.mjs",
|
||||
HomePage: "resource:///modules/HomePage.sys.mjs",
|
||||
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||
PingCentre: "resource:///modules/PingCentre.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.sys.mjs",
|
||||
TelemetrySession: "resource://gre/modules/TelemetrySession.sys.mjs",
|
||||
|
@ -46,11 +39,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
UpdateUtils: "resource://gre/modules/UpdateUtils.sys.mjs",
|
||||
pktApi: "chrome://pocket/content/pktApi.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"HomePage",
|
||||
"resource:///modules/HomePage.jsm"
|
||||
);
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
AboutWelcomeTelemetry:
|
||||
"resource://activity-stream/aboutwelcome/lib/AboutWelcomeTelemetry.jsm",
|
||||
|
|
|
@ -10,6 +10,7 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
|
|||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
EveryWindow: "resource:///modules/EveryWindow.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
clearTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
requestIdleCallback: "resource://gre/modules/Timer.sys.mjs",
|
||||
|
@ -17,7 +18,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
EveryWindow: "resource:///modules/EveryWindow.jsm",
|
||||
ToolbarPanelHub: "resource://activity-stream/lib/ToolbarPanelHub.jsm",
|
||||
});
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
|
|||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
EveryWindow: "resource:///modules/EveryWindow.sys.mjs",
|
||||
PanelMultiView: "resource:///modules/PanelMultiView.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
RemoteL10n: "resource://activity-stream/lib/RemoteL10n.sys.mjs",
|
||||
|
@ -17,9 +18,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
"resource://messaging-system/lib/SpecialMessageActions.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
EveryWindow: "resource:///modules/EveryWindow.jsm",
|
||||
});
|
||||
XPCOMUtils.defineLazyServiceGetter(
|
||||
lazy,
|
||||
"TrackingDBService",
|
||||
|
|
|
@ -12,8 +12,8 @@ const { CFRMessageProvider } = ChromeUtils.importESModule(
|
|||
const { ASRouter } = ChromeUtils.import(
|
||||
"resource://activity-stream/lib/ASRouter.jsm"
|
||||
);
|
||||
const { BrowserWindowTracker } = ChromeUtils.import(
|
||||
"resource:///modules/BrowserWindowTracker.jsm"
|
||||
const { BrowserWindowTracker } = ChromeUtils.importESModule(
|
||||
"resource:///modules/BrowserWindowTracker.sys.mjs"
|
||||
);
|
||||
|
||||
add_task(async function show_and_send_telemetry() {
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.jsm",
|
||||
ASRouterTargeting: "resource://activity-stream/lib/ASRouterTargeting.jsm",
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
HomePage: "resource:///modules/HomePage.jsm",
|
||||
QueryCache: "resource://activity-stream/lib/ASRouterTargeting.jsm",
|
||||
});
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AddonManager: "resource://gre/modules/AddonManager.sys.mjs",
|
||||
AddonTestUtils: "resource://testing-common/AddonTestUtils.sys.mjs",
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
|
||||
AppConstants: "resource://gre/modules/AppConstants.sys.mjs",
|
||||
AttributionCode: "resource:///modules/AttributionCode.sys.mjs",
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
BuiltInThemes: "resource:///modules/BuiltInThemes.sys.mjs",
|
||||
CFRMessageProvider:
|
||||
"resource://activity-stream/lib/CFRMessageProvider.sys.mjs",
|
||||
ExperimentAPI: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||
ExperimentFakes: "resource://testing-common/NimbusTestUtils.sys.mjs",
|
||||
FxAccounts: "resource://gre/modules/FxAccounts.sys.mjs",
|
||||
HomePage: "resource:///modules/HomePage.sys.mjs",
|
||||
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
|
||||
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
|
||||
|
|
|
@ -9,8 +9,8 @@ const { Spotlight } = ChromeUtils.import(
|
|||
const { PanelTestProvider } = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/lib/PanelTestProvider.sys.mjs"
|
||||
);
|
||||
const { BrowserWindowTracker } = ChromeUtils.import(
|
||||
"resource:///modules/BrowserWindowTracker.jsm"
|
||||
const { BrowserWindowTracker } = ChromeUtils.importESModule(
|
||||
"resource:///modules/BrowserWindowTracker.sys.mjs"
|
||||
);
|
||||
const { SpecialMessageActions } = ChromeUtils.importESModule(
|
||||
"resource://messaging-system/lib/SpecialMessageActions.sys.mjs"
|
||||
|
|
|
@ -6,8 +6,8 @@ const { Spotlight } = ChromeUtils.import(
|
|||
const { PanelTestProvider } = ChromeUtils.importESModule(
|
||||
"resource://activity-stream/lib/PanelTestProvider.sys.mjs"
|
||||
);
|
||||
const { BrowserWindowTracker } = ChromeUtils.import(
|
||||
"resource:///modules/BrowserWindowTracker.jsm"
|
||||
const { BrowserWindowTracker } = ChromeUtils.importESModule(
|
||||
"resource:///modules/BrowserWindowTracker.sys.mjs"
|
||||
);
|
||||
|
||||
const { AboutWelcomeTelemetry } = ChromeUtils.import(
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const { AboutNewTab } = ChromeUtils.import(
|
||||
"resource:///modules/AboutNewTab.jsm"
|
||||
const { AboutNewTab } = ChromeUtils.importESModule(
|
||||
"resource:///modules/AboutNewTab.sys.mjs"
|
||||
);
|
||||
|
||||
registerCleanupFunction(() => {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { AboutNewTab } = ChromeUtils.import(
|
||||
"resource:///modules/AboutNewTab.jsm"
|
||||
const { AboutNewTab } = ChromeUtils.importESModule(
|
||||
"resource:///modules/AboutNewTab.sys.mjs"
|
||||
);
|
||||
const { ASRouter } = ChromeUtils.import(
|
||||
"resource://activity-stream/lib/ASRouter.jsm"
|
||||
|
|
|
@ -28,8 +28,8 @@ AddonTestUtils.createAppInfo(
|
|||
"42"
|
||||
);
|
||||
|
||||
const { AboutNewTab } = ChromeUtils.import(
|
||||
"resource:///modules/AboutNewTab.jsm"
|
||||
const { AboutNewTab } = ChromeUtils.importESModule(
|
||||
"resource:///modules/AboutNewTab.sys.mjs"
|
||||
);
|
||||
const { PREFS_CONFIG } = ChromeUtils.import(
|
||||
"resource://activity-stream/lib/ActivityStream.jsm"
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
const { AppConstants } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
const { AboutNewTab } = ChromeUtils.import(
|
||||
"resource:///modules/AboutNewTab.jsm"
|
||||
const { AboutNewTab } = ChromeUtils.importESModule(
|
||||
"resource:///modules/AboutNewTab.sys.mjs"
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(
|
||||
|
|
|
@ -9,15 +9,12 @@ import { EventEmitter } from "resource://gre/modules/EventEmitter.sys.mjs";
|
|||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
E10SUtils: "resource://gre/modules/E10SUtils.sys.mjs",
|
||||
HiddenFrame: "resource://gre/modules/HiddenFrame.sys.mjs",
|
||||
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "logConsole", function () {
|
||||
return console.createInstance({
|
||||
prefix: "PageData",
|
||||
|
|
|
@ -7,6 +7,7 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
|||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
InteractionsBlocklist: "resource:///modules/InteractionsBlocklist.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
|
@ -14,10 +15,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "logConsole", function () {
|
||||
return console.createInstance({
|
||||
prefix: "InteractionsManager",
|
||||
|
|
|
@ -11,8 +11,10 @@ import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
|
|||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
CustomizableUI: "resource:///modules/CustomizableUI.sys.mjs",
|
||||
MigrationUtils: "resource:///modules/MigrationUtils.sys.mjs",
|
||||
OpenInTabsUtils: "resource:///modules/OpenInTabsUtils.sys.mjs",
|
||||
PlacesTransactions: "resource://gre/modules/PlacesTransactions.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
|
@ -20,11 +22,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
Weave: "resource://services-sync/main.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
OpenInTabsUtils: "resource:///modules/OpenInTabsUtils.jsm",
|
||||
});
|
||||
|
||||
const gInContentProcess =
|
||||
Services.appinfo.processType == Ci.nsIXULRuntime.PROCESS_TYPE_CONTENT;
|
||||
const FAVICON_REQUEST_TIMEOUT = 60 * 1000;
|
||||
|
|
|
@ -5,14 +5,10 @@
|
|||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"PingCentre",
|
||||
"resource:///modules/PingCentre.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
pktApi: "chrome://pocket/content/pktApi.sys.mjs",
|
||||
PingCentre: "resource:///modules/PingCentre.sys.mjs",
|
||||
TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.sys.mjs",
|
||||
pktApi: "chrome://pocket/content/pktApi.sys.mjs",
|
||||
});
|
||||
|
||||
// List of namespaces for the structured ingestion system.
|
||||
|
|
|
@ -11,12 +11,9 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
AddonManager: "resource://gre/modules/AddonManager.sys.mjs",
|
||||
AddonRepository: "resource://gre/modules/addons/AddonRepository.sys.mjs",
|
||||
RemoteSettings: "resource://services-settings/remote-settings.sys.mjs",
|
||||
SelectionChangedMenulist:
|
||||
"resource:///modules/SelectionChangedMenulist.sys.mjs",
|
||||
});
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"SelectionChangedMenulist",
|
||||
"resource:///modules/SelectionChangedMenulist.jsm"
|
||||
);
|
||||
|
||||
document
|
||||
.getElementById("BrowserLanguagesDialog")
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
* 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/. */
|
||||
|
||||
const { SiteDataManager } = ChromeUtils.import(
|
||||
"resource:///modules/SiteDataManager.jsm"
|
||||
const { SiteDataManager } = ChromeUtils.importESModule(
|
||||
"resource:///modules/SiteDataManager.sys.mjs"
|
||||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
|
|
|
@ -9,13 +9,9 @@ var { AppConstants } = ChromeUtils.importESModule(
|
|||
"resource://gre/modules/AppConstants.sys.mjs"
|
||||
);
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"SiteDataManager",
|
||||
"resource:///modules/SiteDataManager.jsm"
|
||||
);
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
DownloadUtils: "resource://gre/modules/DownloadUtils.sys.mjs",
|
||||
SiteDataManager: "resource:///modules/SiteDataManager.sys.mjs",
|
||||
});
|
||||
|
||||
let gSiteDataSettings = {
|
||||
|
|
|
@ -91,13 +91,18 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
FeatureGate: "resource://featuregates/FeatureGate.sys.mjs",
|
||||
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
|
||||
FirefoxRelay: "resource://gre/modules/FirefoxRelay.sys.mjs",
|
||||
HomePage: "resource:///modules/HomePage.sys.mjs",
|
||||
LangPackMatcher: "resource://gre/modules/LangPackMatcher.sys.mjs",
|
||||
LoginHelper: "resource://gre/modules/LoginHelper.sys.mjs",
|
||||
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||
OSKeyStore: "resource://gre/modules/OSKeyStore.sys.mjs",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
|
||||
QuickSuggest: "resource:///modules/QuickSuggest.sys.mjs",
|
||||
SelectionChangedMenulist:
|
||||
"resource:///modules/SelectionChangedMenulist.sys.mjs",
|
||||
ShortcutUtils: "resource://gre/modules/ShortcutUtils.sys.mjs",
|
||||
SiteDataManager: "resource:///modules/SiteDataManager.sys.mjs",
|
||||
TransientPrefs: "resource:///modules/TransientPrefs.sys.mjs",
|
||||
UIState: "resource://services-sync/UIState.sys.mjs",
|
||||
UpdateUtils: "resource://gre/modules/UpdateUtils.sys.mjs",
|
||||
UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
|
||||
|
@ -107,7 +112,6 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
HomePage: "resource:///modules/HomePage.jsm",
|
||||
SelectionChangedMenulist: "resource:///modules/SelectionChangedMenulist.jsm",
|
||||
SiteDataManager: "resource:///modules/SiteDataManager.jsm",
|
||||
TransientPrefs: "resource:///modules/TransientPrefs.jsm",
|
||||
|
|
|
@ -8,16 +8,11 @@ const NEW_TAB_KEY = "newTabURL";
|
|||
const PREF_SETTING_TYPE = "prefs";
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
|
||||
ExtensionSettingsStore:
|
||||
"resource://gre/modules/ExtensionSettingsStore.sys.mjs",
|
||||
});
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
this,
|
||||
"AboutNewTab",
|
||||
"resource:///modules/AboutNewTab.jsm"
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyPreferenceGetter(this, "proxyType", PROXY_PREF);
|
||||
|
||||
const { AddonTestUtils } = ChromeUtils.importESModule(
|
||||
|
|
|
@ -228,8 +228,10 @@ XPCOMUtils.defineLazyServiceGetters(lazy, {
|
|||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AsyncShutdown: "resource://gre/modules/AsyncShutdown.sys.mjs",
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
DevToolsShim: "chrome://devtools-startup/content/DevToolsShim.sys.mjs",
|
||||
E10SUtils: "resource://gre/modules/E10SUtils.sys.mjs",
|
||||
HomePage: "resource:///modules/HomePage.sys.mjs",
|
||||
PrivacyFilter: "resource://gre/modules/sessionstore/PrivacyFilter.sys.mjs",
|
||||
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
|
||||
RunState: "resource:///modules/sessionstore/RunState.sys.mjs",
|
||||
|
@ -239,18 +241,13 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
SessionSaver: "resource:///modules/sessionstore/SessionSaver.sys.mjs",
|
||||
SessionStartup: "resource:///modules/sessionstore/SessionStartup.sys.mjs",
|
||||
TabAttributes: "resource:///modules/sessionstore/TabAttributes.sys.mjs",
|
||||
TabCrashHandler: "resource:///modules/ContentCrashHandlers.sys.mjs",
|
||||
TabState: "resource:///modules/sessionstore/TabState.sys.mjs",
|
||||
TabStateCache: "resource:///modules/sessionstore/TabStateCache.sys.mjs",
|
||||
TabStateFlusher: "resource:///modules/sessionstore/TabStateFlusher.sys.mjs",
|
||||
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
HomePage: "resource:///modules/HomePage.jsm",
|
||||
TabCrashHandler: "resource:///modules/ContentCrashHandlers.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "blankURI", () => {
|
||||
return Services.io.newURI("about:blank");
|
||||
});
|
||||
|
|
|
@ -2,16 +2,14 @@
|
|||
* 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/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
let log = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Log.sys.mjs"
|
||||
).Log.repository.getLogger("Sync.RemoteTabs");
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
OpenInTabsUtils: "resource:///modules/OpenInTabsUtils.jsm",
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
OpenInTabsUtils: "resource:///modules/OpenInTabsUtils.sys.mjs",
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
"use strict";
|
||||
|
||||
const { TabUnloader } = ChromeUtils.import(
|
||||
"resource:///modules/TabUnloader.jsm"
|
||||
const { TabUnloader } = ChromeUtils.importESModule(
|
||||
"resource:///modules/TabUnloader.sys.mjs"
|
||||
);
|
||||
|
||||
async function refreshData() {
|
||||
|
|
|
@ -7,13 +7,10 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
|||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
UrlbarTokenizer: "resource:///modules/UrlbarTokenizer.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(
|
||||
lazy,
|
||||
"touchBarUpdater",
|
||||
|
|
|
@ -76,8 +76,8 @@ var Translation = {
|
|||
|
||||
openProviderAttribution() {
|
||||
let attribution = this.supportedEngines[this.translationEngine];
|
||||
const { BrowserWindowTracker } = ChromeUtils.import(
|
||||
"resource:///modules/BrowserWindowTracker.jsm"
|
||||
const { BrowserWindowTracker } = ChromeUtils.importESModule(
|
||||
"resource:///modules/BrowserWindowTracker.sys.mjs"
|
||||
);
|
||||
BrowserWindowTracker.getTopWindow().openWebLinkIn(attribution, "tab");
|
||||
},
|
||||
|
|
|
@ -11,6 +11,7 @@ const lazy = {};
|
|||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AboutReaderParent: "resource:///actors/AboutReaderParent.sys.mjs",
|
||||
AddonManager: "resource://gre/modules/AddonManager.sys.mjs",
|
||||
BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.sys.mjs",
|
||||
BuiltInThemes: "resource:///modules/BuiltInThemes.sys.mjs",
|
||||
CustomizableUI: "resource:///modules/CustomizableUI.sys.mjs",
|
||||
FxAccounts: "resource://gre/modules/FxAccounts.sys.mjs",
|
||||
|
@ -22,10 +23,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
UpdateUtils: "resource://gre/modules/UpdateUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "fxAccounts", () => {
|
||||
return ChromeUtils.importESModule(
|
||||
"resource://gre/modules/FxAccounts.sys.mjs"
|
||||
|
|
|
@ -7,6 +7,7 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
|||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
ClientEnvironment: "resource://normandy/lib/ClientEnvironment.sys.mjs",
|
||||
DevToolsShim: "chrome://devtools-startup/content/DevToolsShim.sys.mjs",
|
||||
ResetProfile: "resource://gre/modules/ResetProfile.sys.mjs",
|
||||
|
@ -17,10 +18,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
|
||||
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
});
|
||||
|
||||
if (AppConstants.MOZ_UPDATER) {
|
||||
XPCOMUtils.defineLazyServiceGetter(
|
||||
lazy,
|
||||
|
|
|
@ -2,20 +2,15 @@
|
|||
* 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/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||
UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
|
||||
UrlbarUtils: "resource:///modules/UrlbarUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
});
|
||||
|
||||
// Quick suggest features. On init, QuickSuggest creates an instance of each and
|
||||
// keeps it in the `#features` map. See `BaseFeature`.
|
||||
const FEATURES = {
|
||||
|
|
|
@ -10,6 +10,7 @@ const lazy = {};
|
|||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserSearchTelemetry: "resource:///modules/BrowserSearchTelemetry.sys.mjs",
|
||||
BrowserUIUtils: "resource:///modules/BrowserUIUtils.sys.mjs",
|
||||
CONTEXTUAL_SERVICES_PING_TYPES:
|
||||
"resource:///modules/PartnerLinkAttribution.sys.mjs",
|
||||
ExtensionSearchHandler:
|
||||
|
@ -32,7 +33,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserUIUtils: "resource:///modules/BrowserUIUtils.jsm",
|
||||
ObjectUtils: "resource://gre/modules/ObjectUtils.jsm",
|
||||
});
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
* 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/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
import {
|
||||
UrlbarProvider,
|
||||
UrlbarUtils,
|
||||
|
@ -12,6 +10,7 @@ import {
|
|||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
OpenSearchEngine: "resource://gre/modules/OpenSearchEngine.sys.mjs",
|
||||
UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
|
||||
UrlbarResult: "resource:///modules/UrlbarResult.sys.mjs",
|
||||
|
@ -19,10 +18,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
UrlbarView: "resource:///modules/UrlbarView.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
});
|
||||
|
||||
const DYNAMIC_RESULT_TYPE = "contextualSearch";
|
||||
|
||||
const ENABLED_PREF = "contextualSearch.enabled";
|
||||
|
|
|
@ -13,6 +13,7 @@ const lazy = {};
|
|||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AppUpdater: "resource://gre/modules/AppUpdater.sys.mjs",
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
NLP: "resource://gre/modules/NLP.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
ResetProfile: "resource://gre/modules/ResetProfile.sys.mjs",
|
||||
|
@ -22,10 +23,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
UrlbarTokenizer: "resource:///modules/UrlbarTokenizer.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "appUpdater", () => new lazy.AppUpdater());
|
||||
|
||||
// The possible tips to show. These names (except NONE) are used in the names
|
||||
|
|
|
@ -16,6 +16,7 @@ import {
|
|||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
|
||||
CONTEXTUAL_SERVICES_PING_TYPES:
|
||||
"resource:///modules/PartnerLinkAttribution.sys.mjs",
|
||||
PartnerLinkAttribution: "resource:///modules/PartnerLinkAttribution.sys.mjs",
|
||||
|
@ -29,10 +30,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
UrlbarSearchUtils: "resource:///modules/UrlbarSearchUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.jsm",
|
||||
});
|
||||
|
||||
// The scalar category of TopSites impression for Contextual Services
|
||||
const SCALAR_CATEGORY_TOPSITES = "contextual.services.topsites.impression";
|
||||
|
||||
|
|
|
@ -10,21 +10,16 @@
|
|||
* the result types.
|
||||
*/
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserUIUtils: "resource:///modules/BrowserUIUtils.sys.mjs",
|
||||
JsonSchemaValidator:
|
||||
"resource://gre/modules/components-utils/JsonSchemaValidator.sys.mjs",
|
||||
UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
|
||||
UrlbarUtils: "resource:///modules/UrlbarUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserUIUtils: "resource:///modules/BrowserUIUtils.jsm",
|
||||
});
|
||||
|
||||
/**
|
||||
* Class used to create a single result.
|
||||
*/
|
||||
|
|
|
@ -5,17 +5,12 @@
|
|||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserUIUtils: "resource:///modules/BrowserUIUtils.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
|
||||
UrlbarUtils: "resource:///modules/UrlbarUtils.sys.mjs",
|
||||
});
|
||||
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
"BrowserUIUtils",
|
||||
"resource:///modules/BrowserUIUtils.jsm"
|
||||
);
|
||||
|
||||
/**
|
||||
* Applies URL highlighting and other styling to the text in the urlbar input,
|
||||
* depending on the text.
|
||||
|
|
|
@ -8,13 +8,14 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
|||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
L10nCache: "resource:///modules/UrlbarUtils.sys.mjs",
|
||||
UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
|
||||
UrlbarProviderQuickSuggest:
|
||||
"resource:///modules/UrlbarProviderQuickSuggest.sys.mjs",
|
||||
UrlbarProviderTopSites: "resource:///modules/UrlbarProviderTopSites.sys.mjs",
|
||||
UrlbarProvidersManager: "resource:///modules/UrlbarProvidersManager.sys.mjs",
|
||||
UrlbarProviderWeather: "resource:///modules/UrlbarProviderWeather.sys.mjs",
|
||||
UrlbarProvidersManager: "resource:///modules/UrlbarProvidersManager.sys.mjs",
|
||||
UrlbarResult: "resource:///modules/UrlbarResult.sys.mjs",
|
||||
UrlbarSearchOneOffs: "resource:///modules/UrlbarSearchOneOffs.sys.mjs",
|
||||
UrlbarTokenizer: "resource:///modules/UrlbarTokenizer.sys.mjs",
|
||||
|
@ -22,7 +23,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
ObjectUtils: "resource://gre/modules/ObjectUtils.jsm",
|
||||
});
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
|
||||
|
||||
import {
|
||||
|
@ -15,6 +13,8 @@ const lazy = {};
|
|||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AddonTestUtils: "resource://testing-common/AddonTestUtils.sys.mjs",
|
||||
BrowserTestUtils: "resource://testing-common/BrowserTestUtils.sys.mjs",
|
||||
BrowserUIUtils: "resource:///modules/BrowserUIUtils.sys.mjs",
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
ExperimentAPI: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||
ExperimentFakes: "resource://testing-common/NimbusTestUtils.sys.mjs",
|
||||
ExperimentManager: "resource://nimbus/lib/ExperimentManager.sys.mjs",
|
||||
|
@ -31,11 +31,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserUIUtils: "resource:///modules/BrowserUIUtils.jsm",
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
});
|
||||
|
||||
export var UrlbarTestUtils = {
|
||||
/**
|
||||
* This maps the categories used by the FX_URLBAR_SELECTED_RESULT_METHOD and
|
||||
|
|
|
@ -11,14 +11,12 @@ requestLongerTimeout(3);
|
|||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AppConstants: "resource://gre/modules/AppConstants.sys.mjs",
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
UpdateService: "resource://gre/modules/UpdateService.sys.mjs",
|
||||
|
||||
UrlbarProviderQuickActions:
|
||||
"resource:///modules/UrlbarProviderQuickActions.sys.mjs",
|
||||
});
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
});
|
||||
|
||||
const DUMMY_PAGE =
|
||||
"http://example.com/browser/browser/base/content/test/general/dummy_page.html";
|
||||
|
|
|
@ -4,13 +4,10 @@
|
|||
"use strict";
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
|
||||
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.jsm",
|
||||
});
|
||||
|
||||
const EN_US_TOPSITES =
|
||||
"https://www.youtube.com/,https://www.facebook.com/,https://www.amazon.com/,https://www.reddit.com/,https://www.wikipedia.org/,https://twitter.com/";
|
||||
|
||||
|
|
|
@ -4,13 +4,10 @@
|
|||
"use strict";
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
|
||||
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.jsm",
|
||||
});
|
||||
|
||||
const EN_US_TOPSITES =
|
||||
"https://www.youtube.com/,https://www.facebook.com/,https://www.amazon.com/,https://www.reddit.com/,https://www.wikipedia.org/,https://twitter.com/";
|
||||
|
||||
|
|
|
@ -9,13 +9,10 @@
|
|||
"use strict";
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
|
||||
UrlbarTestUtils: "resource://testing-common/UrlbarTestUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.jsm",
|
||||
});
|
||||
|
||||
const EN_US_TOPSITES =
|
||||
"https://www.youtube.com/,https://www.facebook.com/,https://www.amazon.com/,https://www.reddit.com/,https://www.wikipedia.org/,https://twitter.com/";
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
"use strict";
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
|
||||
ExperimentAPI: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||
ExperimentFakes: "resource://testing-common/NimbusTestUtils.sys.mjs",
|
||||
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
|
||||
|
@ -25,7 +26,6 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.jsm",
|
||||
ObjectUtils: "resource://gre/modules/ObjectUtils.jsm",
|
||||
});
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
|
|||
);
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
Preferences: "resource://gre/modules/Preferences.sys.mjs",
|
||||
UrlbarProviderExtension:
|
||||
"resource:///modules/UrlbarProviderExtension.sys.mjs",
|
||||
|
@ -18,10 +19,6 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
UrlbarView: "resource:///modules/UrlbarView.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(
|
||||
this,
|
||||
"defaultPreferences",
|
||||
|
|
|
@ -12,6 +12,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
ClientID: "resource://gre/modules/ClientID.sys.mjs",
|
||||
CustomizableUI: "resource:///modules/CustomizableUI.sys.mjs",
|
||||
DeferredTask: "resource://gre/modules/DeferredTask.sys.mjs",
|
||||
PageActions: "resource:///modules/PageActions.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
ProvenanceData: "resource:///modules/ProvenanceData.sys.mjs",
|
||||
SearchSERPTelemetry: "resource:///modules/SearchSERPTelemetry.sys.mjs",
|
||||
|
@ -24,10 +25,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
PageActions: "resource:///modules/PageActions.jsm",
|
||||
});
|
||||
|
||||
// This pref is in seconds!
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
lazy,
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
* 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/. */
|
||||
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
import { AppConstants } from "resource://gre/modules/AppConstants.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
CrashSubmit: "resource://gre/modules/CrashSubmit.sys.mjs",
|
||||
E10SUtils: "resource://gre/modules/E10SUtils.sys.mjs",
|
||||
SessionStore: "resource:///modules/sessionstore/SessionStore.sys.mjs",
|
||||
|
@ -15,10 +15,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
});
|
||||
|
||||
// We don't process crash reports older than 28 days, so don't bother
|
||||
// submitting them
|
||||
const PENDING_CRASH_REPORT_DAYS = 28;
|
||||
|
|
|
@ -12,15 +12,12 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
|||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.sys.mjs",
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs",
|
||||
E10SUtils: "resource://gre/modules/E10SUtils.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
AboutNewTab: "resource:///modules/AboutNewTab.jsm",
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
});
|
||||
|
||||
export let NewTabPagePreloading = {
|
||||
// Maximum number of instances of a given page we'll preload at any time.
|
||||
// Because we preload about:newtab for normal windows, and about:privatebrowsing
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче