| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 targetInfo(target) { | 124 targetInfo(target) { |
| 125 return target[SDK.SubTargetsManager._InfoSymbol] || null; | 125 return target[SDK.SubTargetsManager._InfoSymbol] || null; |
| 126 } | 126 } |
| 127 | 127 |
| 128 /** | 128 /** |
| 129 * @param {string} type | 129 * @param {string} type |
| 130 * @return {number} | 130 * @return {number} |
| 131 */ | 131 */ |
| 132 _capabilitiesForType(type) { | 132 _capabilitiesForType(type) { |
| 133 if (type === 'worker') | 133 if (type === 'worker') |
| 134 return SDK.Target.Capability.JS | SDK.Target.Capability.Log; | 134 return SDK.Target.Capability.JS | SDK.Target.Capability.Log | SDK.Target.C
apability.Network; |
| 135 if (type === 'service_worker') | 135 if (type === 'service_worker') |
| 136 return SDK.Target.Capability.Log | SDK.Target.Capability.Network | SDK.Tar
get.Capability.Target; | 136 return SDK.Target.Capability.Log | SDK.Target.Capability.Network | SDK.Tar
get.Capability.Target; |
| 137 if (type === 'iframe') { | 137 if (type === 'iframe') { |
| 138 return SDK.Target.Capability.Browser | SDK.Target.Capability.DOM | SDK.Tar
get.Capability.JS | | 138 return SDK.Target.Capability.Browser | SDK.Target.Capability.DOM | SDK.Tar
get.Capability.JS | |
| 139 SDK.Target.Capability.Log | SDK.Target.Capability.Network | SDK.Target
.Capability.Target; | 139 SDK.Target.Capability.Log | SDK.Target.Capability.Network | SDK.Target
.Capability.Target; |
| 140 } | 140 } |
| 141 if (type === 'node') | 141 if (type === 'node') |
| 142 return SDK.Target.Capability.JS; | 142 return SDK.Target.Capability.JS; |
| 143 return 0; | 143 return 0; |
| 144 } | 144 } |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 this.type = payload.type; | 351 this.type = payload.type; |
| 352 this.canActivate = this.type === 'page' || this.type === 'iframe'; | 352 this.canActivate = this.type === 'page' || this.type === 'iframe'; |
| 353 if (this.type === 'node') | 353 if (this.type === 'node') |
| 354 this.title = Common.UIString('Node: %s', this.url); | 354 this.title = Common.UIString('Node: %s', this.url); |
| 355 else if (this.type === 'page' || this.type === 'iframe') | 355 else if (this.type === 'page' || this.type === 'iframe') |
| 356 this.title = payload.title; | 356 this.title = payload.title; |
| 357 else | 357 else |
| 358 this.title = Common.UIString('Worker: %s', this.url); | 358 this.title = Common.UIString('Worker: %s', this.url); |
| 359 } | 359 } |
| 360 }; | 360 }; |
| OLD | NEW |