forked from mirrors/gecko-dev
Bug 1690474 - [remote] Move CDP specific code to cdp/. r=remote-protocol-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D104574
This commit is contained in:
parent
ec7ae63ad0
commit
8cb90829cc
59 changed files with 207 additions and 204 deletions
|
|
@ -158,7 +158,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/Protocol.jsm
|
remote/cdp/Protocol.jsm
|
||||||
remote/test/browser/chrome-remote-interface.js
|
remote/test/browser/chrome-remote-interface.js
|
||||||
|
|
||||||
# services/ exclusions
|
# services/ exclusions
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ const { truncate } = ChromeUtils.import(
|
||||||
);
|
);
|
||||||
const { Log } = ChromeUtils.import("chrome://remote/content/shared/Log.jsm");
|
const { Log } = ChromeUtils.import("chrome://remote/content/shared/Log.jsm");
|
||||||
const { UnknownMethodError } = ChromeUtils.import(
|
const { UnknownMethodError } = ChromeUtils.import(
|
||||||
"chrome://remote/content/Error.jsm"
|
"chrome://remote/content/cdp/Error.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
XPCOMUtils.defineLazyGetter(this, "log", Log.get);
|
XPCOMUtils.defineLazyGetter(this, "log", Log.get);
|
||||||
|
|
@ -51,8 +51,8 @@ class RemoteAgentError extends Error {
|
||||||
* The error must be of this form:
|
* The error must be of this form:
|
||||||
*
|
*
|
||||||
* {"message": "TypeError: foo is not a function\n
|
* {"message": "TypeError: foo is not a function\n
|
||||||
* execute@chrome://remote/content/sessions/Session.jsm:73:39\n
|
* execute@chrome://remote/content/cdp/sessions/Session.jsm:73:39\n
|
||||||
* onMessage@chrome://remote/content/sessions/TabSession.jsm:65:20"}
|
* onMessage@chrome://remote/content/cdp/sessions/TabSession.jsm:65:20"}
|
||||||
*
|
*
|
||||||
* This approach has the notable deficiency that it cannot deal
|
* This approach has the notable deficiency that it cannot deal
|
||||||
* with causes to errors because of the unstructured nature of CDP
|
* with causes to errors because of the unstructured nature of CDP
|
||||||
|
|
@ -12,9 +12,11 @@ const { HTTP_404, HTTP_505 } = ChromeUtils.import(
|
||||||
"chrome://remote/content/server/HTTPD.jsm"
|
"chrome://remote/content/server/HTTPD.jsm"
|
||||||
);
|
);
|
||||||
const { Log } = ChromeUtils.import("chrome://remote/content/shared/Log.jsm");
|
const { Log } = ChromeUtils.import("chrome://remote/content/shared/Log.jsm");
|
||||||
const { Protocol } = ChromeUtils.import("chrome://remote/content/Protocol.jsm");
|
const { Protocol } = ChromeUtils.import(
|
||||||
|
"chrome://remote/content/cdp/Protocol.jsm"
|
||||||
|
);
|
||||||
const { RemoteAgentError } = ChromeUtils.import(
|
const { RemoteAgentError } = ChromeUtils.import(
|
||||||
"chrome://remote/content/Error.jsm"
|
"chrome://remote/content/cdp/Error.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
class JSONHandler {
|
class JSONHandler {
|
||||||
|
|
@ -20,7 +20,7 @@ XPCOMUtils.defineLazyServiceGetters(this, {
|
||||||
});
|
});
|
||||||
|
|
||||||
const { UnsupportedError } = ChromeUtils.import(
|
const { UnsupportedError } = ChromeUtils.import(
|
||||||
"chrome://remote/content/Error.jsm"
|
"chrome://remote/content/cdp/Error.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
class StreamRegistry {
|
class StreamRegistry {
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
var EXPORTED_SYMBOLS = ["ContentProcessDomain"];
|
var EXPORTED_SYMBOLS = ["ContentProcessDomain"];
|
||||||
|
|
||||||
const { Domain } = ChromeUtils.import(
|
const { Domain } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/Domain.jsm"
|
"chrome://remote/content/cdp/domains/Domain.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
class ContentProcessDomain extends Domain {
|
class ContentProcessDomain extends Domain {
|
||||||
25
remote/cdp/domains/ContentProcessDomains.jsm
Normal file
25
remote/cdp/domains/ContentProcessDomains.jsm
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
/* 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.import(
|
||||||
|
"resource://gre/modules/XPCOMUtils.jsm"
|
||||||
|
);
|
||||||
|
|
||||||
|
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",
|
||||||
|
});
|
||||||
|
|
@ -7,10 +7,10 @@
|
||||||
var EXPORTED_SYMBOLS = ["DomainCache"];
|
var EXPORTED_SYMBOLS = ["DomainCache"];
|
||||||
|
|
||||||
const { Domain } = ChromeUtils.import(
|
const { Domain } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/Domain.jsm"
|
"chrome://remote/content/cdp/domains/Domain.jsm"
|
||||||
);
|
);
|
||||||
const { UnknownMethodError } = ChromeUtils.import(
|
const { UnknownMethodError } = ChromeUtils.import(
|
||||||
"chrome://remote/content/Error.jsm"
|
"chrome://remote/content/cdp/Error.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
24
remote/cdp/domains/ParentProcessDomains.jsm
Normal file
24
remote/cdp/domains/ParentProcessDomains.jsm
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
/* 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.import(
|
||||||
|
"resource://gre/modules/XPCOMUtils.jsm"
|
||||||
|
);
|
||||||
|
|
||||||
|
const ParentProcessDomains = {};
|
||||||
|
|
||||||
|
XPCOMUtils.defineLazyModuleGetters(ParentProcessDomains, {
|
||||||
|
Browser: "chrome://remote/content/cdp/domains/parent/Browser.jsm",
|
||||||
|
Emulation: "chrome://remote/content/cdp/domains/parent/Emulation.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",
|
||||||
|
});
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
var EXPORTED_SYMBOLS = ["DOM"];
|
var EXPORTED_SYMBOLS = ["DOM"];
|
||||||
|
|
||||||
const { ContentProcessDomain } = ChromeUtils.import(
|
const { ContentProcessDomain } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/ContentProcessDomain.jsm"
|
"chrome://remote/content/cdp/domains/ContentProcessDomain.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
class DOM extends ContentProcessDomain {
|
class DOM extends ContentProcessDomain {
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
var EXPORTED_SYMBOLS = ["Emulation"];
|
var EXPORTED_SYMBOLS = ["Emulation"];
|
||||||
|
|
||||||
const { ContentProcessDomain } = ChromeUtils.import(
|
const { ContentProcessDomain } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/ContentProcessDomain.jsm"
|
"chrome://remote/content/cdp/domains/ContentProcessDomain.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
class Emulation extends ContentProcessDomain {
|
class Emulation extends ContentProcessDomain {
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
var EXPORTED_SYMBOLS = ["Input"];
|
var EXPORTED_SYMBOLS = ["Input"];
|
||||||
|
|
||||||
const { ContentProcessDomain } = ChromeUtils.import(
|
const { ContentProcessDomain } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/ContentProcessDomain.jsm"
|
"chrome://remote/content/cdp/domains/ContentProcessDomain.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
class Input extends ContentProcessDomain {
|
class Input extends ContentProcessDomain {
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
var EXPORTED_SYMBOLS = ["Log"];
|
var EXPORTED_SYMBOLS = ["Log"];
|
||||||
|
|
||||||
const { ContentProcessDomain } = ChromeUtils.import(
|
const { ContentProcessDomain } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/ContentProcessDomain.jsm"
|
"chrome://remote/content/cdp/domains/ContentProcessDomain.jsm"
|
||||||
);
|
);
|
||||||
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
var EXPORTED_SYMBOLS = ["Network"];
|
var EXPORTED_SYMBOLS = ["Network"];
|
||||||
|
|
||||||
const { ContentProcessDomain } = ChromeUtils.import(
|
const { ContentProcessDomain } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/ContentProcessDomain.jsm"
|
"chrome://remote/content/cdp/domains/ContentProcessDomain.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
class Network extends ContentProcessDomain {
|
class Network extends ContentProcessDomain {
|
||||||
|
|
@ -11,7 +11,7 @@ const { XPCOMUtils } = ChromeUtils.import(
|
||||||
);
|
);
|
||||||
|
|
||||||
const { ContentProcessDomain } = ChromeUtils.import(
|
const { ContentProcessDomain } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/ContentProcessDomain.jsm"
|
"chrome://remote/content/cdp/domains/ContentProcessDomain.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
XPCOMUtils.defineLazyServiceGetter(
|
XPCOMUtils.defineLazyServiceGetter(
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
var EXPORTED_SYMBOLS = ["Performance"];
|
var EXPORTED_SYMBOLS = ["Performance"];
|
||||||
|
|
||||||
const { ContentProcessDomain } = ChromeUtils.import(
|
const { ContentProcessDomain } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/ContentProcessDomain.jsm"
|
"chrome://remote/content/cdp/domains/ContentProcessDomain.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
class Performance extends ContentProcessDomain {
|
class Performance extends ContentProcessDomain {
|
||||||
|
|
@ -13,10 +13,10 @@ const { addDebuggerToGlobal } = ChromeUtils.import(
|
||||||
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
|
|
||||||
const { ContentProcessDomain } = ChromeUtils.import(
|
const { ContentProcessDomain } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/ContentProcessDomain.jsm"
|
"chrome://remote/content/cdp/domains/ContentProcessDomain.jsm"
|
||||||
);
|
);
|
||||||
const { ExecutionContext } = ChromeUtils.import(
|
const { ExecutionContext } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/content/runtime/ExecutionContext.jsm"
|
"chrome://remote/content/cdp/domains/content/runtime/ExecutionContext.jsm"
|
||||||
);
|
);
|
||||||
const { executeSoon } = ChromeUtils.import(
|
const { executeSoon } = ChromeUtils.import(
|
||||||
"chrome://remote/content/shared/Sync.jsm"
|
"chrome://remote/content/shared/Sync.jsm"
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
var EXPORTED_SYMBOLS = ["Security"];
|
var EXPORTED_SYMBOLS = ["Security"];
|
||||||
|
|
||||||
const { ContentProcessDomain } = ChromeUtils.import(
|
const { ContentProcessDomain } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/ContentProcessDomain.jsm"
|
"chrome://remote/content/cdp/domains/ContentProcessDomain.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
class Security extends ContentProcessDomain {
|
class Security extends ContentProcessDomain {
|
||||||
|
|
@ -8,7 +8,7 @@ var EXPORTED_SYMBOLS = ["Browser"];
|
||||||
|
|
||||||
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
const { Domain } = ChromeUtils.import(
|
const { Domain } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/Domain.jsm"
|
"chrome://remote/content/cdp/domains/Domain.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
class Browser extends Domain {
|
class Browser extends Domain {
|
||||||
|
|
@ -9,7 +9,7 @@ var EXPORTED_SYMBOLS = ["Emulation"];
|
||||||
const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||||
|
|
||||||
const { Domain } = ChromeUtils.import(
|
const { Domain } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/Domain.jsm"
|
"chrome://remote/content/cdp/domains/Domain.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
const MAX_WINDOW_SIZE = 10000000;
|
const MAX_WINDOW_SIZE = 10000000;
|
||||||
|
|
@ -15,10 +15,10 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
||||||
});
|
});
|
||||||
|
|
||||||
const { Domain } = ChromeUtils.import(
|
const { Domain } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/Domain.jsm"
|
"chrome://remote/content/cdp/domains/Domain.jsm"
|
||||||
);
|
);
|
||||||
const { StreamRegistry } = ChromeUtils.import(
|
const { StreamRegistry } = ChromeUtils.import(
|
||||||
"chrome://remote/content/StreamRegistry.jsm"
|
"chrome://remote/content/cdp/StreamRegistry.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
const DEFAULT_CHUNK_SIZE = 10 * 1024 * 1024;
|
const DEFAULT_CHUNK_SIZE = 10 * 1024 * 1024;
|
||||||
|
|
@ -9,7 +9,7 @@ var EXPORTED_SYMBOLS = ["Input"];
|
||||||
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
|
|
||||||
const { Domain } = ChromeUtils.import(
|
const { Domain } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/Domain.jsm"
|
"chrome://remote/content/cdp/domains/Domain.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
class Input extends Domain {
|
class Input extends Domain {
|
||||||
|
|
@ -15,7 +15,7 @@ const { XPCOMUtils } = ChromeUtils.import(
|
||||||
XPCOMUtils.defineLazyGlobalGetters(this, ["URL"]);
|
XPCOMUtils.defineLazyGlobalGetters(this, ["URL"]);
|
||||||
|
|
||||||
const { Domain } = ChromeUtils.import(
|
const { Domain } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/Domain.jsm"
|
"chrome://remote/content/cdp/domains/Domain.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
const MAX_COOKIE_EXPIRY = Number.MAX_SAFE_INTEGER;
|
const MAX_COOKIE_EXPIRY = Number.MAX_SAFE_INTEGER;
|
||||||
|
|
@ -22,16 +22,16 @@ const { clearInterval, setInterval } = ChromeUtils.import(
|
||||||
);
|
);
|
||||||
|
|
||||||
const { DialogHandler } = ChromeUtils.import(
|
const { DialogHandler } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/parent/page/DialogHandler.jsm"
|
"chrome://remote/content/cdp/domains/parent/page/DialogHandler.jsm"
|
||||||
);
|
);
|
||||||
const { Domain } = ChromeUtils.import(
|
const { Domain } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/Domain.jsm"
|
"chrome://remote/content/cdp/domains/Domain.jsm"
|
||||||
);
|
);
|
||||||
const { UnsupportedError } = ChromeUtils.import(
|
const { UnsupportedError } = ChromeUtils.import(
|
||||||
"chrome://remote/content/Error.jsm"
|
"chrome://remote/content/cdp/Error.jsm"
|
||||||
);
|
);
|
||||||
const { streamRegistry } = ChromeUtils.import(
|
const { streamRegistry } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/parent/IO.jsm"
|
"chrome://remote/content/cdp/domains/parent/IO.jsm"
|
||||||
);
|
);
|
||||||
const { PollPromise } = ChromeUtils.import(
|
const { PollPromise } = ChromeUtils.import(
|
||||||
"chrome://remote/content/shared/Sync.jsm"
|
"chrome://remote/content/shared/Sync.jsm"
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
var EXPORTED_SYMBOLS = ["Security"];
|
var EXPORTED_SYMBOLS = ["Security"];
|
||||||
|
|
||||||
const { Domain } = ChromeUtils.import(
|
const { Domain } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/Domain.jsm"
|
"chrome://remote/content/cdp/domains/Domain.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
const { Preferences } = ChromeUtils.import(
|
const { Preferences } = ChromeUtils.import(
|
||||||
|
|
@ -20,16 +20,16 @@ const { ContextualIdentityService } = ChromeUtils.import(
|
||||||
"resource://gre/modules/ContextualIdentityService.jsm"
|
"resource://gre/modules/ContextualIdentityService.jsm"
|
||||||
);
|
);
|
||||||
const { Domain } = ChromeUtils.import(
|
const { Domain } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/Domain.jsm"
|
"chrome://remote/content/cdp/domains/Domain.jsm"
|
||||||
);
|
);
|
||||||
const { MainProcessTarget } = ChromeUtils.import(
|
const { MainProcessTarget } = ChromeUtils.import(
|
||||||
"chrome://remote/content/targets/MainProcessTarget.jsm"
|
"chrome://remote/content/cdp/targets/MainProcessTarget.jsm"
|
||||||
);
|
);
|
||||||
const { TabManager } = ChromeUtils.import(
|
const { TabManager } = ChromeUtils.import(
|
||||||
"chrome://remote/content/shared/TabManager.jsm"
|
"chrome://remote/content/shared/TabManager.jsm"
|
||||||
);
|
);
|
||||||
const { TabSession } = ChromeUtils.import(
|
const { TabSession } = ChromeUtils.import(
|
||||||
"chrome://remote/content/sessions/TabSession.jsm"
|
"chrome://remote/content/cdp/sessions/TabSession.jsm"
|
||||||
);
|
);
|
||||||
const { WindowManager } = ChromeUtils.import(
|
const { WindowManager } = ChromeUtils.import(
|
||||||
"chrome://remote/content/shared/WindowManager.jsm"
|
"chrome://remote/content/shared/WindowManager.jsm"
|
||||||
|
|
@ -16,7 +16,7 @@ const { CommonUtils } = ChromeUtils.import(
|
||||||
"resource://services-common/utils.js"
|
"resource://services-common/utils.js"
|
||||||
);
|
);
|
||||||
const { ChannelEventSinkFactory } = ChromeUtils.import(
|
const { ChannelEventSinkFactory } = ChromeUtils.import(
|
||||||
"chrome://remote/content/observers/ChannelEventSink.jsm"
|
"chrome://remote/content/cdp/observers/ChannelEventSink.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
const CC = Components.Constructor;
|
const CC = Components.Constructor;
|
||||||
|
|
@ -7,16 +7,16 @@
|
||||||
var EXPORTED_SYMBOLS = ["ContentProcessSession"];
|
var EXPORTED_SYMBOLS = ["ContentProcessSession"];
|
||||||
|
|
||||||
const { ContentProcessDomains } = ChromeUtils.import(
|
const { ContentProcessDomains } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/ContentProcessDomains.jsm"
|
"chrome://remote/content/cdp/domains/ContentProcessDomains.jsm"
|
||||||
);
|
);
|
||||||
const { DomainCache } = ChromeUtils.import(
|
const { DomainCache } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/DomainCache.jsm"
|
"chrome://remote/content/cdp/domains/DomainCache.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
ChromeUtils.defineModuleGetter(
|
ChromeUtils.defineModuleGetter(
|
||||||
this,
|
this,
|
||||||
"ContextObserver",
|
"ContextObserver",
|
||||||
"chrome://remote/content/observers/ContextObserver.jsm"
|
"chrome://remote/content/cdp/observers/ContextObserver.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
class ContentProcessSession {
|
class ContentProcessSession {
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
var EXPORTED_SYMBOLS = ["MainProcessSession"];
|
var EXPORTED_SYMBOLS = ["MainProcessSession"];
|
||||||
|
|
||||||
const { Session } = ChromeUtils.import(
|
const { Session } = ChromeUtils.import(
|
||||||
"chrome://remote/content/sessions/Session.jsm"
|
"chrome://remote/content/cdp/sessions/Session.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -7,14 +7,14 @@
|
||||||
var EXPORTED_SYMBOLS = ["Session"];
|
var EXPORTED_SYMBOLS = ["Session"];
|
||||||
|
|
||||||
const { ParentProcessDomains } = ChromeUtils.import(
|
const { ParentProcessDomains } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/ParentProcessDomains.jsm"
|
"chrome://remote/content/cdp/domains/ParentProcessDomains.jsm"
|
||||||
);
|
);
|
||||||
const { DomainCache } = ChromeUtils.import(
|
const { DomainCache } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/DomainCache.jsm"
|
"chrome://remote/content/cdp/domains/DomainCache.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
const { NetworkObserver } = ChromeUtils.import(
|
const { NetworkObserver } = ChromeUtils.import(
|
||||||
"chrome://remote/content/observers/NetworkObserver.jsm"
|
"chrome://remote/content/cdp/observers/NetworkObserver.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
var EXPORTED_SYMBOLS = ["TabSession"];
|
var EXPORTED_SYMBOLS = ["TabSession"];
|
||||||
|
|
||||||
const { Session } = ChromeUtils.import(
|
const { Session } = ChromeUtils.import(
|
||||||
"chrome://remote/content/sessions/Session.jsm"
|
"chrome://remote/content/cdp/sessions/Session.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -40,7 +40,7 @@ class TabSession extends Session {
|
||||||
this.mm.addMessageListener("remote:error", this);
|
this.mm.addMessageListener("remote:error", this);
|
||||||
|
|
||||||
this.mm.loadFrameScript(
|
this.mm.loadFrameScript(
|
||||||
"chrome://remote/content/sessions/frame-script.js",
|
"chrome://remote/content/cdp/sessions/frame-script.js",
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { ContentProcessSession } = ChromeUtils.import(
|
const { ContentProcessSession } = ChromeUtils.import(
|
||||||
"chrome://remote/content/sessions/ContentProcessSession.jsm"
|
"chrome://remote/content/cdp/sessions/ContentProcessSession.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
/* global content, docShell */
|
/* global content, docShell */
|
||||||
|
|
@ -7,10 +7,10 @@
|
||||||
var EXPORTED_SYMBOLS = ["MainProcessTarget"];
|
var EXPORTED_SYMBOLS = ["MainProcessTarget"];
|
||||||
|
|
||||||
const { Target } = ChromeUtils.import(
|
const { Target } = ChromeUtils.import(
|
||||||
"chrome://remote/content/targets/Target.jsm"
|
"chrome://remote/content/cdp/targets/Target.jsm"
|
||||||
);
|
);
|
||||||
const { MainProcessSession } = ChromeUtils.import(
|
const { MainProcessSession } = ChromeUtils.import(
|
||||||
"chrome://remote/content/sessions/MainProcessSession.jsm"
|
"chrome://remote/content/cdp/sessions/MainProcessSession.jsm"
|
||||||
);
|
);
|
||||||
const { RemoteAgent } = ChromeUtils.import(
|
const { RemoteAgent } = ChromeUtils.import(
|
||||||
"chrome://remote/content/components/RemoteAgent.jsm"
|
"chrome://remote/content/components/RemoteAgent.jsm"
|
||||||
|
|
@ -7,11 +7,11 @@
|
||||||
var EXPORTED_SYMBOLS = ["TabTarget"];
|
var EXPORTED_SYMBOLS = ["TabTarget"];
|
||||||
|
|
||||||
const { Target } = ChromeUtils.import(
|
const { Target } = ChromeUtils.import(
|
||||||
"chrome://remote/content/targets/Target.jsm"
|
"chrome://remote/content/cdp/targets/Target.jsm"
|
||||||
);
|
);
|
||||||
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
const { TabSession } = ChromeUtils.import(
|
const { TabSession } = ChromeUtils.import(
|
||||||
"chrome://remote/content/sessions/TabSession.jsm"
|
"chrome://remote/content/cdp/sessions/TabSession.jsm"
|
||||||
);
|
);
|
||||||
const { XPCOMUtils } = ChromeUtils.import(
|
const { XPCOMUtils } = ChromeUtils.import(
|
||||||
"resource://gre/modules/XPCOMUtils.jsm"
|
"resource://gre/modules/XPCOMUtils.jsm"
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
var EXPORTED_SYMBOLS = ["Target"];
|
var EXPORTED_SYMBOLS = ["Target"];
|
||||||
|
|
||||||
const { Connection } = ChromeUtils.import(
|
const { Connection } = ChromeUtils.import(
|
||||||
"chrome://remote/content/Connection.jsm"
|
"chrome://remote/content/cdp/Connection.jsm"
|
||||||
);
|
);
|
||||||
const { WebSocketTransport } = ChromeUtils.import(
|
const { WebSocketTransport } = ChromeUtils.import(
|
||||||
"chrome://remote/content/server/WebSocketTransport.jsm"
|
"chrome://remote/content/server/WebSocketTransport.jsm"
|
||||||
|
|
@ -10,13 +10,13 @@ const { EventEmitter } = ChromeUtils.import(
|
||||||
"resource://gre/modules/EventEmitter.jsm"
|
"resource://gre/modules/EventEmitter.jsm"
|
||||||
);
|
);
|
||||||
const { TabTarget } = ChromeUtils.import(
|
const { TabTarget } = ChromeUtils.import(
|
||||||
"chrome://remote/content/targets/TabTarget.jsm"
|
"chrome://remote/content/cdp/targets/TabTarget.jsm"
|
||||||
);
|
);
|
||||||
const { MainProcessTarget } = ChromeUtils.import(
|
const { MainProcessTarget } = ChromeUtils.import(
|
||||||
"chrome://remote/content/targets/MainProcessTarget.jsm"
|
"chrome://remote/content/cdp/targets/MainProcessTarget.jsm"
|
||||||
);
|
);
|
||||||
const { TabObserver } = ChromeUtils.import(
|
const { TabObserver } = ChromeUtils.import(
|
||||||
"chrome://remote/content/observers/TargetObserver.jsm"
|
"chrome://remote/content/cdp/observers/TargetObserver.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
class TargetList {
|
class TargetList {
|
||||||
|
|
@ -13,11 +13,12 @@ const { XPCOMUtils } = ChromeUtils.import(
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||||
HttpServer: "chrome://remote/content/server/HTTPD.jsm",
|
HttpServer: "chrome://remote/content/server/HTTPD.jsm",
|
||||||
JSONHandler: "chrome://remote/content/JSONHandler.jsm",
|
JSONHandler: "chrome://remote/content/cdp/JSONHandler.jsm",
|
||||||
Log: "chrome://remote/content/shared/Log.jsm",
|
Log: "chrome://remote/content/shared/Log.jsm",
|
||||||
Preferences: "resource://gre/modules/Preferences.jsm",
|
Preferences: "resource://gre/modules/Preferences.jsm",
|
||||||
RecommendedPreferences: "chrome://remote/content/RecommendedPreferences.jsm",
|
RecommendedPreferences:
|
||||||
TargetList: "chrome://remote/content/targets/TargetList.jsm",
|
"chrome://remote/content/cdp/RecommendedPreferences.jsm",
|
||||||
|
TargetList: "chrome://remote/content/cdp/targets/TargetList.jsm",
|
||||||
});
|
});
|
||||||
XPCOMUtils.defineLazyGetter(this, "log", Log.get);
|
XPCOMUtils.defineLazyGetter(this, "log", Log.get);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ To do that this component glue together three main high level components:
|
||||||
This will be used to implement the various http endpoints of CDP.
|
This will be used to implement the various http endpoints of CDP.
|
||||||
There is a few static URL implemented by `JSONHandler` and one dynamic URL per target.
|
There is a few static URL implemented by `JSONHandler` and one dynamic URL per target.
|
||||||
|
|
||||||
* `JSONHandler`
|
* `cdp/JSONHandler`
|
||||||
This implements the following three static http endpoints:
|
This implements the following three static http endpoints:
|
||||||
* /json/version:
|
* /json/version:
|
||||||
Returns information about the runtime as well as the url of the browser target websocket url.
|
Returns information about the runtime as well as the url of the browser target websocket url.
|
||||||
|
|
@ -31,19 +31,19 @@ To do that this component glue together three main high level components:
|
||||||
We have a future intention to fix this and report only what Firefox implements.
|
We have a future intention to fix this and report only what Firefox implements.
|
||||||
You can connect to these websocket URL in order to debug things.
|
You can connect to these websocket URL in order to debug things.
|
||||||
|
|
||||||
* `targets/TargetList`
|
* `cdp/targets/TargetList`
|
||||||
This component is responsible of maintaining the list of all debuggable targets.
|
This component is responsible of maintaining the list of all debuggable targets.
|
||||||
For now it can be either:
|
For now it can be either:
|
||||||
* The main browser target
|
* The main browser target
|
||||||
A special target which allows to inspect the browser, but not any particular tab.
|
A special target which allows to inspect the browser, but not any particular tab.
|
||||||
This is implemented by `targets/MainProcessTarget` and is instantiated on startup.
|
This is implemented by `cdp/targets/MainProcessTarget` and is instantiated on startup.
|
||||||
* Tab targets
|
* Tab targets
|
||||||
Each opened tab will have a related `targets/TabTarget` instantiated on their opening,
|
Each opened tab will have a related `cdp/targets/TabTarget` instantiated on their opening,
|
||||||
or on server startup for already opened ones.
|
or on server startup for already opened ones.
|
||||||
Each target aims at focusing on one particular context. This context is typically running in one
|
Each target aims at focusing on one particular context. This context is typically running in one
|
||||||
particular environment. This can be a particular process or thread.
|
particular environment. This can be a particular process or thread.
|
||||||
In the future, we will most likely support targets for workers and add-ons.
|
In the future, we will most likely support targets for workers and add-ons.
|
||||||
All targets inherit from `targets/Target`.
|
All targets inherit from `cdp/targets/Target`.
|
||||||
|
|
||||||
Connecting to Websocket endpoints
|
Connecting to Websocket endpoints
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
@ -54,7 +54,7 @@ Once a HTTP request happens, `server/HTTPD` will call the `handle` method on the
|
||||||
For static endpoints registered by `JSONHandler`, this will call `JSONHandler:handle` and return a JSON string as http body.
|
For static endpoints registered by `JSONHandler`, this will call `JSONHandler:handle` and return a JSON string as http body.
|
||||||
For target's endpoint, it is slightly more complicated as it requires a special handshake to morph the HTTP connection into a WebSocket one.
|
For target's endpoint, it is slightly more complicated as it requires a special handshake to morph the HTTP connection into a WebSocket one.
|
||||||
The WebSocket is then going to be long lived and be used to inspect the target over time.
|
The WebSocket is then going to be long lived and be used to inspect the target over time.
|
||||||
When a request is made to a target URL, `targets/Target:handle` is called and:
|
When a request is made to a target URL, `cdp/targets/Target:handle` is called and:
|
||||||
|
|
||||||
* delegate the complex HTTP to WebSocket handshake operation to `server/WebSocketHandshake:upgrade`
|
* delegate the complex HTTP to WebSocket handshake operation to `server/WebSocketHandshake:upgrade`
|
||||||
In return we retrieve a WebSocket object.
|
In return we retrieve a WebSocket object.
|
||||||
|
|
@ -71,14 +71,14 @@ When a request is made to a target URL, `targets/Target:handle` is called and:
|
||||||
A connection may have more than one session attached to it.
|
A connection may have more than one session attached to it.
|
||||||
|
|
||||||
* instantiate the default session
|
* instantiate the default session
|
||||||
The session is specific to each target kind and all of them inherit from `session/Session`.
|
The session is specific to each target kind and all of them inherit from `cdp/session/Session`.
|
||||||
For example, tabs targets uses `session/TabSession` and the main browser target uses `session/MainProcessSession`.
|
For example, tabs targets uses `cdp/session/TabSession` and the main browser target uses `cdp/session/MainProcessSession`.
|
||||||
Which session class is used is defined by the Target subclass’ constructor, which pass a session class reference to targets/Target:constructor.
|
Which session class is used is defined by the Target subclass’ constructor, which pass a session class reference to `cdp/targets/Target:constructor`.
|
||||||
A session is mostly responsible of accommodating the eventual cross process/cross thread aspects of the target.
|
A session is mostly responsible of accommodating the eventual cross process/cross thread aspects of the target.
|
||||||
The code we are currently describing (`targets/Target:handle`) is running in the parent process.
|
The code we are currently describing (`cdp/targets/Target:handle`) is running in the parent process.
|
||||||
The session class receive CDP commands from the connection and first try to execute the Domain commands in the parent process.
|
The session class receive CDP commands from the connection and first try to execute the Domain commands in the parent process.
|
||||||
Then, if the target actually runs in some other context, the session tries to forward this command to this other context, which can be a thread or a process.
|
Then, if the target actually runs in some other context, the session tries to forward this command to this other context, which can be a thread or a process.
|
||||||
Typically, the `sessions/TabSession` forward the CDP command to the content process where the tab is running.
|
Typically, the `cdp/sessions/TabSession` forward the CDP command to the content process where the tab is running.
|
||||||
It also redirects back the command response as well as Domain events from that process back to the parent process in order to
|
It also redirects back the command response as well as Domain events from that process back to the parent process in order to
|
||||||
forward them to the connection.
|
forward them to the connection.
|
||||||
Sessions will be using the `DomainCache` class as a helper to manage a list of Domain implementations in a given context.
|
Sessions will be using the `DomainCache` class as a helper to manage a list of Domain implementations in a given context.
|
||||||
|
|
@ -89,7 +89,7 @@ Debugging additional Targets
|
||||||
From a given connection you can know about the other potential targets.
|
From a given connection you can know about the other potential targets.
|
||||||
You typically do that via `Target.setDiscoverTargets()`, which will emit `Target.targetCreated` events providing a target ID.
|
You typically do that via `Target.setDiscoverTargets()`, which will emit `Target.targetCreated` events providing a target ID.
|
||||||
You may create a new session for the new target by handing the ID to `Target.attachToTarget()`, which will return a session ID.
|
You may create a new session for the new target by handing the ID to `Target.attachToTarget()`, which will return a session ID.
|
||||||
"Target" here is a reference to the CDP Domain implemented in `domains/parent/Target.jsm`. That is different from `targets/Target`
|
"Target" here is a reference to the CDP Domain implemented in `cdp/domains/parent/Target.jsm`. That is different from `cdp/targets/Target`
|
||||||
class which is an implementation detail of the Remote Agent.
|
class which is an implementation detail of the Remote Agent.
|
||||||
|
|
||||||
Then, there is two ways to communicate with the other targets:
|
Then, there is two ways to communicate with the other targets:
|
||||||
|
|
@ -103,7 +103,7 @@ Then, there is two ways to communicate with the other targets:
|
||||||
This client will re-use the same WebSocket connection, but every single CDP packet will contain an additional `sessionId` attribute.
|
This client will re-use the same WebSocket connection, but every single CDP packet will contain an additional `sessionId` attribute.
|
||||||
This helps distinguish packets which relate to the original target as well as the multiple additional targets you may attach to.
|
This helps distinguish packets which relate to the original target as well as the multiple additional targets you may attach to.
|
||||||
|
|
||||||
In both cases, `Target.attachToTarget()` is special as it will spawn `session/TabSession` for the tab you are attaching to.
|
In both cases, `Target.attachToTarget()` is special as it will spawn `cdp/session/TabSession` for the tab you are attaching to.
|
||||||
This is the codepath creating non-default session. The default session is related to the target you originally connected to,
|
This is the codepath creating non-default session. The default session is related to the target you originally connected to,
|
||||||
so that you don't need any ID for this one. When you want to debug more than one target over a single connection
|
so that you don't need any ID for this one. When you want to debug more than one target over a single connection
|
||||||
you need additional sessions, which will have a unique ID.
|
you need additional sessions, which will have a unique ID.
|
||||||
|
|
@ -119,11 +119,11 @@ The main and startup code of the Remote agent code runs in the parent process.
|
||||||
The handling of the command line as well as all the HTTP and WebSocket work is all done in the parent process.
|
The handling of the command line as well as all the HTTP and WebSocket work is all done in the parent process.
|
||||||
The browser target is also all implemented in the parent process.
|
The browser target is also all implemented in the parent process.
|
||||||
But when it comes to a tab target, as the tab runs in the content process, we have to run code there as well.
|
But when it comes to a tab target, as the tab runs in the content process, we have to run code there as well.
|
||||||
Let's start from the `sessions/TabSession` class, which has already been described.
|
Let's start from the `cdp/sessions/TabSession` class, which has already been described.
|
||||||
We receive here JSON packets from the WebSocket connection and we are in the parent process.
|
We receive here JSON packets from the WebSocket connection and we are in the parent process.
|
||||||
In this class, we route the messages to the parent process domains first.
|
In this class, we route the messages to the parent process domains first.
|
||||||
If there is no implementation of the domain or the particular method,
|
If there is no implementation of the domain or the particular method,
|
||||||
we forward the command to a `session/ContentProcessSession` which runs in the tab's content process.
|
we forward the command to a `cdp/session/ContentProcessSession` which runs in the tab's content process.
|
||||||
These two Session classes will interact with each other in order to forward back the returned value
|
These two Session classes will interact with each other in order to forward back the returned value
|
||||||
of the method we just called, as well as piping back any event being sent by a Domain implemented in any
|
of the method we just called, as well as piping back any event being sent by a Domain implemented in any
|
||||||
of the two processes.
|
of the two processes.
|
||||||
|
|
@ -161,4 +161,4 @@ Organizational chart of all the classes
|
||||||
```
|
```
|
||||||
[1] Target is inherited by TabTarget and MainProcessTarget.
|
[1] Target is inherited by TabTarget and MainProcessTarget.
|
||||||
[2] Session is inherited by TabSession and MainProcessSession.
|
[2] Session is inherited by TabSession and MainProcessSession.
|
||||||
[3] Domain is inherited by Log, Page, Browser, Target.... i.e. all domain implementations. From both domains/parent and domains/content folders.
|
[3] Domain is inherited by Log, Page, Browser, Target.... i.e. all domain implementations. From both cdp/domains/parent and cdp/domains/content folders.
|
||||||
|
|
|
||||||
|
|
@ -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.import(
|
|
||||||
"resource://gre/modules/XPCOMUtils.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
const ContentProcessDomains = {};
|
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(ContentProcessDomains, {
|
|
||||||
DOM: "chrome://remote/content/domains/content/DOM.jsm",
|
|
||||||
Emulation: "chrome://remote/content/domains/content/Emulation.jsm",
|
|
||||||
Input: "chrome://remote/content/domains/content/Input.jsm",
|
|
||||||
Log: "chrome://remote/content/domains/content/Log.jsm",
|
|
||||||
Network: "chrome://remote/content/domains/content/Network.jsm",
|
|
||||||
Page: "chrome://remote/content/domains/content/Page.jsm",
|
|
||||||
Performance: "chrome://remote/content/domains/content/Performance.jsm",
|
|
||||||
Runtime: "chrome://remote/content/domains/content/Runtime.jsm",
|
|
||||||
Security: "chrome://remote/content/domains/content/Security.jsm",
|
|
||||||
});
|
|
||||||
|
|
@ -1,24 +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.import(
|
|
||||||
"resource://gre/modules/XPCOMUtils.jsm"
|
|
||||||
);
|
|
||||||
|
|
||||||
const ParentProcessDomains = {};
|
|
||||||
|
|
||||||
XPCOMUtils.defineLazyModuleGetters(ParentProcessDomains, {
|
|
||||||
Browser: "chrome://remote/content/domains/parent/Browser.jsm",
|
|
||||||
Emulation: "chrome://remote/content/domains/parent/Emulation.jsm",
|
|
||||||
Input: "chrome://remote/content/domains/parent/Input.jsm",
|
|
||||||
IO: "chrome://remote/content/domains/parent/IO.jsm",
|
|
||||||
Network: "chrome://remote/content/domains/parent/Network.jsm",
|
|
||||||
Page: "chrome://remote/content/domains/parent/Page.jsm",
|
|
||||||
Security: "chrome://remote/content/domains/parent/Security.jsm",
|
|
||||||
Target: "chrome://remote/content/domains/parent/Target.jsm",
|
|
||||||
});
|
|
||||||
|
|
@ -6,59 +6,56 @@ remote.jar:
|
||||||
% content remote %content/
|
% content remote %content/
|
||||||
content/components/RemoteAgent.jsm (components/RemoteAgent.jsm)
|
content/components/RemoteAgent.jsm (components/RemoteAgent.jsm)
|
||||||
|
|
||||||
content/Connection.jsm (Connection.jsm)
|
## CDP ##
|
||||||
content/Error.jsm (Error.jsm)
|
content/cdp/Connection.jsm (cdp/Connection.jsm)
|
||||||
content/JSONHandler.jsm (JSONHandler.jsm)
|
content/cdp/Error.jsm (cdp/Error.jsm)
|
||||||
content/Protocol.jsm (Protocol.jsm)
|
content/cdp/JSONHandler.jsm (cdp/JSONHandler.jsm)
|
||||||
content/RecommendedPreferences.jsm (RecommendedPreferences.jsm)
|
content/cdp/Protocol.jsm (cdp/Protocol.jsm)
|
||||||
content/StreamRegistry.jsm (StreamRegistry.jsm)
|
content/cdp/RecommendedPreferences.jsm (cdp/RecommendedPreferences.jsm)
|
||||||
|
content/cdp/StreamRegistry.jsm (cdp/StreamRegistry.jsm)
|
||||||
# observers
|
|
||||||
content/observers/ChannelEventSink.jsm (observers/ChannelEventSink.jsm)
|
|
||||||
content/observers/ContextObserver.jsm (observers/ContextObserver.jsm)
|
|
||||||
content/observers/NetworkObserver.jsm (observers/NetworkObserver.jsm)
|
|
||||||
content/observers/TargetObserver.jsm (observers/TargetObserver.jsm)
|
|
||||||
|
|
||||||
# sessions
|
|
||||||
content/sessions/frame-script.js (sessions/frame-script.js)
|
|
||||||
content/sessions/ContentProcessSession.jsm (sessions/ContentProcessSession.jsm)
|
|
||||||
content/sessions/MainProcessSession.jsm (sessions/MainProcessSession.jsm)
|
|
||||||
content/sessions/Session.jsm (sessions/Session.jsm)
|
|
||||||
content/sessions/TabSession.jsm (sessions/TabSession.jsm)
|
|
||||||
|
|
||||||
# targets
|
|
||||||
content/targets/MainProcessTarget.jsm (targets/MainProcessTarget.jsm)
|
|
||||||
content/targets/TabTarget.jsm (targets/TabTarget.jsm)
|
|
||||||
content/targets/Target.jsm (targets/Target.jsm)
|
|
||||||
content/targets/TargetList.jsm (targets/TargetList.jsm)
|
|
||||||
|
|
||||||
# domains
|
# domains
|
||||||
content/domains/ContentProcessDomain.jsm (domains/ContentProcessDomain.jsm)
|
content/cdp/domains/ContentProcessDomain.jsm (cdp/domains/ContentProcessDomain.jsm)
|
||||||
content/domains/ContentProcessDomains.jsm (domains/ContentProcessDomains.jsm)
|
content/cdp/domains/ContentProcessDomains.jsm (cdp/domains/ContentProcessDomains.jsm)
|
||||||
content/domains/Domain.jsm (domains/Domain.jsm)
|
content/cdp/domains/Domain.jsm (cdp/domains/Domain.jsm)
|
||||||
content/domains/DomainCache.jsm (domains/DomainCache.jsm)
|
content/cdp/domains/DomainCache.jsm (cdp/domains/DomainCache.jsm)
|
||||||
content/domains/ParentProcessDomains.jsm (domains/ParentProcessDomains.jsm)
|
content/cdp/domains/ParentProcessDomains.jsm (cdp/domains/ParentProcessDomains.jsm)
|
||||||
content/domains/content/DOM.jsm (domains/content/DOM.jsm)
|
content/cdp/domains/content/DOM.jsm (cdp/domains/content/DOM.jsm)
|
||||||
content/domains/content/Emulation.jsm (domains/content/Emulation.jsm)
|
content/cdp/domains/content/Emulation.jsm (cdp/domains/content/Emulation.jsm)
|
||||||
content/domains/content/Input.jsm (domains/content/Input.jsm)
|
content/cdp/domains/content/Input.jsm (cdp/domains/content/Input.jsm)
|
||||||
content/domains/content/Log.jsm (domains/content/Log.jsm)
|
content/cdp/domains/content/Log.jsm (cdp/domains/content/Log.jsm)
|
||||||
content/domains/content/Network.jsm (domains/content/Network.jsm)
|
content/cdp/domains/content/Network.jsm (cdp/domains/content/Network.jsm)
|
||||||
content/domains/content/Page.jsm (domains/content/Page.jsm)
|
content/cdp/domains/content/Page.jsm (cdp/domains/content/Page.jsm)
|
||||||
content/domains/content/Performance.jsm (domains/content/Performance.jsm)
|
content/cdp/domains/content/Performance.jsm (cdp/domains/content/Performance.jsm)
|
||||||
content/domains/content/Runtime.jsm (domains/content/Runtime.jsm)
|
content/cdp/domains/content/Runtime.jsm (cdp/domains/content/Runtime.jsm)
|
||||||
content/domains/content/runtime/ExecutionContext.jsm (domains/content/runtime/ExecutionContext.jsm)
|
content/cdp/domains/content/runtime/ExecutionContext.jsm (cdp/domains/content/runtime/ExecutionContext.jsm)
|
||||||
content/domains/content/Security.jsm (domains/content/Security.jsm)
|
content/cdp/domains/content/Security.jsm (cdp/domains/content/Security.jsm)
|
||||||
content/domains/parent/Browser.jsm (domains/parent/Browser.jsm)
|
content/cdp/domains/parent/Browser.jsm (cdp/domains/parent/Browser.jsm)
|
||||||
content/domains/parent/Emulation.jsm (domains/parent/Emulation.jsm)
|
content/cdp/domains/parent/Emulation.jsm (cdp/domains/parent/Emulation.jsm)
|
||||||
content/domains/parent/Input.jsm (domains/parent/Input.jsm)
|
content/cdp/domains/parent/Input.jsm (cdp/domains/parent/Input.jsm)
|
||||||
content/domains/parent/IO.jsm (domains/parent/IO.jsm)
|
content/cdp/domains/parent/IO.jsm (cdp/domains/parent/IO.jsm)
|
||||||
content/domains/parent/Network.jsm (domains/parent/Network.jsm)
|
content/cdp/domains/parent/Network.jsm (cdp/domains/parent/Network.jsm)
|
||||||
content/domains/parent/Page.jsm (domains/parent/Page.jsm)
|
content/cdp/domains/parent/Page.jsm (cdp/domains/parent/Page.jsm)
|
||||||
content/domains/parent/page/DialogHandler.jsm (domains/parent/page/DialogHandler.jsm)
|
content/cdp/domains/parent/page/DialogHandler.jsm (cdp/domains/parent/page/DialogHandler.jsm)
|
||||||
content/domains/parent/Security.jsm (domains/parent/Security.jsm)
|
content/cdp/domains/parent/Security.jsm (cdp/domains/parent/Security.jsm)
|
||||||
content/domains/parent/Target.jsm (domains/parent/Target.jsm)
|
content/cdp/domains/parent/Target.jsm (cdp/domains/parent/Target.jsm)
|
||||||
|
# observers
|
||||||
|
content/cdp/observers/ChannelEventSink.jsm (cdp/observers/ChannelEventSink.jsm)
|
||||||
|
content/cdp/observers/ContextObserver.jsm (cdp/observers/ContextObserver.jsm)
|
||||||
|
content/cdp/observers/NetworkObserver.jsm (cdp/observers/NetworkObserver.jsm)
|
||||||
|
content/cdp/observers/TargetObserver.jsm (cdp/observers/TargetObserver.jsm)
|
||||||
|
# sessions
|
||||||
|
content/cdp/sessions/frame-script.js (cdp/sessions/frame-script.js)
|
||||||
|
content/cdp/sessions/ContentProcessSession.jsm (cdp/sessions/ContentProcessSession.jsm)
|
||||||
|
content/cdp/sessions/MainProcessSession.jsm (cdp/sessions/MainProcessSession.jsm)
|
||||||
|
content/cdp/sessions/Session.jsm (cdp/sessions/Session.jsm)
|
||||||
|
content/cdp/sessions/TabSession.jsm (cdp/sessions/TabSession.jsm)
|
||||||
|
# targets
|
||||||
|
content/cdp/targets/MainProcessTarget.jsm (cdp/targets/MainProcessTarget.jsm)
|
||||||
|
content/cdp/targets/TabTarget.jsm (cdp/targets/TabTarget.jsm)
|
||||||
|
content/cdp/targets/Target.jsm (cdp/targets/Target.jsm)
|
||||||
|
content/cdp/targets/TargetList.jsm (cdp/targets/TargetList.jsm)
|
||||||
|
|
||||||
# transport layer
|
# transport layer (http / websocket)
|
||||||
content/server/HTTPD.jsm (../netwerk/test/httpserver/httpd.js)
|
content/server/HTTPD.jsm (../netwerk/test/httpserver/httpd.js)
|
||||||
content/server/WebSocketHandshake.jsm (server/WebSocketHandshake.jsm)
|
content/server/WebSocketHandshake.jsm (server/WebSocketHandshake.jsm)
|
||||||
content/server/WebSocketTransport.jsm (server/WebSocketTransport.jsm)
|
content/server/WebSocketTransport.jsm (server/WebSocketTransport.jsm)
|
||||||
|
|
|
||||||
|
|
@ -9,30 +9,33 @@ DIRS += [
|
||||||
|
|
||||||
JAR_MANIFESTS += ["jar.mn"]
|
JAR_MANIFESTS += ["jar.mn"]
|
||||||
|
|
||||||
|
with Files("cdp/domains/**/Browser.jsm"):
|
||||||
|
BUG_COMPONENT = ("Remote Protocol", "CDP: Browser")
|
||||||
|
with Files("cdp/domains/**/DOM.jsm"):
|
||||||
|
BUG_COMPONENT = ("Remote Protocol", "CDP: DOM")
|
||||||
|
with Files("cdp/domains/**/Emulation.jsm"):
|
||||||
|
BUG_COMPONENT = ("Remote Protocol", "CDP: Emulation")
|
||||||
|
with Files("cdp/domains/**/Input.jsm"):
|
||||||
|
BUG_COMPONENT = ("Remote Protocol", "CDP: Input")
|
||||||
|
with Files("cdp/domains/**/Log.jsm"):
|
||||||
|
BUG_COMPONENT = ("Remote Protocol", "CDP: Log")
|
||||||
|
with Files("cdp/domains/**/Network.jsm"):
|
||||||
|
BUG_COMPONENT = ("Remote Protocol", "CDP: Network")
|
||||||
|
with Files("cdp/domains/**/Page.jsm"):
|
||||||
|
BUG_COMPONENT = ("Remote Protocol", "CDP: Page")
|
||||||
|
with Files("cdp/domains/**/Performance.jsm"):
|
||||||
|
BUG_COMPONENT = ("Remote Protocol", "CDP: Performance")
|
||||||
|
with Files("cdp/domains/**/Runtime.jsm"):
|
||||||
|
BUG_COMPONENT = ("Remote Protocol", "CDP: Runtime")
|
||||||
|
with Files("cdp/domains/**/Security.jsm"):
|
||||||
|
BUG_COMPONENT = ("Remote Protocol", "CDP: Security")
|
||||||
|
with Files("cdp/domains/**/Target.jsm"):
|
||||||
|
BUG_COMPONENT = ("Remote Protocol", "CDP: Target")
|
||||||
|
with Files("cdp/**"):
|
||||||
|
BUG_COMPONENT = ("Remote Protocol", "CDP")
|
||||||
|
|
||||||
with Files("**"):
|
with Files("**"):
|
||||||
BUG_COMPONENT = ("Remote Protocol", "Agent")
|
BUG_COMPONENT = ("Remote Protocol", "Agent")
|
||||||
with Files("domains/**/Emulation.jsm"):
|
|
||||||
BUG_COMPONENT = ("Remote Protocol", "Emulation")
|
|
||||||
with Files("domains/**/DOM.jsm"):
|
|
||||||
BUG_COMPONENT = ("Remote Protocol", "DOM")
|
|
||||||
with Files("domains/**/Input.jsm"):
|
|
||||||
BUG_COMPONENT = ("Remote Protocol", "Input")
|
|
||||||
with Files("domains/**/Log.jsm"):
|
|
||||||
BUG_COMPONENT = ("Remote Protocol", "Log")
|
|
||||||
with Files("domains/**/Network.jsm"):
|
|
||||||
BUG_COMPONENT = ("Remote Protocol", "Network")
|
|
||||||
with Files("domains/**/Page.jsm"):
|
|
||||||
BUG_COMPONENT = ("Remote Protocol", "Page")
|
|
||||||
with Files("domains/**/Performance.jsm"):
|
|
||||||
BUG_COMPONENT = ("Remote Protocol", "Performance")
|
|
||||||
with Files("domains/**/Runtime.jsm"):
|
|
||||||
BUG_COMPONENT = ("Remote Protocol", "Runtime")
|
|
||||||
with Files("domains/**/Security.jsm"):
|
|
||||||
BUG_COMPONENT = ("Remote Protocol", "Security")
|
|
||||||
with Files("domains/**/Browser.jsm"):
|
|
||||||
BUG_COMPONENT = ("Remote Protocol", "Browser")
|
|
||||||
with Files("domains/**/Target.jsm"):
|
|
||||||
BUG_COMPONENT = ("Remote Protocol", "Target")
|
|
||||||
|
|
||||||
with Files("doc/**"):
|
with Files("doc/**"):
|
||||||
SCHEDULES.exclusive = ["docs"]
|
SCHEDULES.exclusive = ["docs"]
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ const { RemoteAgent } = ChromeUtils.import(
|
||||||
"chrome://remote/content/components/RemoteAgent.jsm"
|
"chrome://remote/content/components/RemoteAgent.jsm"
|
||||||
);
|
);
|
||||||
const { RemoteAgentError } = ChromeUtils.import(
|
const { RemoteAgentError } = ChromeUtils.import(
|
||||||
"chrome://remote/content/Error.jsm"
|
"chrome://remote/content/cdp/Error.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
const TIMEOUT_MULTIPLIER = SpecialPowers.isDebugBuild ? 4 : 1;
|
const TIMEOUT_MULTIPLIER = SpecialPowers.isDebugBuild ? 4 : 1;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Services.scriptloader.loadSubScript(
|
||||||
);
|
);
|
||||||
|
|
||||||
const { Input: I } = ChromeUtils.import(
|
const { Input: I } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/parent/Input.jsm"
|
"chrome://remote/content/cdp/domains/parent/Input.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
const { alt, ctrl, meta, shift } = I.Modifier;
|
const { alt, ctrl, meta, shift } = I.Modifier;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Services.scriptloader.loadSubScript(
|
||||||
);
|
);
|
||||||
|
|
||||||
const { streamRegistry } = ChromeUtils.import(
|
const { streamRegistry } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/parent/IO.jsm"
|
"chrome://remote/content/cdp/domains/parent/IO.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
async function registerFileStream(contents, options = {}) {
|
async function registerFileStream(contents, options = {}) {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { Connection } = ChromeUtils.import(
|
const { Connection } = ChromeUtils.import(
|
||||||
"chrome://remote/content/Connection.jsm"
|
"chrome://remote/content/cdp/Connection.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
add_test(function test_Connection_splitMethod() {
|
add_test(function test_Connection_splitMethod() {
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { Domain } = ChromeUtils.import(
|
const { Domain } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/Domain.jsm"
|
"chrome://remote/content/cdp/domains/Domain.jsm"
|
||||||
);
|
);
|
||||||
const { DomainCache } = ChromeUtils.import(
|
const { DomainCache } = ChromeUtils.import(
|
||||||
"chrome://remote/content/domains/DomainCache.jsm"
|
"chrome://remote/content/cdp/domains/DomainCache.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
class MockSession {
|
class MockSession {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ const {
|
||||||
RemoteAgentError,
|
RemoteAgentError,
|
||||||
UnknownMethodError,
|
UnknownMethodError,
|
||||||
UnsupportedError,
|
UnsupportedError,
|
||||||
} = ChromeUtils.import("chrome://remote/content/Error.jsm");
|
} = ChromeUtils.import("chrome://remote/content/cdp/Error.jsm");
|
||||||
|
|
||||||
add_test(function test_RemoteAgentError_ctor() {
|
add_test(function test_RemoteAgentError_ctor() {
|
||||||
const e1 = new RemoteAgentError();
|
const e1 = new RemoteAgentError();
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const { Session } = ChromeUtils.import(
|
const { Session } = ChromeUtils.import(
|
||||||
"chrome://remote/content/sessions/Session.jsm"
|
"chrome://remote/content/cdp/sessions/Session.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
const connection = {
|
const connection = {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm");
|
||||||
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
|
|
||||||
const { StreamRegistry } = ChromeUtils.import(
|
const { StreamRegistry } = ChromeUtils.import(
|
||||||
"chrome://remote/content/StreamRegistry.jsm"
|
"chrome://remote/content/cdp/StreamRegistry.jsm"
|
||||||
);
|
);
|
||||||
|
|
||||||
add_test(function test_constructor() {
|
add_test(function test_constructor() {
|
||||||
|
|
|
||||||
|
|
@ -282,7 +282,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/Protocol.jsm
|
- remote/cdp/Protocol.jsm
|
||||||
- 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