зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1805131 - Convert GeckoViewPrompter.jsm to ESM. r=geckoview-reviewers,credential-management-reviewers,sgalich,owlish
Differential Revision: https://phabricator.services.mozilla.com/D164432
This commit is contained in:
Родитель
319fd87ad3
Коммит
7c2cf9742c
|
@ -9,14 +9,10 @@ const { GeckoViewUtils } = ChromeUtils.importESModule(
|
|||
"resource://gre/modules/GeckoViewUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
GeckoViewPrompter: "resource://gre/modules/GeckoViewPrompter.jsm",
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
GeckoViewPrompter: "resource://gre/modules/GeckoViewPrompter.sys.mjs",
|
||||
});
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("ColorPickerDelegate");
|
||||
|
|
|
@ -9,18 +9,11 @@ const { GeckoViewUtils } = ChromeUtils.importESModule(
|
|||
"resource://gre/modules/GeckoViewUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
GeckoViewPrompter: "resource://gre/modules/GeckoViewPrompter.jsm",
|
||||
GeckoViewPrompter: "resource://gre/modules/GeckoViewPrompter.sys.mjs",
|
||||
});
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("FilePickerDelegate");
|
||||
|
|
|
@ -9,18 +9,11 @@ const { GeckoViewUtils } = ChromeUtils.importESModule(
|
|||
"resource://gre/modules/GeckoViewUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
GeckoViewPrompter: "resource://gre/modules/GeckoViewPrompter.jsm",
|
||||
});
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
DeferredTask: "resource://gre/modules/DeferredTask.sys.mjs",
|
||||
GeckoViewPrompter: "resource://gre/modules/GeckoViewPrompter.sys.mjs",
|
||||
});
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("GeckoViewPrompt");
|
||||
|
|
|
@ -1,17 +1,12 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* 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/. */
|
||||
"use strict";
|
||||
|
||||
var EXPORTED_SYMBOLS = ["GeckoViewPrompter"];
|
||||
|
||||
const { GeckoViewUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/GeckoViewUtils.sys.mjs"
|
||||
);
|
||||
import { GeckoViewUtils } from "resource://gre/modules/GeckoViewUtils.sys.mjs";
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("GeckoViewPrompter");
|
||||
|
||||
class GeckoViewPrompter {
|
||||
export class GeckoViewPrompter {
|
||||
constructor(aParent) {
|
||||
this.id = Services.uuid
|
||||
.generateUUID()
|
|
@ -15,9 +15,12 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
|
|||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
GeckoViewPrompter: "resource://gre/modules/GeckoViewPrompter.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
GeckoViewAutocomplete: "resource://gre/modules/GeckoViewAutocomplete.jsm",
|
||||
GeckoViewPrompter: "resource://gre/modules/GeckoViewPrompter.jsm",
|
||||
LoginEntry: "resource://gre/modules/GeckoViewAutocomplete.jsm",
|
||||
});
|
||||
|
||||
|
|
|
@ -9,14 +9,10 @@ const { GeckoViewUtils } = ChromeUtils.importESModule(
|
|||
"resource://gre/modules/GeckoViewUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
GeckoViewPrompter: "resource://gre/modules/GeckoViewPrompter.jsm",
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
GeckoViewPrompter: "resource://gre/modules/GeckoViewPrompter.sys.mjs",
|
||||
});
|
||||
|
||||
const { debug, warn } = GeckoViewUtils.initLogging("PromptCollection");
|
||||
|
|
|
@ -9,14 +9,10 @@ const { GeckoViewUtils } = ChromeUtils.importESModule(
|
|||
"resource://gre/modules/GeckoViewUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
|
||||
const lazy = {};
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
GeckoViewPrompter: "resource://gre/modules/GeckoViewPrompter.jsm",
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
GeckoViewPrompter: "resource://gre/modules/GeckoViewPrompter.sys.mjs",
|
||||
});
|
||||
|
||||
const domBundle = Services.strings.createBundle(
|
||||
|
|
|
@ -38,7 +38,7 @@ EXTRA_JS_MODULES += [
|
|||
"FilePickerDelegate.jsm",
|
||||
"GeckoViewPermission.jsm",
|
||||
"GeckoViewPrompt.jsm",
|
||||
"GeckoViewPrompter.jsm",
|
||||
"GeckoViewPrompter.sys.mjs",
|
||||
"GeckoViewPush.jsm",
|
||||
"GeckoViewStartup.jsm",
|
||||
"LoginStorageDelegate.jsm",
|
||||
|
|
|
@ -24,10 +24,7 @@ const lazy = {};
|
|||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
EventDispatcher: "resource://gre/modules/Messaging.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
GeckoViewPrompter: "resource://gre/modules/GeckoViewPrompter.jsm",
|
||||
GeckoViewPrompter: "resource://gre/modules/GeckoViewPrompter.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(lazy, "LoginInfo", () =>
|
||||
|
|
|
@ -17,10 +17,13 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
|
|||
|
||||
const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
GeckoViewPrompter: "resource://gre/modules/GeckoViewPrompter.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
CreditCard: "resource://gre/modules/GeckoViewAutocomplete.jsm",
|
||||
GeckoViewAutocomplete: "resource://gre/modules/GeckoViewAutocomplete.jsm",
|
||||
GeckoViewPrompter: "resource://gre/modules/GeckoViewPrompter.jsm",
|
||||
});
|
||||
|
||||
// Sync with Autocomplete.SaveOption.Hint in Autocomplete.java
|
||||
|
|
|
@ -1190,8 +1190,6 @@
|
|||
"mobile/android/modules/geckoview/GeckoViewProgress.jsm",
|
||||
"resource://gre/modules/GeckoViewPrompt.jsm":
|
||||
"mobile/android/components/geckoview/GeckoViewPrompt.jsm",
|
||||
"resource://gre/modules/GeckoViewPrompter.jsm":
|
||||
"mobile/android/components/geckoview/GeckoViewPrompter.jsm",
|
||||
"resource://gre/modules/GeckoViewPush.jsm":
|
||||
"mobile/android/components/geckoview/GeckoViewPush.jsm",
|
||||
"resource://gre/modules/GeckoViewPushController.jsm":
|
||||
|
|
Загрузка…
Ссылка в новой задаче