| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 /** | 4 /** |
| 5 * @unrestricted | 5 * @unrestricted |
| 6 */ | 6 */ |
| 7 SDK.SubTargetsManager = class extends SDK.SDKModel { | 7 SDK.SubTargetsManager = class extends SDK.SDKModel { |
| 8 /** | 8 /** |
| 9 * @param {!SDK.Target} target | 9 * @param {!SDK.Target} target |
| 10 */ | 10 */ |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 if (!pendingTarget) { | 165 if (!pendingTarget) { |
| 166 this._targetCreated(targetInfo); | 166 this._targetCreated(targetInfo); |
| 167 pendingTarget = this._pendingTargets.get(targetInfo.id); | 167 pendingTarget = this._pendingTargets.get(targetInfo.id); |
| 168 } | 168 } |
| 169 pendingTarget.notifyAttached(target); | 169 pendingTarget.notifyAttached(target); |
| 170 this.dispatchEventToListeners(SDK.SubTargetsManager.Events.PendingTargetAtta
ched, pendingTarget); | 170 this.dispatchEventToListeners(SDK.SubTargetsManager.Events.PendingTargetAtta
ched, pendingTarget); |
| 171 } | 171 } |
| 172 | 172 |
| 173 /** | 173 /** |
| 174 * @param {string} targetId | 174 * @param {string} targetId |
| 175 * @param {!InspectorBackendClass.Connection.Params} params | 175 * @param {!Protocol.InspectorBackend.Connection.Params} params |
| 176 * @return {!InspectorBackendClass.Connection} | 176 * @return {!Protocol.InspectorBackend.Connection} |
| 177 */ | 177 */ |
| 178 _createConnection(targetId, params) { | 178 _createConnection(targetId, params) { |
| 179 var connection = new SDK.SubTargetConnection(this._agent, targetId, params); | 179 var connection = new SDK.SubTargetConnection(this._agent, targetId, params); |
| 180 this._connections.set(targetId, connection); | 180 this._connections.set(targetId, connection); |
| 181 return connection; | 181 return connection; |
| 182 } | 182 } |
| 183 | 183 |
| 184 /** | 184 /** |
| 185 * @param {string} targetId | 185 * @param {string} targetId |
| 186 */ | 186 */ |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 * @override | 310 * @override |
| 311 * @param {string} targetId | 311 * @param {string} targetId |
| 312 * @param {string} message | 312 * @param {string} message |
| 313 */ | 313 */ |
| 314 receivedMessageFromTarget(targetId, message) { | 314 receivedMessageFromTarget(targetId, message) { |
| 315 this._manager._receivedMessageFromTarget(targetId, message); | 315 this._manager._receivedMessageFromTarget(targetId, message); |
| 316 } | 316 } |
| 317 }; | 317 }; |
| 318 | 318 |
| 319 /** | 319 /** |
| 320 * @implements {InspectorBackendClass.Connection} | 320 * @implements {Protocol.InspectorBackend.Connection} |
| 321 * @unrestricted | 321 * @unrestricted |
| 322 */ | 322 */ |
| 323 SDK.SubTargetConnection = class { | 323 SDK.SubTargetConnection = class { |
| 324 /** | 324 /** |
| 325 * @param {!Protocol.TargetAgent} agent | 325 * @param {!Protocol.TargetAgent} agent |
| 326 * @param {string} targetId | 326 * @param {string} targetId |
| 327 * @param {!InspectorBackendClass.Connection.Params} params | 327 * @param {!Protocol.InspectorBackend.Connection.Params} params |
| 328 */ | 328 */ |
| 329 constructor(agent, targetId, params) { | 329 constructor(agent, targetId, params) { |
| 330 this._agent = agent; | 330 this._agent = agent; |
| 331 this._targetId = targetId; | 331 this._targetId = targetId; |
| 332 this._onMessage = params.onMessage; | 332 this._onMessage = params.onMessage; |
| 333 this._onDisconnect = params.onDisconnect; | 333 this._onDisconnect = params.onDisconnect; |
| 334 } | 334 } |
| 335 | 335 |
| 336 /** | 336 /** |
| 337 * @override | 337 * @override |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 this._attachedCallback = null; | 451 this._attachedCallback = null; |
| 452 } | 452 } |
| 453 | 453 |
| 454 /** | 454 /** |
| 455 * @return {boolean} | 455 * @return {boolean} |
| 456 */ | 456 */ |
| 457 canConnect() { | 457 canConnect() { |
| 458 return this._isRemote; | 458 return this._isRemote; |
| 459 } | 459 } |
| 460 }; | 460 }; |
| OLD | NEW |