зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1821158 - Convert browser/actors/RFPHelper* JSMs to ESMs updated r=kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D172899
This commit is contained in:
Родитель
f62821e990
Коммит
62dfc2f2a3
|
@ -3,11 +3,7 @@
|
|||
* 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/. */
|
||||
|
||||
var EXPORTED_SYMBOLS = ["RFPHelperChild"];
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const kPrefLetterboxing = "privacy.resistFingerprinting.letterboxing";
|
||||
|
||||
|
@ -20,7 +16,7 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
|||
false
|
||||
);
|
||||
|
||||
class RFPHelperChild extends JSWindowActorChild {
|
||||
export class RFPHelperChild extends JSWindowActorChild {
|
||||
handleEvent(event) {
|
||||
if (lazy.isLetterboxingEnabled && event.type == "resize") {
|
||||
this.sendAsyncMessage("Letterboxing:ContentSizeUpdated");
|
|
@ -3,11 +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/. */
|
||||
|
||||
var EXPORTED_SYMBOLS = ["RFPHelperParent"];
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
const lazy = {};
|
||||
ChromeUtils.defineModuleGetter(
|
||||
lazy,
|
||||
|
@ -24,7 +21,7 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
|||
false
|
||||
);
|
||||
|
||||
class RFPHelperParent extends JSWindowActorParent {
|
||||
export class RFPHelperParent extends JSWindowActorParent {
|
||||
receiveMessage(aMessage) {
|
||||
if (
|
||||
lazy.isLetterboxingEnabled &&
|
|
@ -77,8 +77,8 @@ FINAL_TARGET_FILES.actors += [
|
|||
"PromptParent.sys.mjs",
|
||||
"RefreshBlockerChild.jsm",
|
||||
"RefreshBlockerParent.jsm",
|
||||
"RFPHelperChild.jsm",
|
||||
"RFPHelperParent.jsm",
|
||||
"RFPHelperChild.sys.mjs",
|
||||
"RFPHelperParent.sys.mjs",
|
||||
"ScreenshotsComponentChild.sys.mjs",
|
||||
"SearchSERPTelemetryChild.sys.mjs",
|
||||
"SearchSERPTelemetryParent.sys.mjs",
|
||||
|
|
|
@ -312,10 +312,10 @@ class _RFPHelper {
|
|||
_registerActor() {
|
||||
ChromeUtils.registerWindowActor("RFPHelper", {
|
||||
parent: {
|
||||
moduleURI: "resource:///actors/RFPHelperParent.jsm",
|
||||
esModuleURI: "resource:///actors/RFPHelperParent.sys.mjs",
|
||||
},
|
||||
child: {
|
||||
moduleURI: "resource:///actors/RFPHelperChild.jsm",
|
||||
esModuleURI: "resource:///actors/RFPHelperChild.sys.mjs",
|
||||
events: {
|
||||
resize: {},
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче