1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 /* globals require, exports */
9 const { DevToolsServer
} = require("devtools/server/devtools-server");
10 const { RootActor
} = require("devtools/server/actors/root");
11 const { BrowserTabList
} = require("devtools/server/actors/webbrowser");
12 const { ProcessActorList
} = require("devtools/server/actors/process");
15 } = require("devtools/server/actors/utils/actor-registry");
18 * background-task specific actors.
23 * Construct a root actor appropriate for use in a server running a background task.
25 function createRootActor(connection
) {
27 tabList
: new BackgroundTaskTabList(connection
),
28 processList
: new ProcessActorList(),
29 globalActorFactories
: ActorRegistry
.globalActorFactories
,
32 return new RootActor(connection
, parameters
);
34 exports
.createRootActor
= createRootActor
;
37 * A "stub" TabList implementation that provides no tabs.
39 class BackgroundTaskTabList
extends BrowserTabList
{
41 return Promise
.resolve([]);