Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2014 The Chromium Authors. All rights reserved. | 2 * Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 SDK.TargetManager = class extends Common.Object { | 7 SDK.TargetManager = class extends Common.Object { |
| 8 constructor() { | 8 constructor() { |
| 9 super(); | 9 super(); |
| 10 /** @type {!Array.<!SDK.Target>} */ | 10 /** @type {!Array.<!SDK.Target>} */ |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 415 var target = | 415 var target = |
| 416 this.createTarget('main', Common.UIString('Main'), capabilities, this._c reateMainConnection.bind(this), null); | 416 this.createTarget('main', Common.UIString('Main'), capabilities, this._c reateMainConnection.bind(this), null); |
| 417 target.runtimeAgent().runIfWaitingForDebugger(); | 417 target.runtimeAgent().runIfWaitingForDebugger(); |
| 418 } | 418 } |
| 419 | 419 |
| 420 /** | 420 /** |
| 421 * @param {!Protocol.InspectorBackend.Connection.Params} params | 421 * @param {!Protocol.InspectorBackend.Connection.Params} params |
| 422 * @return {!Protocol.InspectorBackend.Connection} | 422 * @return {!Protocol.InspectorBackend.Connection} |
| 423 */ | 423 */ |
| 424 _createMainConnection(params) { | 424 _createMainConnection(params) { |
| 425 if (Runtime.queryParam('ws')) { | 425 var wsParam = Runtime.queryParam('ws'); |
| 426 var ws = 'ws://' + Runtime.queryParam('ws'); | 426 var wssParam = Runtime.queryParam('wss'); |
| 427 if (wsParam || wssParam) { | |
| 428 var ws = wsParam ? `ws://${wsParam}` : `wss://${wssParam}`; | |
|
dgozman
2017/03/05 06:08:13
Last time we checked wss was only allowed from sec
| |
| 427 this._mainConnection = new SDK.WebSocketConnection(ws, this._webSocketConn ectionLostCallback, params); | 429 this._mainConnection = new SDK.WebSocketConnection(ws, this._webSocketConn ectionLostCallback, params); |
| 428 } else if (InspectorFrontendHost.isHostedMode()) { | 430 } else if (InspectorFrontendHost.isHostedMode()) { |
| 429 this._mainConnection = new SDK.StubConnection(params); | 431 this._mainConnection = new SDK.StubConnection(params); |
| 430 } else { | 432 } else { |
| 431 this._mainConnection = new SDK.MainConnection(params); | 433 this._mainConnection = new SDK.MainConnection(params); |
| 432 } | 434 } |
| 433 return this._mainConnection; | 435 return this._mainConnection; |
| 434 } | 436 } |
| 435 | 437 |
| 436 /** | 438 /** |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 700 /** | 702 /** |
| 701 * @param {!T} model | 703 * @param {!T} model |
| 702 */ | 704 */ |
| 703 modelRemoved(model) {}, | 705 modelRemoved(model) {}, |
| 704 }; | 706 }; |
| 705 | 707 |
| 706 /** | 708 /** |
| 707 * @type {!SDK.TargetManager} | 709 * @type {!SDK.TargetManager} |
| 708 */ | 710 */ |
| 709 SDK.targetManager = new SDK.TargetManager(); | 711 SDK.targetManager = new SDK.TargetManager(); |
| OLD | NEW |