forked from mirrors/gecko-dev
Bug 1790473 - [cdp] Convert /remote/cdp JSM modules to ESM r=webdriver-reviewers,whimboo
Depends on D158297 Differential Revision: https://phabricator.services.mozilla.com/D158298
This commit is contained in:
parent
3635b10bad
commit
5db63c4432
59 changed files with 234 additions and 616 deletions
|
|
@ -164,7 +164,7 @@ modules/libpref/test/unit/*data/
|
||||||
python/
|
python/
|
||||||
|
|
||||||
# These are (mainly) imported code that we don't want to lint to make imports easier.
|
# These are (mainly) imported code that we don't want to lint to make imports easier.
|
||||||
remote/cdp/Protocol.jsm
|
remote/cdp/Protocol.sys.mjs
|
||||||
remote/cdp/test/browser/chrome-remote-interface.js
|
remote/cdp/test/browser/chrome-remote-interface.js
|
||||||
remote/marionette/atom.sys.mjs
|
remote/marionette/atom.sys.mjs
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,25 +2,16 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["CDP"];
|
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
|
JSONHandler: "chrome://remote/content/cdp/JSONHandler.sys.mjs",
|
||||||
Log: "chrome://remote/content/shared/Log.sys.mjs",
|
Log: "chrome://remote/content/shared/Log.sys.mjs",
|
||||||
RecommendedPreferences:
|
RecommendedPreferences:
|
||||||
"chrome://remote/content/shared/RecommendedPreferences.sys.mjs",
|
"chrome://remote/content/shared/RecommendedPreferences.sys.mjs",
|
||||||
});
|
TargetList: "chrome://remote/content/cdp/targets/TargetList.sys.mjs",
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|
||||||
JSONHandler: "chrome://remote/content/cdp/JSONHandler.jsm",
|
|
||||||
TargetList: "chrome://remote/content/cdp/targets/TargetList.jsm",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyGetter(lazy, "logger", () =>
|
XPCOMUtils.defineLazyGetter(lazy, "logger", () =>
|
||||||
|
|
@ -49,7 +40,7 @@ const RECOMMENDED_PREFS = new Map([
|
||||||
*
|
*
|
||||||
* @see https://chromedevtools.github.io/devtools-protocol
|
* @see https://chromedevtools.github.io/devtools-protocol
|
||||||
*/
|
*/
|
||||||
class CDP {
|
export class CDP {
|
||||||
/**
|
/**
|
||||||
* Creates a new instance of the CDP class.
|
* Creates a new instance of the CDP class.
|
||||||
*
|
*
|
||||||
|
|
@ -2,33 +2,22 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["CDPConnection", "splitMethod"];
|
import { WebSocketConnection } from "chrome://remote/content/shared/WebSocketConnection.sys.mjs";
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const { WebSocketConnection } = ChromeUtils.importESModule(
|
|
||||||
"chrome://remote/content/shared/WebSocketConnection.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
Log: "chrome://remote/content/shared/Log.sys.mjs",
|
Log: "chrome://remote/content/shared/Log.sys.mjs",
|
||||||
});
|
UnknownMethodError: "chrome://remote/content/cdp/Error.sys.mjs",
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|
||||||
UnknownMethodError: "chrome://remote/content/cdp/Error.jsm",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyGetter(lazy, "logger", () =>
|
XPCOMUtils.defineLazyGetter(lazy, "logger", () =>
|
||||||
lazy.Log.get(lazy.Log.TYPES.CDP)
|
lazy.Log.get(lazy.Log.TYPES.CDP)
|
||||||
);
|
);
|
||||||
|
|
||||||
class CDPConnection extends WebSocketConnection {
|
export class CDPConnection extends WebSocketConnection {
|
||||||
/**
|
/**
|
||||||
* @param {WebSocket} webSocket
|
* @param {WebSocket} webSocket
|
||||||
* The WebSocket server connection to wrap.
|
* The WebSocket server connection to wrap.
|
||||||
|
|
@ -270,7 +259,7 @@ class CDPConnection extends WebSocketConnection {
|
||||||
* Object with the domain ("Browser") and command ("getVersion")
|
* Object with the domain ("Browser") and command ("getVersion")
|
||||||
* as properties.
|
* as properties.
|
||||||
*/
|
*/
|
||||||
function splitMethod(method) {
|
export function splitMethod(method) {
|
||||||
const parts = method.split(".");
|
const parts = method.split(".");
|
||||||
|
|
||||||
if (parts.length != 2 || !parts[0].length || !parts[1].length) {
|
if (parts.length != 2 || !parts[0].length || !parts[1].length) {
|
||||||
|
|
@ -2,18 +2,7 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = [
|
|
||||||
"FatalError",
|
|
||||||
"RemoteAgentError",
|
|
||||||
"UnknownMethodError",
|
|
||||||
"UnsupportedError",
|
|
||||||
];
|
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
|
|
@ -25,7 +14,7 @@ XPCOMUtils.defineLazyGetter(lazy, "logger", () =>
|
||||||
lazy.Log.get(lazy.Log.TYPES.CDP)
|
lazy.Log.get(lazy.Log.TYPES.CDP)
|
||||||
);
|
);
|
||||||
|
|
||||||
class RemoteAgentError extends Error {
|
export class RemoteAgentError extends Error {
|
||||||
constructor(message = "", cause = undefined) {
|
constructor(message = "", cause = undefined) {
|
||||||
cause = cause || message;
|
cause = cause || message;
|
||||||
super(cause);
|
super(cause);
|
||||||
|
|
@ -89,7 +78,7 @@ class RemoteAgentError extends Error {
|
||||||
*
|
*
|
||||||
* Constructing this error will force the application to quit.
|
* Constructing this error will force the application to quit.
|
||||||
*/
|
*/
|
||||||
class FatalError extends RemoteAgentError {
|
export class FatalError extends RemoteAgentError {
|
||||||
constructor(...args) {
|
constructor(...args) {
|
||||||
super(...args);
|
super(...args);
|
||||||
this.quit();
|
this.quit();
|
||||||
|
|
@ -105,10 +94,10 @@ class FatalError extends RemoteAgentError {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** When an operation is not yet implemented. */
|
/** When an operation is not yet implemented. */
|
||||||
class UnsupportedError extends RemoteAgentError {}
|
export class UnsupportedError extends RemoteAgentError {}
|
||||||
|
|
||||||
/** The requested remote method does not exist. */
|
/** The requested remote method does not exist. */
|
||||||
class UnknownMethodError extends RemoteAgentError {
|
export class UnknownMethodError extends RemoteAgentError {
|
||||||
constructor(domain, command = null) {
|
constructor(domain, command = null) {
|
||||||
if (command) {
|
if (command) {
|
||||||
super(`${domain}.${command}`);
|
super(`${domain}.${command}`);
|
||||||
|
|
@ -2,28 +2,22 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["JSONHandler"];
|
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
Log: "chrome://remote/content/shared/Log.sys.mjs",
|
Log: "chrome://remote/content/shared/Log.sys.mjs",
|
||||||
|
Protocol: "chrome://remote/content/cdp/Protocol.sys.mjs",
|
||||||
|
RemoteAgentError: "chrome://remote/content/cdp/Error.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
HTTP_404: "chrome://remote/content/server/HTTPD.jsm",
|
HTTP_404: "chrome://remote/content/server/HTTPD.jsm",
|
||||||
HTTP_505: "chrome://remote/content/server/HTTPD.jsm",
|
HTTP_505: "chrome://remote/content/server/HTTPD.jsm",
|
||||||
Protocol: "chrome://remote/content/cdp/Protocol.jsm",
|
|
||||||
RemoteAgentError: "chrome://remote/content/cdp/Error.jsm",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
class JSONHandler {
|
export class JSONHandler {
|
||||||
constructor(cdp) {
|
constructor(cdp) {
|
||||||
this.cdp = cdp;
|
this.cdp = cdp;
|
||||||
this.routes = {
|
this.routes = {
|
||||||
|
|
@ -2,10 +2,6 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["Protocol"];
|
|
||||||
|
|
||||||
// The `Description` below is imported from Chromium Code.
|
// The `Description` below is imported from Chromium Code.
|
||||||
|
|
||||||
// TODO(ato): We send back a description of the protocol
|
// TODO(ato): We send back a description of the protocol
|
||||||
|
|
@ -17359,4 +17355,4 @@ const Description = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const Protocol = {Description};
|
export const Protocol = { Description };
|
||||||
|
|
@ -2,24 +2,20 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["StreamRegistry"];
|
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
|
UnsupportedError: "chrome://remote/content/cdp/Error.sys.mjs",
|
||||||
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
AsyncShutdown: "resource://gre/modules/AsyncShutdown.jsm",
|
AsyncShutdown: "resource://gre/modules/AsyncShutdown.jsm",
|
||||||
OS: "resource://gre/modules/osfile.jsm",
|
OS: "resource://gre/modules/osfile.jsm",
|
||||||
|
|
||||||
UnsupportedError: "chrome://remote/content/cdp/Error.jsm",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
class StreamRegistry {
|
export class StreamRegistry {
|
||||||
constructor() {
|
constructor() {
|
||||||
// handle => stream
|
// handle => stream
|
||||||
this.streams = new Map();
|
this.streams = new Map();
|
||||||
|
|
@ -2,15 +2,9 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { Domain } from "chrome://remote/content/cdp/domains/Domain.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["ContentProcessDomain"];
|
export class ContentProcessDomain extends Domain {
|
||||||
|
|
||||||
const { Domain } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/domains/Domain.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
class ContentProcessDomain extends Domain {
|
|
||||||
destructor() {
|
destructor() {
|
||||||
super.destructor();
|
super.destructor();
|
||||||
}
|
}
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
/* 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 = ["ContentProcessDomains"];
|
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const ContentProcessDomains = {};
|
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(ContentProcessDomains, {
|
|
||||||
DOM: "chrome://remote/content/cdp/domains/content/DOM.jsm",
|
|
||||||
Emulation: "chrome://remote/content/cdp/domains/content/Emulation.jsm",
|
|
||||||
Input: "chrome://remote/content/cdp/domains/content/Input.jsm",
|
|
||||||
Log: "chrome://remote/content/cdp/domains/content/Log.jsm",
|
|
||||||
Network: "chrome://remote/content/cdp/domains/content/Network.jsm",
|
|
||||||
Page: "chrome://remote/content/cdp/domains/content/Page.jsm",
|
|
||||||
Performance: "chrome://remote/content/cdp/domains/content/Performance.jsm",
|
|
||||||
Runtime: "chrome://remote/content/cdp/domains/content/Runtime.jsm",
|
|
||||||
Security: "chrome://remote/content/cdp/domains/content/Security.jsm",
|
|
||||||
});
|
|
||||||
19
remote/cdp/domains/ContentProcessDomains.sys.mjs
Normal file
19
remote/cdp/domains/ContentProcessDomains.sys.mjs
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
/* 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/. */
|
||||||
|
|
||||||
|
export const ContentProcessDomains = {};
|
||||||
|
|
||||||
|
// eslint-disable-next-line mozilla/lazy-getter-object-name
|
||||||
|
ChromeUtils.defineESModuleGetters(ContentProcessDomains, {
|
||||||
|
DOM: "chrome://remote/content/cdp/domains/content/DOM.sys.mjs",
|
||||||
|
Emulation: "chrome://remote/content/cdp/domains/content/Emulation.sys.mjs",
|
||||||
|
Input: "chrome://remote/content/cdp/domains/content/Input.sys.mjs",
|
||||||
|
Log: "chrome://remote/content/cdp/domains/content/Log.sys.mjs",
|
||||||
|
Network: "chrome://remote/content/cdp/domains/content/Network.sys.mjs",
|
||||||
|
Page: "chrome://remote/content/cdp/domains/content/Page.sys.mjs",
|
||||||
|
Performance:
|
||||||
|
"chrome://remote/content/cdp/domains/content/Performance.sys.mjs",
|
||||||
|
Runtime: "chrome://remote/content/cdp/domains/content/Runtime.sys.mjs",
|
||||||
|
Security: "chrome://remote/content/cdp/domains/content/Security.sys.mjs",
|
||||||
|
});
|
||||||
|
|
@ -2,11 +2,7 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
export class Domain {
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["Domain"];
|
|
||||||
|
|
||||||
class Domain {
|
|
||||||
constructor(session) {
|
constructor(session) {
|
||||||
this.session = session;
|
this.session = session;
|
||||||
this.name = this.constructor.name;
|
this.name = this.constructor.name;
|
||||||
|
|
@ -2,19 +2,11 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["DomainCache"];
|
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
Domain: "chrome://remote/content/cdp/domains/Domain.jsm",
|
Domain: "chrome://remote/content/cdp/domains/Domain.sys.mjs",
|
||||||
UnknownMethodError: "chrome://remote/content/cdp/Error.jsm",
|
UnknownMethodError: "chrome://remote/content/cdp/Error.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -32,7 +24,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
* This should be a mapping between domain name
|
* This should be a mapping between domain name
|
||||||
* and JS module path passed to ChromeUtils.import.
|
* and JS module path passed to ChromeUtils.import.
|
||||||
*/
|
*/
|
||||||
class DomainCache {
|
export class DomainCache {
|
||||||
constructor(session, modules) {
|
constructor(session, modules) {
|
||||||
this.session = session;
|
this.session = session;
|
||||||
this.modules = modules;
|
this.modules = modules;
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
/* 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 = ["ParentProcessDomains"];
|
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const ParentProcessDomains = {};
|
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(ParentProcessDomains, {
|
|
||||||
Browser: "chrome://remote/content/cdp/domains/parent/Browser.jsm",
|
|
||||||
Emulation: "chrome://remote/content/cdp/domains/parent/Emulation.jsm",
|
|
||||||
Fetch: "chrome://remote/content/cdp/domains/parent/Fetch.jsm",
|
|
||||||
Input: "chrome://remote/content/cdp/domains/parent/Input.jsm",
|
|
||||||
IO: "chrome://remote/content/cdp/domains/parent/IO.jsm",
|
|
||||||
Network: "chrome://remote/content/cdp/domains/parent/Network.jsm",
|
|
||||||
Page: "chrome://remote/content/cdp/domains/parent/Page.jsm",
|
|
||||||
Security: "chrome://remote/content/cdp/domains/parent/Security.jsm",
|
|
||||||
Target: "chrome://remote/content/cdp/domains/parent/Target.jsm",
|
|
||||||
});
|
|
||||||
18
remote/cdp/domains/ParentProcessDomains.sys.mjs
Normal file
18
remote/cdp/domains/ParentProcessDomains.sys.mjs
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
/* 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/. */
|
||||||
|
|
||||||
|
export const ParentProcessDomains = {};
|
||||||
|
|
||||||
|
// eslint-disable-next-line mozilla/lazy-getter-object-name
|
||||||
|
ChromeUtils.defineESModuleGetters(ParentProcessDomains, {
|
||||||
|
Browser: "chrome://remote/content/cdp/domains/parent/Browser.sys.mjs",
|
||||||
|
Emulation: "chrome://remote/content/cdp/domains/parent/Emulation.sys.mjs",
|
||||||
|
Fetch: "chrome://remote/content/cdp/domains/parent/Fetch.sys.mjs",
|
||||||
|
Input: "chrome://remote/content/cdp/domains/parent/Input.sys.mjs",
|
||||||
|
IO: "chrome://remote/content/cdp/domains/parent/IO.sys.mjs",
|
||||||
|
Network: "chrome://remote/content/cdp/domains/parent/Network.sys.mjs",
|
||||||
|
Page: "chrome://remote/content/cdp/domains/parent/Page.sys.mjs",
|
||||||
|
Security: "chrome://remote/content/cdp/domains/parent/Security.sys.mjs",
|
||||||
|
Target: "chrome://remote/content/cdp/domains/parent/Target.sys.mjs",
|
||||||
|
});
|
||||||
|
|
@ -2,15 +2,9 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { ContentProcessDomain } from "chrome://remote/content/cdp/domains/ContentProcessDomain.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["DOM"];
|
export class DOM extends ContentProcessDomain {
|
||||||
|
|
||||||
const { ContentProcessDomain } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/domains/ContentProcessDomain.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
class DOM extends ContentProcessDomain {
|
|
||||||
constructor(session) {
|
constructor(session) {
|
||||||
super(session);
|
super(session);
|
||||||
this.enabled = false;
|
this.enabled = false;
|
||||||
|
|
@ -2,13 +2,7 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { ContentProcessDomain } from "chrome://remote/content/cdp/domains/ContentProcessDomain.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["Emulation"];
|
|
||||||
|
|
||||||
const { ContentProcessDomain } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/domains/ContentProcessDomain.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
|
|
@ -16,7 +10,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
AnimationFramePromise: "chrome://remote/content/shared/Sync.sys.mjs",
|
AnimationFramePromise: "chrome://remote/content/shared/Sync.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
class Emulation extends ContentProcessDomain {
|
export class Emulation extends ContentProcessDomain {
|
||||||
// commands
|
// commands
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -2,15 +2,9 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { ContentProcessDomain } from "chrome://remote/content/cdp/domains/ContentProcessDomain.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["Input"];
|
export class Input extends ContentProcessDomain {
|
||||||
|
|
||||||
const { ContentProcessDomain } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/domains/ContentProcessDomain.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
class Input extends ContentProcessDomain {
|
|
||||||
constructor(session) {
|
constructor(session) {
|
||||||
super(session);
|
super(session);
|
||||||
|
|
||||||
|
|
@ -2,13 +2,7 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { ContentProcessDomain } from "chrome://remote/content/cdp/domains/ContentProcessDomain.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["Log"];
|
|
||||||
|
|
||||||
const { ContentProcessDomain } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/domains/ContentProcessDomain.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
const CONSOLE_MESSAGE_LEVEL_MAP = {
|
const CONSOLE_MESSAGE_LEVEL_MAP = {
|
||||||
[Ci.nsIConsoleMessage.debug]: "verbose",
|
[Ci.nsIConsoleMessage.debug]: "verbose",
|
||||||
|
|
@ -17,7 +11,7 @@ const CONSOLE_MESSAGE_LEVEL_MAP = {
|
||||||
[Ci.nsIConsoleMessage.error]: "error",
|
[Ci.nsIConsoleMessage.error]: "error",
|
||||||
};
|
};
|
||||||
|
|
||||||
class Log extends ContentProcessDomain {
|
export class Log extends ContentProcessDomain {
|
||||||
constructor(session) {
|
constructor(session) {
|
||||||
super(session);
|
super(session);
|
||||||
this.enabled = false;
|
this.enabled = false;
|
||||||
|
|
@ -2,15 +2,9 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { ContentProcessDomain } from "chrome://remote/content/cdp/domains/ContentProcessDomain.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["Network"];
|
export class Network extends ContentProcessDomain {
|
||||||
|
|
||||||
const { ContentProcessDomain } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/domains/ContentProcessDomain.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
class Network extends ContentProcessDomain {
|
|
||||||
// commands
|
// commands
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -2,13 +2,7 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { ContentProcessDomain } from "chrome://remote/content/cdp/domains/ContentProcessDomain.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["Page"];
|
|
||||||
|
|
||||||
const { ContentProcessDomain } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/domains/ContentProcessDomain.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
LOAD_FLAGS_BYPASS_CACHE,
|
LOAD_FLAGS_BYPASS_CACHE,
|
||||||
|
|
@ -16,7 +10,7 @@ const {
|
||||||
LOAD_FLAGS_NONE,
|
LOAD_FLAGS_NONE,
|
||||||
} = Ci.nsIWebNavigation;
|
} = Ci.nsIWebNavigation;
|
||||||
|
|
||||||
class Page extends ContentProcessDomain {
|
export class Page extends ContentProcessDomain {
|
||||||
constructor(session) {
|
constructor(session) {
|
||||||
super(session);
|
super(session);
|
||||||
|
|
||||||
|
|
@ -2,15 +2,9 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { ContentProcessDomain } from "chrome://remote/content/cdp/domains/ContentProcessDomain.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["Security"];
|
export class Performance extends ContentProcessDomain {
|
||||||
|
|
||||||
const { ContentProcessDomain } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/domains/ContentProcessDomain.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
class Security extends ContentProcessDomain {
|
|
||||||
constructor(session) {
|
constructor(session) {
|
||||||
super(session);
|
super(session);
|
||||||
this.enabled = false;
|
this.enabled = false;
|
||||||
|
|
@ -2,30 +2,20 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["Runtime"];
|
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const { addDebuggerToGlobal } = ChromeUtils.import(
|
const { addDebuggerToGlobal } = ChromeUtils.import(
|
||||||
"resource://gre/modules/jsdebugger.jsm"
|
"resource://gre/modules/jsdebugger.jsm"
|
||||||
);
|
);
|
||||||
const { ContentProcessDomain } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/domains/ContentProcessDomain.jsm"
|
import { ContentProcessDomain } from "chrome://remote/content/cdp/domains/ContentProcessDomain.sys.mjs";
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
executeSoon: "chrome://remote/content/shared/Sync.sys.mjs",
|
executeSoon: "chrome://remote/content/shared/Sync.sys.mjs",
|
||||||
});
|
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|
||||||
ExecutionContext:
|
ExecutionContext:
|
||||||
"chrome://remote/content/cdp/domains/content/runtime/ExecutionContext.jsm",
|
"chrome://remote/content/cdp/domains/content/runtime/ExecutionContext.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyGetter(lazy, "ConsoleAPIStorage", () => {
|
XPCOMUtils.defineLazyGetter(lazy, "ConsoleAPIStorage", () => {
|
||||||
|
|
@ -68,7 +58,7 @@ class SetMap extends Map {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Runtime extends ContentProcessDomain {
|
export class Runtime extends ContentProcessDomain {
|
||||||
constructor(session) {
|
constructor(session) {
|
||||||
super(session);
|
super(session);
|
||||||
this.enabled = false;
|
this.enabled = false;
|
||||||
|
|
@ -2,15 +2,9 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { ContentProcessDomain } from "chrome://remote/content/cdp/domains/ContentProcessDomain.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["Performance"];
|
export class Security extends ContentProcessDomain {
|
||||||
|
|
||||||
const { ContentProcessDomain } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/domains/ContentProcessDomain.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
class Performance extends ContentProcessDomain {
|
|
||||||
constructor(session) {
|
constructor(session) {
|
||||||
super(session);
|
super(session);
|
||||||
this.enabled = false;
|
this.enabled = false;
|
||||||
|
|
@ -2,10 +2,6 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["ExecutionContext"];
|
|
||||||
|
|
||||||
const TYPED_ARRAY_CLASSES = [
|
const TYPED_ARRAY_CLASSES = [
|
||||||
"Uint8Array",
|
"Uint8Array",
|
||||||
"Uint8ClampedArray",
|
"Uint8ClampedArray",
|
||||||
|
|
@ -36,7 +32,7 @@ function uuid() {
|
||||||
* The debuggable context's global object. This is typically the document window
|
* The debuggable context's global object. This is typically the document window
|
||||||
* object. But it can also be any global object, like a worker global scope object.
|
* object. But it can also be any global object, like a worker global scope object.
|
||||||
*/
|
*/
|
||||||
class ExecutionContext {
|
export class ExecutionContext {
|
||||||
constructor(dbg, debuggee, id, isDefault) {
|
constructor(dbg, debuggee, id, isDefault) {
|
||||||
this._debugger = dbg;
|
this._debugger = dbg;
|
||||||
this._debuggee = this._debugger.addDebuggee(debuggee);
|
this._debuggee = this._debugger.addDebuggee(debuggee);
|
||||||
|
|
@ -2,15 +2,9 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { Domain } from "chrome://remote/content/cdp/domains/Domain.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["Browser"];
|
export class Browser extends Domain {
|
||||||
|
|
||||||
const { Domain } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/domains/Domain.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
class Browser extends Domain {
|
|
||||||
getVersion() {
|
getVersion() {
|
||||||
const { isHeadless } = Cc["@mozilla.org/gfx/info;1"].getService(
|
const { isHeadless } = Cc["@mozilla.org/gfx/info;1"].getService(
|
||||||
Ci.nsIGfxInfo
|
Ci.nsIGfxInfo
|
||||||
|
|
@ -2,17 +2,9 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["Emulation"];
|
import { Domain } from "chrome://remote/content/cdp/domains/Domain.sys.mjs";
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const { Domain } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/domains/Domain.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
|
|
@ -22,7 +14,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
|
|
||||||
const MAX_WINDOW_SIZE = 10000000;
|
const MAX_WINDOW_SIZE = 10000000;
|
||||||
|
|
||||||
class Emulation extends Domain {
|
export class Emulation extends Domain {
|
||||||
destructor() {
|
destructor() {
|
||||||
this.setUserAgentOverride({ userAgent: "", platform: "" });
|
this.setUserAgentOverride({ userAgent: "", platform: "" });
|
||||||
|
|
||||||
|
|
@ -2,18 +2,12 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { Domain } from "chrome://remote/content/cdp/domains/Domain.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["Fetch"];
|
|
||||||
|
|
||||||
const { Domain } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/domains/Domain.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
// Note: For now this domain has only been added so that clients using CDP
|
// Note: For now this domain has only been added so that clients using CDP
|
||||||
// (like Selenium) don't break when trying to disable Fetch events.
|
// (like Selenium) don't break when trying to disable Fetch events.
|
||||||
|
|
||||||
class Fetch extends Domain {
|
export class Fetch extends Domain {
|
||||||
constructor(session) {
|
constructor(session) {
|
||||||
super(session);
|
super(session);
|
||||||
|
|
||||||
|
|
@ -2,20 +2,10 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["IO", "streamRegistry"];
|
import { Domain } from "chrome://remote/content/cdp/domains/Domain.sys.mjs";
|
||||||
|
import { StreamRegistry } from "chrome://remote/content/cdp/StreamRegistry.sys.mjs";
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const { Domain } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/domains/Domain.jsm"
|
|
||||||
);
|
|
||||||
const { StreamRegistry } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/StreamRegistry.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
|
|
@ -26,9 +16,9 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
const DEFAULT_CHUNK_SIZE = 10 * 1024 * 1024;
|
const DEFAULT_CHUNK_SIZE = 10 * 1024 * 1024;
|
||||||
|
|
||||||
// Global singleton for managing open streams
|
// Global singleton for managing open streams
|
||||||
const streamRegistry = new StreamRegistry();
|
export const streamRegistry = new StreamRegistry();
|
||||||
|
|
||||||
class IO extends Domain {
|
export class IO extends Domain {
|
||||||
// commands
|
// commands
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -2,15 +2,9 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { Domain } from "chrome://remote/content/cdp/domains/Domain.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["Input"];
|
export class Input extends Domain {
|
||||||
|
|
||||||
const { Domain } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/domains/Domain.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
class Input extends Domain {
|
|
||||||
// commands
|
// commands
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -2,13 +2,7 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { Domain } from "chrome://remote/content/cdp/domains/Domain.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["Network"];
|
|
||||||
|
|
||||||
const { Domain } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/domains/Domain.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
const MAX_COOKIE_EXPIRY = Number.MAX_SAFE_INTEGER;
|
const MAX_COOKIE_EXPIRY = Number.MAX_SAFE_INTEGER;
|
||||||
|
|
||||||
|
|
@ -36,7 +30,7 @@ const LOAD_CAUSE_STRINGS = {
|
||||||
[Ci.nsIContentPolicy.TYPE_WEB_MANIFEST]: "WebManifest",
|
[Ci.nsIContentPolicy.TYPE_WEB_MANIFEST]: "WebManifest",
|
||||||
};
|
};
|
||||||
|
|
||||||
class Network extends Domain {
|
export class Network extends Domain {
|
||||||
constructor(session) {
|
constructor(session) {
|
||||||
super(session);
|
super(session);
|
||||||
this.enabled = false;
|
this.enabled = false;
|
||||||
|
|
@ -2,23 +2,19 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["Page"];
|
import { Domain } from "chrome://remote/content/cdp/domains/Domain.sys.mjs";
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const { Domain } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/domains/Domain.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
|
DialogHandler:
|
||||||
|
"chrome://remote/content/cdp/domains/parent/page/DialogHandler.sys.mjs",
|
||||||
PollPromise: "chrome://remote/content/shared/Sync.sys.mjs",
|
PollPromise: "chrome://remote/content/shared/Sync.sys.mjs",
|
||||||
|
streamRegistry: "chrome://remote/content/cdp/domains/parent/IO.sys.mjs",
|
||||||
TabManager: "chrome://remote/content/shared/TabManager.sys.mjs",
|
TabManager: "chrome://remote/content/shared/TabManager.sys.mjs",
|
||||||
|
UnsupportedError: "chrome://remote/content/cdp/Error.sys.mjs",
|
||||||
windowManager: "chrome://remote/content/shared/WindowManager.sys.mjs",
|
windowManager: "chrome://remote/content/shared/WindowManager.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -27,11 +23,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
OS: "resource://gre/modules/osfile.jsm",
|
OS: "resource://gre/modules/osfile.jsm",
|
||||||
SessionStore: "resource:///modules/sessionstore/SessionStore.jsm",
|
SessionStore: "resource:///modules/sessionstore/SessionStore.jsm",
|
||||||
setInterval: "resource://gre/modules/Timer.jsm",
|
setInterval: "resource://gre/modules/Timer.jsm",
|
||||||
|
|
||||||
DialogHandler:
|
|
||||||
"chrome://remote/content/cdp/domains/parent/page/DialogHandler.jsm",
|
|
||||||
streamRegistry: "chrome://remote/content/cdp/domains/parent/IO.jsm",
|
|
||||||
UnsupportedError: "chrome://remote/content/cdp/Error.jsm",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const MAX_CANVAS_DIMENSION = 32767;
|
const MAX_CANVAS_DIMENSION = 32767;
|
||||||
|
|
@ -47,7 +38,7 @@ const PDF_TRANSFER_MODES = {
|
||||||
|
|
||||||
const TIMEOUT_SET_HISTORY_INDEX = 1000;
|
const TIMEOUT_SET_HISTORY_INDEX = 1000;
|
||||||
|
|
||||||
class Page extends Domain {
|
export class Page extends Domain {
|
||||||
constructor(session) {
|
constructor(session) {
|
||||||
super(session);
|
super(session);
|
||||||
|
|
||||||
|
|
@ -2,17 +2,9 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["Security"];
|
import { Domain } from "chrome://remote/content/cdp/domains/Domain.sys.mjs";
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const { Domain } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/domains/Domain.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
|
|
@ -31,7 +23,7 @@ XPCOMUtils.defineLazyServiceGetters(lazy, {
|
||||||
const CERT_PINNING_ENFORCEMENT_PREF = "security.cert_pinning.enforcement_level";
|
const CERT_PINNING_ENFORCEMENT_PREF = "security.cert_pinning.enforcement_level";
|
||||||
const HSTS_PRELOAD_LIST_PREF = "network.stricttransportsecurity.preloadlist";
|
const HSTS_PRELOAD_LIST_PREF = "network.stricttransportsecurity.preloadlist";
|
||||||
|
|
||||||
class Security extends Domain {
|
export class Security extends Domain {
|
||||||
destructor() {
|
destructor() {
|
||||||
this.setIgnoreCertificateErrors({ ignore: false });
|
this.setIgnoreCertificateErrors({ ignore: false });
|
||||||
}
|
}
|
||||||
|
|
@ -2,37 +2,28 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["Target"];
|
import { Domain } from "chrome://remote/content/cdp/domains/Domain.sys.mjs";
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const { Domain } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/domains/Domain.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
|
MainProcessTarget:
|
||||||
|
"chrome://remote/content/cdp/targets/MainProcessTarget.sys.mjs",
|
||||||
TabManager: "chrome://remote/content/shared/TabManager.sys.mjs",
|
TabManager: "chrome://remote/content/shared/TabManager.sys.mjs",
|
||||||
|
TabSession: "chrome://remote/content/cdp/sessions/TabSession.sys.mjs",
|
||||||
windowManager: "chrome://remote/content/shared/WindowManager.sys.mjs",
|
windowManager: "chrome://remote/content/shared/WindowManager.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
ContextualIdentityService:
|
ContextualIdentityService:
|
||||||
"resource://gre/modules/ContextualIdentityService.jsm",
|
"resource://gre/modules/ContextualIdentityService.jsm",
|
||||||
|
|
||||||
MainProcessTarget:
|
|
||||||
"chrome://remote/content/cdp/targets/MainProcessTarget.jsm",
|
|
||||||
TabSession: "chrome://remote/content/cdp/sessions/TabSession.jsm",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
let browserContextIds = 1;
|
let browserContextIds = 1;
|
||||||
|
|
||||||
class Target extends Domain {
|
export class Target extends Domain {
|
||||||
constructor(session) {
|
constructor(session) {
|
||||||
super(session);
|
super(session);
|
||||||
|
|
||||||
|
|
@ -2,13 +2,7 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["DialogHandler"];
|
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
|
|
@ -33,7 +27,7 @@ const DIALOG_TYPES = {
|
||||||
*
|
*
|
||||||
* @param {BrowserElement} browser
|
* @param {BrowserElement} browser
|
||||||
*/
|
*/
|
||||||
class DialogHandler {
|
export class DialogHandler {
|
||||||
constructor(browser) {
|
constructor(browser) {
|
||||||
lazy.EventEmitter.decorate(this);
|
lazy.EventEmitter.decorate(this);
|
||||||
this._dialog = null;
|
this._dialog = null;
|
||||||
|
|
@ -4,51 +4,51 @@
|
||||||
|
|
||||||
remote.jar:
|
remote.jar:
|
||||||
% content remote %content/
|
% content remote %content/
|
||||||
content/cdp/CDP.jsm (CDP.jsm)
|
content/cdp/CDP.sys.mjs (CDP.sys.mjs)
|
||||||
content/cdp/CDPConnection.jsm (CDPConnection.jsm)
|
content/cdp/CDPConnection.sys.mjs (CDPConnection.sys.mjs)
|
||||||
content/cdp/Error.jsm (Error.jsm)
|
content/cdp/Error.sys.mjs (Error.sys.mjs)
|
||||||
content/cdp/JSONHandler.jsm (JSONHandler.jsm)
|
content/cdp/JSONHandler.sys.mjs (JSONHandler.sys.mjs)
|
||||||
content/cdp/Protocol.jsm (Protocol.jsm)
|
content/cdp/Protocol.sys.mjs (Protocol.sys.mjs)
|
||||||
content/cdp/StreamRegistry.jsm (StreamRegistry.jsm)
|
content/cdp/StreamRegistry.sys.mjs (StreamRegistry.sys.mjs)
|
||||||
# domains
|
# domains
|
||||||
content/cdp/domains/ContentProcessDomain.jsm (domains/ContentProcessDomain.jsm)
|
content/cdp/domains/ContentProcessDomain.sys.mjs (domains/ContentProcessDomain.sys.mjs)
|
||||||
content/cdp/domains/ContentProcessDomains.jsm (domains/ContentProcessDomains.jsm)
|
content/cdp/domains/ContentProcessDomains.sys.mjs (domains/ContentProcessDomains.sys.mjs)
|
||||||
content/cdp/domains/Domain.jsm (domains/Domain.jsm)
|
content/cdp/domains/Domain.sys.mjs (domains/Domain.sys.mjs)
|
||||||
content/cdp/domains/DomainCache.jsm (domains/DomainCache.jsm)
|
content/cdp/domains/DomainCache.sys.mjs (domains/DomainCache.sys.mjs)
|
||||||
content/cdp/domains/ParentProcessDomains.jsm (domains/ParentProcessDomains.jsm)
|
content/cdp/domains/ParentProcessDomains.sys.mjs (domains/ParentProcessDomains.sys.mjs)
|
||||||
content/cdp/domains/content/DOM.jsm (domains/content/DOM.jsm)
|
content/cdp/domains/content/DOM.sys.mjs (domains/content/DOM.sys.mjs)
|
||||||
content/cdp/domains/content/Emulation.jsm (domains/content/Emulation.jsm)
|
content/cdp/domains/content/Emulation.sys.mjs (domains/content/Emulation.sys.mjs)
|
||||||
content/cdp/domains/content/Input.jsm (domains/content/Input.jsm)
|
content/cdp/domains/content/Input.sys.mjs (domains/content/Input.sys.mjs)
|
||||||
content/cdp/domains/content/Log.jsm (domains/content/Log.jsm)
|
content/cdp/domains/content/Log.sys.mjs (domains/content/Log.sys.mjs)
|
||||||
content/cdp/domains/content/Network.jsm (domains/content/Network.jsm)
|
content/cdp/domains/content/Network.sys.mjs (domains/content/Network.sys.mjs)
|
||||||
content/cdp/domains/content/Page.jsm (domains/content/Page.jsm)
|
content/cdp/domains/content/Page.sys.mjs (domains/content/Page.sys.mjs)
|
||||||
content/cdp/domains/content/Performance.jsm (domains/content/Performance.jsm)
|
content/cdp/domains/content/Performance.sys.mjs (domains/content/Performance.sys.mjs)
|
||||||
content/cdp/domains/content/Runtime.jsm (domains/content/Runtime.jsm)
|
content/cdp/domains/content/Runtime.sys.mjs (domains/content/Runtime.sys.mjs)
|
||||||
content/cdp/domains/content/runtime/ExecutionContext.jsm (domains/content/runtime/ExecutionContext.jsm)
|
content/cdp/domains/content/runtime/ExecutionContext.sys.mjs (domains/content/runtime/ExecutionContext.sys.mjs)
|
||||||
content/cdp/domains/content/Security.jsm (domains/content/Security.jsm)
|
content/cdp/domains/content/Security.sys.mjs (domains/content/Security.sys.mjs)
|
||||||
content/cdp/domains/parent/Browser.jsm (domains/parent/Browser.jsm)
|
content/cdp/domains/parent/Browser.sys.mjs (domains/parent/Browser.sys.mjs)
|
||||||
content/cdp/domains/parent/Emulation.jsm (domains/parent/Emulation.jsm)
|
content/cdp/domains/parent/Emulation.sys.mjs (domains/parent/Emulation.sys.mjs)
|
||||||
content/cdp/domains/parent/Fetch.jsm (domains/parent/Fetch.jsm)
|
content/cdp/domains/parent/Fetch.sys.mjs (domains/parent/Fetch.sys.mjs)
|
||||||
content/cdp/domains/parent/Input.jsm (domains/parent/Input.jsm)
|
content/cdp/domains/parent/Input.sys.mjs (domains/parent/Input.sys.mjs)
|
||||||
content/cdp/domains/parent/IO.jsm (domains/parent/IO.jsm)
|
content/cdp/domains/parent/IO.sys.mjs (domains/parent/IO.sys.mjs)
|
||||||
content/cdp/domains/parent/Network.jsm (domains/parent/Network.jsm)
|
content/cdp/domains/parent/Network.sys.mjs (domains/parent/Network.sys.mjs)
|
||||||
content/cdp/domains/parent/Page.jsm (domains/parent/Page.jsm)
|
content/cdp/domains/parent/Page.sys.mjs (domains/parent/Page.sys.mjs)
|
||||||
content/cdp/domains/parent/page/DialogHandler.jsm (domains/parent/page/DialogHandler.jsm)
|
content/cdp/domains/parent/page/DialogHandler.sys.mjs (domains/parent/page/DialogHandler.sys.mjs)
|
||||||
content/cdp/domains/parent/Security.jsm (domains/parent/Security.jsm)
|
content/cdp/domains/parent/Security.sys.mjs (domains/parent/Security.sys.mjs)
|
||||||
content/cdp/domains/parent/Target.jsm (domains/parent/Target.jsm)
|
content/cdp/domains/parent/Target.sys.mjs (domains/parent/Target.sys.mjs)
|
||||||
# observers
|
# observers
|
||||||
content/cdp/observers/ChannelEventSink.jsm (observers/ChannelEventSink.jsm)
|
content/cdp/observers/ChannelEventSink.sys.mjs (observers/ChannelEventSink.sys.mjs)
|
||||||
content/cdp/observers/ContextObserver.jsm (observers/ContextObserver.jsm)
|
content/cdp/observers/ContextObserver.sys.mjs (observers/ContextObserver.sys.mjs)
|
||||||
content/cdp/observers/NetworkObserver.jsm (observers/NetworkObserver.jsm)
|
content/cdp/observers/NetworkObserver.sys.mjs (observers/NetworkObserver.sys.mjs)
|
||||||
content/cdp/observers/TargetObserver.jsm (observers/TargetObserver.jsm)
|
content/cdp/observers/TargetObserver.sys.mjs (observers/TargetObserver.sys.mjs)
|
||||||
# sessions
|
# sessions
|
||||||
content/cdp/sessions/frame-script.js (sessions/frame-script.js)
|
content/cdp/sessions/frame-script.js (sessions/frame-script.js)
|
||||||
content/cdp/sessions/ContentProcessSession.jsm (sessions/ContentProcessSession.jsm)
|
content/cdp/sessions/ContentProcessSession.sys.mjs (sessions/ContentProcessSession.sys.mjs)
|
||||||
content/cdp/sessions/MainProcessSession.jsm (sessions/MainProcessSession.jsm)
|
content/cdp/sessions/MainProcessSession.sys.mjs (sessions/MainProcessSession.sys.mjs)
|
||||||
content/cdp/sessions/Session.jsm (sessions/Session.jsm)
|
content/cdp/sessions/Session.sys.mjs (sessions/Session.sys.mjs)
|
||||||
content/cdp/sessions/TabSession.jsm (sessions/TabSession.jsm)
|
content/cdp/sessions/TabSession.sys.mjs (sessions/TabSession.sys.mjs)
|
||||||
# targets
|
# targets
|
||||||
content/cdp/targets/MainProcessTarget.jsm (targets/MainProcessTarget.jsm)
|
content/cdp/targets/MainProcessTarget.sys.mjs (targets/MainProcessTarget.sys.mjs)
|
||||||
content/cdp/targets/TabTarget.jsm (targets/TabTarget.jsm)
|
content/cdp/targets/TabTarget.sys.mjs (targets/TabTarget.sys.mjs)
|
||||||
content/cdp/targets/Target.jsm (targets/Target.jsm)
|
content/cdp/targets/Target.sys.mjs (targets/Target.sys.mjs)
|
||||||
content/cdp/targets/TargetList.jsm (targets/TargetList.jsm)
|
content/cdp/targets/TargetList.sys.mjs (targets/TargetList.sys.mjs)
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,6 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["ChannelEventSinkFactory"];
|
|
||||||
|
|
||||||
const { ComponentUtils } = ChromeUtils.import(
|
const { ComponentUtils } = ChromeUtils.import(
|
||||||
"resource://gre/modules/ComponentUtils.jsm"
|
"resource://gre/modules/ComponentUtils.jsm"
|
||||||
);
|
);
|
||||||
|
|
@ -61,7 +57,7 @@ ChannelEventSink.prototype = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const ChannelEventSinkFactory = ComponentUtils.generateSingletonFactory(
|
export const ChannelEventSinkFactory = ComponentUtils.generateSingletonFactory(
|
||||||
ChannelEventSink
|
ChannelEventSink
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -2,8 +2,6 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper class to coordinate Runtime and Page events.
|
* Helper class to coordinate Runtime and Page events.
|
||||||
* Events have to be sent in the following order:
|
* Events have to be sent in the following order:
|
||||||
|
|
@ -23,11 +21,7 @@
|
||||||
* being destroyed and the document navigated.
|
* being destroyed and the document navigated.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["ContextObserver"];
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
|
|
@ -39,7 +33,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
EventEmitter: "resource://gre/modules/EventEmitter.jsm",
|
EventEmitter: "resource://gre/modules/EventEmitter.jsm",
|
||||||
});
|
});
|
||||||
|
|
||||||
class ContextObserver {
|
export class ContextObserver {
|
||||||
constructor(chromeEventHandler) {
|
constructor(chromeEventHandler) {
|
||||||
this.chromeEventHandler = chromeEventHandler;
|
this.chromeEventHandler = chromeEventHandler;
|
||||||
lazy.EventEmitter.decorate(this);
|
lazy.EventEmitter.decorate(this);
|
||||||
|
|
@ -2,21 +2,19 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
|
ChannelEventSinkFactory:
|
||||||
|
"chrome://remote/content/cdp/observers/ChannelEventSink.sys.mjs",
|
||||||
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
CommonUtils: "resource://services-common/utils.js",
|
CommonUtils: "resource://services-common/utils.js",
|
||||||
EventEmitter: "resource://gre/modules/EventEmitter.jsm",
|
EventEmitter: "resource://gre/modules/EventEmitter.jsm",
|
||||||
NetUtil: "resource://gre/modules/NetUtil.jsm",
|
NetUtil: "resource://gre/modules/NetUtil.jsm",
|
||||||
|
|
||||||
ChannelEventSinkFactory:
|
|
||||||
"chrome://remote/content/cdp/observers/ChannelEventSink.jsm",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyServiceGetter(
|
XPCOMUtils.defineLazyServiceGetter(
|
||||||
|
|
@ -51,7 +49,7 @@ XPCOMUtils.defineLazyGetter(lazy, "StorageStream", () => {
|
||||||
// Cap response storage with 100Mb per tracked tab.
|
// Cap response storage with 100Mb per tracked tab.
|
||||||
const MAX_RESPONSE_STORAGE_SIZE = 100 * 1024 * 1024;
|
const MAX_RESPONSE_STORAGE_SIZE = 100 * 1024 * 1024;
|
||||||
|
|
||||||
class NetworkObserver {
|
export class NetworkObserver {
|
||||||
constructor() {
|
constructor() {
|
||||||
lazy.EventEmitter.decorate(this);
|
lazy.EventEmitter.decorate(this);
|
||||||
this._browserSessionCount = new Map();
|
this._browserSessionCount = new Map();
|
||||||
|
|
@ -632,5 +630,3 @@ function getNetworkErrorStatusText(status) {
|
||||||
}
|
}
|
||||||
return "<unknown error>";
|
return "<unknown error>";
|
||||||
}
|
}
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["NetworkObserver"];
|
|
||||||
|
|
@ -2,13 +2,7 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["TabObserver"];
|
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
|
|
@ -34,7 +28,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
* "open" fires when a tab opens.
|
* "open" fires when a tab opens.
|
||||||
* "close" fires when a tab closes.
|
* "close" fires when a tab closes.
|
||||||
*/
|
*/
|
||||||
class TabObserver {
|
export class TabObserver {
|
||||||
/**
|
/**
|
||||||
* @param {boolean?} [false] registerExisting
|
* @param {boolean?} [false] registerExisting
|
||||||
* Events will be fired for ChromeWIndows and their respective tabs
|
* Events will be fired for ChromeWIndows and their respective tabs
|
||||||
|
|
@ -2,24 +2,17 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["ContentProcessSession"];
|
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
ContentProcessDomains:
|
ContentProcessDomains:
|
||||||
"chrome://remote/content/cdp/domains/ContentProcessDomains.jsm",
|
"chrome://remote/content/cdp/domains/ContentProcessDomains.sys.mjs",
|
||||||
ContextObserver: "chrome://remote/content/cdp/observers/ContextObserver.jsm",
|
ContextObserver:
|
||||||
DomainCache: "chrome://remote/content/cdp/domains/DomainCache.jsm",
|
"chrome://remote/content/cdp/observers/ContextObserver.sys.mjs",
|
||||||
|
DomainCache: "chrome://remote/content/cdp/domains/DomainCache.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
class ContentProcessSession {
|
export class ContentProcessSession {
|
||||||
constructor(messageManager, browsingContext, content, docShell) {
|
constructor(messageManager, browsingContext, content, docShell) {
|
||||||
this.messageManager = messageManager;
|
this.messageManager = messageManager;
|
||||||
this.browsingContext = browsingContext;
|
this.browsingContext = browsingContext;
|
||||||
|
|
@ -2,17 +2,11 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { Session } from "chrome://remote/content/cdp/sessions/Session.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["MainProcessSession"];
|
|
||||||
|
|
||||||
const { Session } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/sessions/Session.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A session, dedicated to the main process target.
|
* A session, dedicated to the main process target.
|
||||||
* For some reason, it doesn't need any specific code and can share the base Session class
|
* For some reason, it doesn't need any specific code and can share the base Session class
|
||||||
* aside TabSession.
|
* aside TabSession.
|
||||||
*/
|
*/
|
||||||
class MainProcessSession extends Session {}
|
export class MainProcessSession extends Session {}
|
||||||
|
|
@ -2,21 +2,14 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["Session"];
|
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
DomainCache: "chrome://remote/content/cdp/domains/DomainCache.jsm",
|
DomainCache: "chrome://remote/content/cdp/domains/DomainCache.sys.mjs",
|
||||||
NetworkObserver: "chrome://remote/content/cdp/observers/NetworkObserver.jsm",
|
NetworkObserver:
|
||||||
|
"chrome://remote/content/cdp/observers/NetworkObserver.sys.mjs",
|
||||||
ParentProcessDomains:
|
ParentProcessDomains:
|
||||||
"chrome://remote/content/cdp/domains/ParentProcessDomains.jsm",
|
"chrome://remote/content/cdp/domains/ParentProcessDomains.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -32,7 +25,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
* will have a `sessionId` attribute in order to filter the packets
|
* will have a `sessionId` attribute in order to filter the packets
|
||||||
* by session both on client and server side.
|
* by session both on client and server side.
|
||||||
*/
|
*/
|
||||||
class Session {
|
export class Session {
|
||||||
/**
|
/**
|
||||||
* @param Connection connection
|
* @param Connection connection
|
||||||
* The connection used to communicate with the server.
|
* The connection used to communicate with the server.
|
||||||
|
|
@ -2,18 +2,12 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { Session } from "chrome://remote/content/cdp/sessions/Session.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["TabSession"];
|
|
||||||
|
|
||||||
const { Session } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/sessions/Session.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A session to communicate with a given tab
|
* A session to communicate with a given tab
|
||||||
*/
|
*/
|
||||||
class TabSession extends Session {
|
export class TabSession extends Session {
|
||||||
/**
|
/**
|
||||||
* @param Connection connection
|
* @param Connection connection
|
||||||
* The connection used to communicate with the server.
|
* The connection used to communicate with the server.
|
||||||
|
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { ContentProcessSession } = ChromeUtils.import(
|
const { ContentProcessSession } = ChromeUtils.importESModule(
|
||||||
"chrome://remote/content/cdp/sessions/ContentProcessSession.jsm"
|
"chrome://remote/content/cdp/sessions/ContentProcessSession.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
new ContentProcessSession(this, docShell.browsingContext, content, docShell);
|
new ContentProcessSession(this, docShell.browsingContext, content, docShell);
|
||||||
|
|
|
||||||
|
|
@ -2,27 +2,14 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { Target } from "chrome://remote/content/cdp/targets/Target.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["MainProcessTarget"];
|
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const { Target } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/targets/Target.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
RemoteAgent: "chrome://remote/content/components/RemoteAgent.sys.mjs",
|
|
||||||
});
|
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|
||||||
MainProcessSession:
|
MainProcessSession:
|
||||||
"chrome://remote/content/cdp/sessions/MainProcessSession.jsm",
|
"chrome://remote/content/cdp/sessions/MainProcessSession.sys.mjs",
|
||||||
|
RemoteAgent: "chrome://remote/content/components/RemoteAgent.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -31,7 +18,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
* Matches BrowserDevToolsAgentHost from chromium, and only support a couple of Domains:
|
* Matches BrowserDevToolsAgentHost from chromium, and only support a couple of Domains:
|
||||||
* https://cs.chromium.org/chromium/src/content/browser/devtools/browser_devtools_agent_host.cc?dr=CSs&g=0&l=80-91
|
* https://cs.chromium.org/chromium/src/content/browser/devtools/browser_devtools_agent_host.cc?dr=CSs&g=0&l=80-91
|
||||||
*/
|
*/
|
||||||
class MainProcessTarget extends Target {
|
export class MainProcessTarget extends Target {
|
||||||
/*
|
/*
|
||||||
* @param TargetList targetList
|
* @param TargetList targetList
|
||||||
*/
|
*/
|
||||||
|
|
@ -2,27 +2,16 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["TabTarget"];
|
import { Target } from "chrome://remote/content/cdp/targets/Target.sys.mjs";
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const { Target } = ChromeUtils.import(
|
|
||||||
"chrome://remote/content/cdp/targets/Target.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
RemoteAgent: "chrome://remote/content/components/RemoteAgent.sys.mjs",
|
RemoteAgent: "chrome://remote/content/components/RemoteAgent.sys.mjs",
|
||||||
TabManager: "chrome://remote/content/shared/TabManager.sys.mjs",
|
TabManager: "chrome://remote/content/shared/TabManager.sys.mjs",
|
||||||
});
|
TabSession: "chrome://remote/content/cdp/sessions/TabSession.sys.mjs",
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|
||||||
TabSession: "chrome://remote/content/cdp/sessions/TabSession.jsm",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyServiceGetter(
|
XPCOMUtils.defineLazyServiceGetter(
|
||||||
|
|
@ -35,7 +24,7 @@ XPCOMUtils.defineLazyServiceGetter(
|
||||||
/**
|
/**
|
||||||
* Target for a local tab or a remoted frame.
|
* Target for a local tab or a remoted frame.
|
||||||
*/
|
*/
|
||||||
class TabTarget extends Target {
|
export class TabTarget extends Target {
|
||||||
/**
|
/**
|
||||||
* @param TargetList targetList
|
* @param TargetList targetList
|
||||||
* @param BrowserElement browser
|
* @param BrowserElement browser
|
||||||
|
|
@ -2,29 +2,18 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["Target"];
|
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
|
CDPConnection: "chrome://remote/content/cdp/CDPConnection.sys.mjs",
|
||||||
WebSocketHandshake:
|
WebSocketHandshake:
|
||||||
"chrome://remote/content/server/WebSocketHandshake.sys.mjs",
|
"chrome://remote/content/server/WebSocketHandshake.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
|
||||||
CDPConnection: "chrome://remote/content/cdp/CDPConnection.jsm",
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class for all the targets.
|
* Base class for all the targets.
|
||||||
*/
|
*/
|
||||||
class Target {
|
export class Target {
|
||||||
/**
|
/**
|
||||||
* @param TargetList targetList
|
* @param TargetList targetList
|
||||||
* @param Class sessionClass
|
* @param Class sessionClass
|
||||||
|
|
@ -2,30 +2,23 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["TargetList"];
|
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
|
MainProcessTarget:
|
||||||
|
"chrome://remote/content/cdp/targets/MainProcessTarget.sys.mjs",
|
||||||
TabManager: "chrome://remote/content/shared/TabManager.sys.mjs",
|
TabManager: "chrome://remote/content/shared/TabManager.sys.mjs",
|
||||||
|
TabObserver: "chrome://remote/content/cdp/observers/TargetObserver.sys.mjs",
|
||||||
|
TabTarget: "chrome://remote/content/cdp/targets/TabTarget.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
EventEmitter: "resource://gre/modules/EventEmitter.jsm",
|
EventEmitter: "resource://gre/modules/EventEmitter.jsm",
|
||||||
|
|
||||||
MainProcessTarget:
|
|
||||||
"chrome://remote/content/cdp/targets/MainProcessTarget.jsm",
|
|
||||||
TabObserver: "chrome://remote/content/cdp/observers/TargetObserver.jsm",
|
|
||||||
TabTarget: "chrome://remote/content/cdp/targets/TabTarget.jsm",
|
|
||||||
});
|
});
|
||||||
|
|
||||||
class TargetList {
|
export class TargetList {
|
||||||
constructor() {
|
constructor() {
|
||||||
// Target ID -> Target
|
// Target ID -> Target
|
||||||
this._targets = new Map();
|
this._targets = new Map();
|
||||||
|
|
@ -8,8 +8,8 @@ const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm");
|
||||||
const { RemoteAgent } = ChromeUtils.importESModule(
|
const { RemoteAgent } = ChromeUtils.importESModule(
|
||||||
"chrome://remote/content/components/RemoteAgent.sys.mjs"
|
"chrome://remote/content/components/RemoteAgent.sys.mjs"
|
||||||
);
|
);
|
||||||
const { RemoteAgentError } = ChromeUtils.import(
|
const { RemoteAgentError } = ChromeUtils.importESModule(
|
||||||
"chrome://remote/content/cdp/Error.jsm"
|
"chrome://remote/content/cdp/Error.sys.mjs"
|
||||||
);
|
);
|
||||||
const { TabManager } = ChromeUtils.importESModule(
|
const { TabManager } = ChromeUtils.importESModule(
|
||||||
"chrome://remote/content/shared/TabManager.sys.mjs"
|
"chrome://remote/content/shared/TabManager.sys.mjs"
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ Services.scriptloader.loadSubScript(
|
||||||
this
|
this
|
||||||
);
|
);
|
||||||
|
|
||||||
const { Input: I } = ChromeUtils.import(
|
const { Input: I } = ChromeUtils.importESModule(
|
||||||
"chrome://remote/content/cdp/domains/parent/Input.jsm"
|
"chrome://remote/content/cdp/domains/parent/Input.sys.mjs"
|
||||||
);
|
);
|
||||||
const { AppInfo } = ChromeUtils.importESModule(
|
const { AppInfo } = ChromeUtils.importESModule(
|
||||||
"chrome://remote/content/shared/AppInfo.sys.mjs"
|
"chrome://remote/content/shared/AppInfo.sys.mjs"
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ Services.scriptloader.loadSubScript(
|
||||||
this
|
this
|
||||||
);
|
);
|
||||||
|
|
||||||
const { streamRegistry } = ChromeUtils.import(
|
const { streamRegistry } = ChromeUtils.importESModule(
|
||||||
"chrome://remote/content/cdp/domains/parent/IO.jsm"
|
"chrome://remote/content/cdp/domains/parent/IO.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
async function registerFileStream(contents, options = {}) {
|
async function registerFileStream(contents, options = {}) {
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { splitMethod } = ChromeUtils.import(
|
const { splitMethod } = ChromeUtils.importESModule(
|
||||||
"chrome://remote/content/cdp/CDPConnection.jsm"
|
"chrome://remote/content/cdp/CDPConnection.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
add_test(function test_Connection_splitMethod() {
|
add_test(function test_Connection_splitMethod() {
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,11 @@
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { Domain } = ChromeUtils.import(
|
const { Domain } = ChromeUtils.importESModule(
|
||||||
"chrome://remote/content/cdp/domains/Domain.jsm"
|
"chrome://remote/content/cdp/domains/Domain.sys.mjs"
|
||||||
);
|
);
|
||||||
const { DomainCache } = ChromeUtils.import(
|
const { DomainCache } = ChromeUtils.importESModule(
|
||||||
"chrome://remote/content/cdp/domains/DomainCache.jsm"
|
"chrome://remote/content/cdp/domains/DomainCache.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
class MockSession {
|
class MockSession {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ const {
|
||||||
RemoteAgentError,
|
RemoteAgentError,
|
||||||
UnknownMethodError,
|
UnknownMethodError,
|
||||||
UnsupportedError,
|
UnsupportedError,
|
||||||
} = ChromeUtils.import("chrome://remote/content/cdp/Error.jsm");
|
} = ChromeUtils.importESModule("chrome://remote/content/cdp/Error.sys.mjs");
|
||||||
|
|
||||||
add_test(function test_RemoteAgentError_ctor() {
|
add_test(function test_RemoteAgentError_ctor() {
|
||||||
const e1 = new RemoteAgentError();
|
const e1 = new RemoteAgentError();
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { Session } = ChromeUtils.import(
|
const { Session } = ChromeUtils.importESModule(
|
||||||
"chrome://remote/content/cdp/sessions/Session.jsm"
|
"chrome://remote/content/cdp/sessions/Session.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
const connection = {
|
const connection = {
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
|
|
||||||
const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm");
|
const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm");
|
||||||
|
|
||||||
const { StreamRegistry } = ChromeUtils.import(
|
const { StreamRegistry } = ChromeUtils.importESModule(
|
||||||
"chrome://remote/content/cdp/StreamRegistry.jsm"
|
"chrome://remote/content/cdp/StreamRegistry.sys.mjs"
|
||||||
);
|
);
|
||||||
|
|
||||||
add_test(function test_constructor() {
|
add_test(function test_constructor() {
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,13 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
const lazy = {};
|
const lazy = {};
|
||||||
|
|
||||||
ChromeUtils.defineESModuleGetters(lazy, {
|
ChromeUtils.defineESModuleGetters(lazy, {
|
||||||
|
CDP: "chrome://remote/content/cdp/CDP.sys.mjs",
|
||||||
Deferred: "chrome://remote/content/shared/Sync.sys.mjs",
|
Deferred: "chrome://remote/content/shared/Sync.sys.mjs",
|
||||||
Log: "chrome://remote/content/shared/Log.sys.mjs",
|
Log: "chrome://remote/content/shared/Log.sys.mjs",
|
||||||
WebDriverBiDi: "chrome://remote/content/webdriver-bidi/WebDriverBiDi.sys.mjs",
|
WebDriverBiDi: "chrome://remote/content/webdriver-bidi/WebDriverBiDi.sys.mjs",
|
||||||
});
|
});
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||||
CDP: "chrome://remote/content/cdp/CDP.jsm",
|
|
||||||
HttpServer: "chrome://remote/content/server/HTTPD.jsm",
|
HttpServer: "chrome://remote/content/server/HTTPD.jsm",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,88 +41,6 @@
|
||||||
"browser/components/pocket/content/pktApi.jsm",
|
"browser/components/pocket/content/pktApi.jsm",
|
||||||
"chrome://pocket/content/pktTelemetry.jsm":
|
"chrome://pocket/content/pktTelemetry.jsm":
|
||||||
"browser/components/pocket/content/pktTelemetry.jsm",
|
"browser/components/pocket/content/pktTelemetry.jsm",
|
||||||
"chrome://remote/content/cdp/CDP.jsm": "remote/cdp/CDP.jsm",
|
|
||||||
"chrome://remote/content/cdp/CDPConnection.jsm":
|
|
||||||
"remote/cdp/CDPConnection.jsm",
|
|
||||||
"chrome://remote/content/cdp/Error.jsm": "remote/cdp/Error.jsm",
|
|
||||||
"chrome://remote/content/cdp/JSONHandler.jsm": "remote/cdp/JSONHandler.jsm",
|
|
||||||
"chrome://remote/content/cdp/Protocol.jsm": "remote/cdp/Protocol.jsm",
|
|
||||||
"chrome://remote/content/cdp/StreamRegistry.jsm":
|
|
||||||
"remote/cdp/StreamRegistry.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/ContentProcessDomain.jsm":
|
|
||||||
"remote/cdp/domains/ContentProcessDomain.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/ContentProcessDomains.jsm":
|
|
||||||
"remote/cdp/domains/ContentProcessDomains.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/Domain.jsm":
|
|
||||||
"remote/cdp/domains/Domain.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/DomainCache.jsm":
|
|
||||||
"remote/cdp/domains/DomainCache.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/ParentProcessDomains.jsm":
|
|
||||||
"remote/cdp/domains/ParentProcessDomains.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/content/DOM.jsm":
|
|
||||||
"remote/cdp/domains/content/DOM.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/content/Emulation.jsm":
|
|
||||||
"remote/cdp/domains/content/Emulation.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/content/Input.jsm":
|
|
||||||
"remote/cdp/domains/content/Input.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/content/Log.jsm":
|
|
||||||
"remote/cdp/domains/content/Log.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/content/Network.jsm":
|
|
||||||
"remote/cdp/domains/content/Network.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/content/Page.jsm":
|
|
||||||
"remote/cdp/domains/content/Page.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/content/Performance.jsm":
|
|
||||||
"remote/cdp/domains/content/Performance.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/content/Runtime.jsm":
|
|
||||||
"remote/cdp/domains/content/Runtime.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/content/Security.jsm":
|
|
||||||
"remote/cdp/domains/content/Security.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/content/runtime/ExecutionContext.jsm":
|
|
||||||
"remote/cdp/domains/content/runtime/ExecutionContext.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/parent/Browser.jsm":
|
|
||||||
"remote/cdp/domains/parent/Browser.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/parent/Emulation.jsm":
|
|
||||||
"remote/cdp/domains/parent/Emulation.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/parent/Fetch.jsm":
|
|
||||||
"remote/cdp/domains/parent/Fetch.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/parent/IO.jsm":
|
|
||||||
"remote/cdp/domains/parent/IO.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/parent/Input.jsm":
|
|
||||||
"remote/cdp/domains/parent/Input.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/parent/Network.jsm":
|
|
||||||
"remote/cdp/domains/parent/Network.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/parent/Page.jsm":
|
|
||||||
"remote/cdp/domains/parent/Page.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/parent/Security.jsm":
|
|
||||||
"remote/cdp/domains/parent/Security.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/parent/Target.jsm":
|
|
||||||
"remote/cdp/domains/parent/Target.jsm",
|
|
||||||
"chrome://remote/content/cdp/domains/parent/page/DialogHandler.jsm":
|
|
||||||
"remote/cdp/domains/parent/page/DialogHandler.jsm",
|
|
||||||
"chrome://remote/content/cdp/observers/ChannelEventSink.jsm":
|
|
||||||
"remote/cdp/observers/ChannelEventSink.jsm",
|
|
||||||
"chrome://remote/content/cdp/observers/ContextObserver.jsm":
|
|
||||||
"remote/cdp/observers/ContextObserver.jsm",
|
|
||||||
"chrome://remote/content/cdp/observers/NetworkObserver.jsm":
|
|
||||||
"remote/cdp/observers/NetworkObserver.jsm",
|
|
||||||
"chrome://remote/content/cdp/observers/TargetObserver.jsm":
|
|
||||||
"remote/cdp/observers/TargetObserver.jsm",
|
|
||||||
"chrome://remote/content/cdp/sessions/ContentProcessSession.jsm":
|
|
||||||
"remote/cdp/sessions/ContentProcessSession.jsm",
|
|
||||||
"chrome://remote/content/cdp/sessions/MainProcessSession.jsm":
|
|
||||||
"remote/cdp/sessions/MainProcessSession.jsm",
|
|
||||||
"chrome://remote/content/cdp/sessions/Session.jsm":
|
|
||||||
"remote/cdp/sessions/Session.jsm",
|
|
||||||
"chrome://remote/content/cdp/sessions/TabSession.jsm":
|
|
||||||
"remote/cdp/sessions/TabSession.jsm",
|
|
||||||
"chrome://remote/content/cdp/targets/MainProcessTarget.jsm":
|
|
||||||
"remote/cdp/targets/MainProcessTarget.jsm",
|
|
||||||
"chrome://remote/content/cdp/targets/TabTarget.jsm":
|
|
||||||
"remote/cdp/targets/TabTarget.jsm",
|
|
||||||
"chrome://remote/content/cdp/targets/Target.jsm":
|
|
||||||
"remote/cdp/targets/Target.jsm",
|
|
||||||
"chrome://remote/content/cdp/targets/TargetList.jsm":
|
|
||||||
"remote/cdp/targets/TargetList.jsm",
|
|
||||||
"resource:///actors/ASRouterChild.jsm":
|
"resource:///actors/ASRouterChild.jsm":
|
||||||
"browser/components/newtab/actors/ASRouterChild.jsm",
|
"browser/components/newtab/actors/ASRouterChild.jsm",
|
||||||
"resource:///actors/ASRouterParent.jsm":
|
"resource:///actors/ASRouterParent.jsm":
|
||||||
|
|
|
||||||
|
|
@ -268,7 +268,7 @@ avoid-blacklist-and-whitelist:
|
||||||
- python/mozbuild/mozbuild/configure/options.py
|
- python/mozbuild/mozbuild/configure/options.py
|
||||||
- python/mozbuild/mozbuild/vendor/moz_yaml.py
|
- python/mozbuild/mozbuild/vendor/moz_yaml.py
|
||||||
- python/mozbuild/mozbuild/vendor/vendor_rust.py
|
- python/mozbuild/mozbuild/vendor/vendor_rust.py
|
||||||
- remote/cdp/Protocol.jsm
|
- remote/cdp/Protocol.sys.mjs
|
||||||
- security/certverifier/NSSCertDBTrustDomain.cpp
|
- security/certverifier/NSSCertDBTrustDomain.cpp
|
||||||
- security/certverifier/TrustOverrideUtils.h
|
- security/certverifier/TrustOverrideUtils.h
|
||||||
- security/manager/ssl/DataStorageList.h
|
- security/manager/ssl/DataStorageList.h
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue