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 * @unrestricted | 5 * @unrestricted |
6 */ | 6 */ |
7 SDK.SubTargetsManager = class extends SDK.SDKModel { | 7 SDK.SubTargetsManager = class extends SDK.SDKModel { |
8 /** | 8 /** |
9 * @param {!SDK.Target} target | 9 * @param {!SDK.Target} target |
10 */ | 10 */ |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 targetInfo(target) { | 117 targetInfo(target) { |
118 return target[SDK.SubTargetsManager._InfoSymbol] || null; | 118 return target[SDK.SubTargetsManager._InfoSymbol] || null; |
119 } | 119 } |
120 | 120 |
121 /** | 121 /** |
122 * @param {string} type | 122 * @param {string} type |
123 * @return {number} | 123 * @return {number} |
124 */ | 124 */ |
125 _capabilitiesForType(type) { | 125 _capabilitiesForType(type) { |
126 if (type === 'worker') | 126 if (type === 'worker') |
127 return SDK.Target.Capability.JS | SDK.Target.Capability.Log; | 127 return SDK.Target.Capability.JS | SDK.Target.Capability.Log | SDK.Target.C
apability.Network; |
128 if (type === 'service_worker') | 128 if (type === 'service_worker') |
129 return SDK.Target.Capability.Log | SDK.Target.Capability.Network | SDK.Tar
get.Capability.Target; | 129 return SDK.Target.Capability.Log | SDK.Target.Capability.Network | SDK.Tar
get.Capability.Target; |
130 if (type === 'iframe') { | 130 if (type === 'iframe') { |
131 return SDK.Target.Capability.Browser | SDK.Target.Capability.DOM | SDK.Tar
get.Capability.JS | | 131 return SDK.Target.Capability.Browser | SDK.Target.Capability.DOM | SDK.Tar
get.Capability.JS | |
132 SDK.Target.Capability.Log | SDK.Target.Capability.Network | SDK.Target
.Capability.Target; | 132 SDK.Target.Capability.Log | SDK.Target.Capability.Network | SDK.Target
.Capability.Target; |
133 } | 133 } |
134 if (type === 'node') | 134 if (type === 'node') |
135 return SDK.Target.Capability.JS; | 135 return SDK.Target.Capability.JS; |
136 return 0; | 136 return 0; |
137 } | 137 } |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 this._attachedCallback = null; | 451 this._attachedCallback = null; |
452 } | 452 } |
453 | 453 |
454 /** | 454 /** |
455 * @return {boolean} | 455 * @return {boolean} |
456 */ | 456 */ |
457 canConnect() { | 457 canConnect() { |
458 return this._isRemote; | 458 return this._isRemote; |
459 } | 459 } |
460 }; | 460 }; |
OLD | NEW |