| 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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 | 345 |
| 346 /** | 346 /** |
| 347 * @constructor | 347 * @constructor |
| 348 * @param {!TargetAgent.TargetInfo} payload | 348 * @param {!TargetAgent.TargetInfo} payload |
| 349 */ | 349 */ |
| 350 WebInspector.TargetInfo = function(payload) | 350 WebInspector.TargetInfo = function(payload) |
| 351 { | 351 { |
| 352 this.id = payload.targetId; | 352 this.id = payload.targetId; |
| 353 this.url = payload.url; | 353 this.url = payload.url; |
| 354 this.type = payload.type; | 354 this.type = payload.type; |
| 355 if (this.type !== "page" && this.type !== "iframe") { | 355 this.canActivate = this.type === "page" || this.type === "iframe"; |
| 356 if (this.type === "node") |
| 357 this.title = WebInspector.UIString("Node: %s", this.url); |
| 358 else if (this.type === "page" || this.type === "iframe") |
| 359 this.title = payload.title; |
| 360 else |
| 356 this.title = WebInspector.UIString("Worker: %s", this.url); | 361 this.title = WebInspector.UIString("Worker: %s", this.url); |
| 357 this.canActivate = false; | |
| 358 } else { | |
| 359 this.title = payload.title; | |
| 360 this.canActivate = true; | |
| 361 } | |
| 362 }; | 362 }; |
| OLD | NEW |