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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 return SDK.Target.Capability.JS | SDK.Target.Capability.Log | SDK.Target.C
apability.Network; |
473 if (type === 'service_worker') | 473 if (type === 'service_worker') |
474 return SDK.Target.Capability.Log | SDK.Target.Capability.Network | SDK.Tar
get.Capability.Target; | 474 return SDK.Target.Capability.Log | SDK.Target.Capability.Network | SDK.Tar
get.Capability.Target; |
475 if (type === 'iframe') { | 475 if (type === 'iframe') { |
476 return SDK.Target.Capability.Browser | SDK.Target.Capability.DOM | SDK.Tar
get.Capability.JS | | 476 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 | | 477 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; | 478 SDK.Target.Capability.Tracing | SDK.Target.Capability.Emulation | SDK.
Target.Capability.Input; |
479 } | 479 } |
480 if (type === 'node') | 480 if (type === 'node') |
481 return SDK.Target.Capability.JS; | 481 return SDK.Target.Capability.JS; |
482 return 0; | 482 return 0; |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 /** | 647 /** |
648 * @param {!T} model | 648 * @param {!T} model |
649 */ | 649 */ |
650 modelRemoved(model) {}, | 650 modelRemoved(model) {}, |
651 }; | 651 }; |
652 | 652 |
653 /** | 653 /** |
654 * @type {!SDK.TargetManager} | 654 * @type {!SDK.TargetManager} |
655 */ | 655 */ |
656 SDK.targetManager = new SDK.TargetManager(); | 656 SDK.targetManager = new SDK.TargetManager(); |
OLD | NEW |