| 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 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.SDKModel} | 7 * @extends {WebInspector.SDKModel} |
| 8 * @param {!WebInspector.Target} target | 8 * @param {!WebInspector.Target} target |
| 9 */ | 9 */ |
| 10 WebInspector.SubTargetsManager = function(target) | 10 WebInspector.SubTargetsManager = function(target) |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 | 325 |
| 326 /** | 326 /** |
| 327 * @constructor | 327 * @constructor |
| 328 * @param {!TargetAgent.TargetInfo} payload | 328 * @param {!TargetAgent.TargetInfo} payload |
| 329 */ | 329 */ |
| 330 WebInspector.TargetInfo = function(payload) | 330 WebInspector.TargetInfo = function(payload) |
| 331 { | 331 { |
| 332 this.id = payload.targetId; | 332 this.id = payload.targetId; |
| 333 this.url = payload.url; | 333 this.url = payload.url; |
| 334 this.type = payload.type; | 334 this.type = payload.type; |
| 335 if (this.type !== "page" && this.type !== "iframe") { | 335 this.canActivate = this.type === "page" || this.type === "iframe"; |
| 336 if (this.type === "node") |
| 337 this.title = WebInspector.UIString("Node: %s", this.url); |
| 338 else if (this.type === "page" || this.type === "iframe") |
| 339 this.title = payload.title; |
| 340 else |
| 336 this.title = WebInspector.UIString("Worker: %s", this.url); | 341 this.title = WebInspector.UIString("Worker: %s", this.url); |
| 337 this.canActivate = false; | |
| 338 } else { | |
| 339 this.title = payload.title; | |
| 340 this.canActivate = true; | |
| 341 } | |
| 342 }; | 342 }; |
| OLD | NEW |