michael@0: /* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: "use strict"; michael@0: const error = Components.utils.reportError; michael@0: michael@0: /* Metrofx specific actors, modelled from the android fennec actors */ michael@0: michael@0: /** aConnection DebuggerServerConnection, the conection to the client. michael@0: */ michael@0: function createRootActor(aConnection) { michael@0: let parameters = { michael@0: tabList: new MetroTabList(aConnection), michael@0: globalActorFactories: DebuggerServer.globalActorFactories, michael@0: onShutdown: sendShutdownEvent michael@0: }; michael@0: return new RootActor(aConnection, parameters); michael@0: } michael@0: michael@0: /** aConnection DebuggerServerConnection, the conection to the client. michael@0: */ michael@0: function MetroTabList(aConnection) { michael@0: BrowserTabList.call(this, aConnection); michael@0: } michael@0: michael@0: MetroTabList.prototype = Object.create(BrowserTabList.prototype); michael@0: MetroTabList.prototype.constructor = MetroTabList; michael@0: michael@0: MetroTabList.prototype._getSelectedBrowser = function(aWindow) { michael@0: return aWindow.Browser.selectedBrowser; michael@0: }; michael@0: michael@0: MetroTabList.prototype._getChildren = function(aWindow) { michael@0: return aWindow.Browser.browsers; michael@0: };