| 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 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.SDKModel} | 7 * @extends {WebInspector.SDKModel} |
| 8 * @param {!WebInspector.Target} target | 8 * @param {!WebInspector.Target} target |
| 9 */ | 9 */ |
| 10 WebInspector.SubTargetsManager = function(target) | 10 WebInspector.SubTargetsManager = function(target) |
| 11 { | 11 { |
| 12 WebInspector.SDKModel.call(this, WebInspector.SubTargetsManager, target); | 12 WebInspector.SDKModel.call(this, WebInspector.SubTargetsManager, target); |
| 13 target.registerTargetDispatcher(new WebInspector.SubTargetsDispatcher(this))
; | 13 target.registerTargetDispatcher(new WebInspector.SubTargetsDispatcher(this))
; |
| 14 this._lastAnonymousTargetId = 0; | 14 this._lastAnonymousTargetId = 0; |
| 15 this._agent = target.targetAgent(); | 15 this._agent = target.targetAgent(); |
| 16 | 16 |
| 17 /** @type {!Map<string, !WebInspector.TargetInfo>} */ | 17 /** @type {!Map<string, !WebInspector.TargetInfo>} */ |
| 18 this._allTargets = new Map(); | 18 this._allTargets = new Map(); |
| 19 | 19 |
| 20 /** @type {!Map<string, !WebInspector.Target>} */ | 20 /** @type {!Map<string, !WebInspector.Target>} */ |
| 21 this._attachedTargets = new Map(); | 21 this._attachedTargets = new Map(); |
| 22 /** @type {!Map<string, !WebInspector.SubTargetConnection>} */ | 22 /** @type {!Map<string, !WebInspector.SubTargetConnection>} */ |
| 23 this._connections = new Map(); | 23 this._connections = new Map(); |
| 24 | 24 |
| 25 this._agent.setAutoAttach(true /* autoAttach */, true /* waitForDebuggerOnSt
art */); | 25 this._agent.setAutoAttach(true /* autoAttach */, true /* waitForDebuggerOnSt
art */); |
| 26 this._agent.setAttachToFrames(Runtime.experiments.isEnabled("autoAttachToCro
ssProcessSubframes")); | 26 this._agent.setAttachToFrames(Runtime.experiments.isEnabled("autoAttachToCro
ssProcessSubframes")); |
| 27 this._agent.enable(); | |
| 28 } | 27 } |
| 29 | 28 |
| 30 /** @enum {symbol} */ | 29 /** @enum {symbol} */ |
| 31 WebInspector.SubTargetsManager.Events = { | 30 WebInspector.SubTargetsManager.Events = { |
| 32 SubTargetAdded: Symbol("SubTargetAdded"), | 31 SubTargetAdded: Symbol("SubTargetAdded"), |
| 33 SubTargetRemoved: Symbol("SubTargetRemoved"), | 32 SubTargetRemoved: Symbol("SubTargetRemoved"), |
| 34 } | 33 } |
| 35 | 34 |
| 36 WebInspector.SubTargetsManager._InfoSymbol = Symbol("SubTargetInfo"); | 35 WebInspector.SubTargetsManager._InfoSymbol = Symbol("SubTargetInfo"); |
| 37 | 36 |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 this.url = payload.url; | 315 this.url = payload.url; |
| 317 this.type = payload.type; | 316 this.type = payload.type; |
| 318 if (this.type !== "page" && this.type !== "iframe") { | 317 if (this.type !== "page" && this.type !== "iframe") { |
| 319 this.title = WebInspector.UIString("Worker: %s", this.url); | 318 this.title = WebInspector.UIString("Worker: %s", this.url); |
| 320 this.canActivate = false; | 319 this.canActivate = false; |
| 321 } else { | 320 } else { |
| 322 this.title = payload.title; | 321 this.title = payload.title; |
| 323 this.canActivate = true; | 322 this.canActivate = true; |
| 324 } | 323 } |
| 325 } | 324 } |
| OLD | NEW |