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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 var childTargets = this._targetManager._targets.filter(child => child.parent
Target() === this._parentTarget); | 461 var childTargets = this._targetManager._targets.filter(child => child.parent
Target() === this._parentTarget); |
462 for (var child of childTargets) | 462 for (var child of childTargets) |
463 this.detachedFromTarget(child.id()); | 463 this.detachedFromTarget(child.id()); |
464 } | 464 } |
465 | 465 |
466 /** | 466 /** |
467 * @param {string} type | 467 * @param {string} type |
468 * @return {number} | 468 * @return {number} |
469 */ | 469 */ |
470 _capabilitiesForType(type) { | 470 _capabilitiesForType(type) { |
471 if (type === 'worker') | 471 if (type === 'worker') { |
472 return SDK.Target.Capability.JS | SDK.Target.Capability.Log; | 472 if (Runtime.experiments.isEnabled('offMainThreadFetch')) |
| 473 return SDK.Target.Capability.JS | SDK.Target.Capability.Log | SDK.Target
.Capability.Network; |
| 474 else |
| 475 return SDK.Target.Capability.JS | SDK.Target.Capability.Log; |
| 476 } |
473 if (type === 'service_worker') | 477 if (type === 'service_worker') |
474 return SDK.Target.Capability.Log | SDK.Target.Capability.Network | SDK.Tar
get.Capability.Target; | 478 return SDK.Target.Capability.Log | SDK.Target.Capability.Network | SDK.Tar
get.Capability.Target; |
475 if (type === 'iframe') { | 479 if (type === 'iframe') { |
476 return SDK.Target.Capability.Browser | SDK.Target.Capability.DOM | SDK.Tar
get.Capability.JS | | 480 return SDK.Target.Capability.Browser | SDK.Target.Capability.DOM | SDK.Tar
get.Capability.JS | |
477 SDK.Target.Capability.Log | SDK.Target.Capability.Network | SDK.Target
.Capability.Target | | 481 SDK.Target.Capability.Log | SDK.Target.Capability.Network | SDK.Target
.Capability.Target | |
478 SDK.Target.Capability.Tracing | SDK.Target.Capability.Emulation | SDK.
Target.Capability.Input; | 482 SDK.Target.Capability.Tracing | SDK.Target.Capability.Emulation | SDK.
Target.Capability.Input; |
479 } | 483 } |
480 if (type === 'node') | 484 if (type === 'node') |
481 return SDK.Target.Capability.JS; | 485 return SDK.Target.Capability.JS; |
482 return 0; | 486 return 0; |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 /** | 648 /** |
645 * @param {!T} model | 649 * @param {!T} model |
646 */ | 650 */ |
647 modelRemoved(model) {}, | 651 modelRemoved(model) {}, |
648 }; | 652 }; |
649 | 653 |
650 /** | 654 /** |
651 * @type {!SDK.TargetManager} | 655 * @type {!SDK.TargetManager} |
652 */ | 656 */ |
653 SDK.targetManager = new SDK.TargetManager(); | 657 SDK.targetManager = new SDK.TargetManager(); |
OLD | NEW |