diff --git a/devtools/docs/backend/actor-hierarchy.md b/devtools/docs/backend/actor-hierarchy.md index c809921eda58..00ae0613b4d8 100644 --- a/devtools/docs/backend/actor-hierarchy.md +++ b/devtools/docs/backend/actor-hierarchy.md @@ -52,26 +52,27 @@ and returns its `actorID`. That's the main role of RootActor. ``` RootActor (root.js) | - |-- BrowserTabActor (webbrowser.js) - | Targets tabs living in the parent or child process. Note that this is - | just a proxy for FrameTargetActor, which is loaded via the tab's message - | manager as a frame script in the process containing the tab. This proxy - | via message manager is always used, even when e10s is disabled. + |-- FrameTargetActorProxy (frame-proxy.js) + | Targets frames (such as a tab) living in the parent or child process. + | Note that this is just a proxy for FrameTargetActor, which is loaded via + | the frame's message manager as a frame script in the process containing + | the frame content. This proxy via message manager is always used, even + | when the content happens to be in the same process. | Returned by "listTabs" or "getTab" requests. | | | \-- FrameTargetActor (frame.js) | The "real" target actor for a frame (such as a tab) which runs in - | whichever process holds the content. BrowserTabActor communicates - | with this via the frame's message manager. + | whichever process holds the content. FrameTargetActorProxy + | communicates with this via the frame's message manager. | Extends the abstract class BrowsingContextTargetActor. - | Returned by "connect" on BrowserTabActor. + | Returned by "connect" on FrameTargetActorProxy. | |-- WorkerActor (worker.js) | Targets a worker (applies to various kinds like web worker, service | worker, etc.). | Returned by "listWorkers" request to the root actor to get all workers. - | Returned by "listWorkers" request to a BrowserTabActor to get workers for - | a specific tab. + | Returned by "listWorkers" request to a FrameTargetActorProxy to get + | workers for a specific frame. | Returned by "listWorkers" request to a ChildProcessActor to get workers | for the chrome of the child process. | diff --git a/devtools/server/actors/common.js b/devtools/server/actors/common.js index fc96f975d0b0..79b42763184c 100644 --- a/devtools/server/actors/common.js +++ b/devtools/server/actors/common.js @@ -105,8 +105,8 @@ ObservedActorFactory.prototype.createActor = function() { }; exports.ObservedActorFactory = ObservedActorFactory; -/** - * Methods shared between RootActor and BrowserTabActor. +/* + * Methods shared between RootActor and BrowsingContextTargetActor. */ /** @@ -125,8 +125,8 @@ exports.ObservedActorFactory = ObservedActorFactory; * documented for addTabActor and addGlobalActor. * * @param this - * The BrowserRootActor or BrowserTabActor with which the new actors will - * be associated. It should support whatever API the |factories| + * The RootActor or BrowsingContextTargetActor with which the new actors + * will be associated. It should support whatever API the |factories| * constructor functions might be interested in, as it is passed to them. * For the sake of CommonCreateExtraActors itself, it should have at least * the following properties: @@ -173,7 +173,7 @@ exports.createExtraActors = function createExtraActors(factories, pool) { * CommonCreateExtraActors. * * @param this - * The BrowserRootActor or BrowserTabActor whose |_extraActors| table we + * The RootActor or BrowsingContextTargetActor whose |_extraActors| table we * should use; see above. */ exports.appendExtraActors = function appendExtraActors(object) { diff --git a/devtools/server/actors/moz.build b/devtools/server/actors/moz.build index ec227c26895c..69537c2e6a68 100644 --- a/devtools/server/actors/moz.build +++ b/devtools/server/actors/moz.build @@ -27,7 +27,6 @@ DevToolsModules( 'animation.js', 'array-buffer.js', 'breakpoint.js', - 'browser-tab.js', 'call-watcher.js', 'canvas.js', 'child-process.js', diff --git a/devtools/server/actors/browser-tab.js b/devtools/server/actors/targets/frame-proxy.js similarity index 87% rename from devtools/server/actors/browser-tab.js rename to devtools/server/actors/targets/frame-proxy.js index bd924dc35359..3608b3c86d59 100644 --- a/devtools/server/actors/browser-tab.js +++ b/devtools/server/actors/targets/frame-proxy.js @@ -4,11 +4,19 @@ "use strict"; +/* + * Target actor proxy that represents a frame / docShell in the parent process. It + * launches a FrameTargetActor in the content process to do the real work and tunnels the + * data. + * + * See devtools/docs/backend/actor-hierarchy.md for more details. + */ + const { DebuggerServer } = require("devtools/server/main"); loader.lazyImporter(this, "PlacesUtils", "resource://gre/modules/PlacesUtils.jsm"); /** - * Creates a target actor for handling requests to a single browser frame. + * Creates a target actor proxy for handling requests to a single browser frame. * Both and