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:
Makoto Kato 2022-12-23 05:30:13 +00:00
Родитель 319fd87ad3
Коммит 7c2cf9742c
11 изменённых файлов: 20 добавлений и 50 удалений

Просмотреть файл

@ -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":