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