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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 for (var child of childTargets) | 428 for (var child of childTargets) |
429 this.detachedFromTarget(child.id()); | 429 this.detachedFromTarget(child.id()); |
430 } | 430 } |
431 | 431 |
432 /** | 432 /** |
433 * @param {string} type | 433 * @param {string} type |
434 * @return {number} | 434 * @return {number} |
435 */ | 435 */ |
436 _capabilitiesForType(type) { | 436 _capabilitiesForType(type) { |
437 if (type === 'worker') | 437 if (type === 'worker') |
438 return SDK.Target.Capability.JS | SDK.Target.Capability.Log; | 438 return SDK.Target.Capability.JS | SDK.Target.Capability.Log | SDK.Target.C
apability.Network; |
439 if (type === 'service_worker') | 439 if (type === 'service_worker') |
440 return SDK.Target.Capability.Log | SDK.Target.Capability.Network | SDK.Tar
get.Capability.Target; | 440 return SDK.Target.Capability.Log | SDK.Target.Capability.Network | SDK.Tar
get.Capability.Target; |
441 if (type === 'iframe') { | 441 if (type === 'iframe') { |
442 return SDK.Target.Capability.Browser | SDK.Target.Capability.DOM | SDK.Tar
get.Capability.JS | | 442 return SDK.Target.Capability.Browser | SDK.Target.Capability.DOM | SDK.Tar
get.Capability.JS | |
443 SDK.Target.Capability.Log | SDK.Target.Capability.Network | SDK.Target
.Capability.Target | | 443 SDK.Target.Capability.Log | SDK.Target.Capability.Network | SDK.Target
.Capability.Target | |
444 SDK.Target.Capability.Tracing | SDK.Target.Capability.Emulation | SDK.
Target.Capability.Input; | 444 SDK.Target.Capability.Tracing | SDK.Target.Capability.Emulation | SDK.
Target.Capability.Input; |
445 } | 445 } |
446 if (type === 'node') | 446 if (type === 'node') |
447 return SDK.Target.Capability.JS; | 447 return SDK.Target.Capability.JS; |
448 return 0; | 448 return 0; |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 /** | 610 /** |
611 * @param {!T} model | 611 * @param {!T} model |
612 */ | 612 */ |
613 modelRemoved(model) {}, | 613 modelRemoved(model) {}, |
614 }; | 614 }; |
615 | 615 |
616 /** | 616 /** |
617 * @type {!SDK.TargetManager} | 617 * @type {!SDK.TargetManager} |
618 */ | 618 */ |
619 SDK.targetManager = new SDK.TargetManager(); | 619 SDK.targetManager = new SDK.TargetManager(); |
OLD | NEW |