| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * | 10 * |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 /** | 417 /** |
| 418 * @param {!Workspace.Project} project | 418 * @param {!Workspace.Project} project |
| 419 * @param {!SDK.Target} target | 419 * @param {!SDK.Target} target |
| 420 * @param {?SDK.ResourceTreeFrame} frame | 420 * @param {?SDK.ResourceTreeFrame} frame |
| 421 * @return {!Sources.NavigatorTreeNode} | 421 * @return {!Sources.NavigatorTreeNode} |
| 422 */ | 422 */ |
| 423 _frameNode(project, target, frame) { | 423 _frameNode(project, target, frame) { |
| 424 if (!this._groupByFrame || !frame) | 424 if (!this._groupByFrame || !frame) |
| 425 return this._targetNode(project, target); | 425 return this._targetNode(project, target); |
| 426 | 426 |
| 427 if (!frame.parentFrame && target.parentTarget()) |
| 428 return this._targetNode(project, target); |
| 429 |
| 427 var frameNode = this._frameNodes.get(frame); | 430 var frameNode = this._frameNodes.get(frame); |
| 428 if (frameNode) | 431 if (frameNode) |
| 429 return frameNode; | 432 return frameNode; |
| 430 | 433 |
| 431 frameNode = new Sources.NavigatorGroupTreeNode( | 434 frameNode = new Sources.NavigatorGroupTreeNode( |
| 432 this, project, target.id() + ':' + frame.id, Sources.NavigatorView.Types
.Frame, frame.displayName()); | 435 this, project, target.id() + ':' + frame.id, Sources.NavigatorView.Types
.Frame, frame.displayName()); |
| 433 frameNode.setHoverCallback(hoverCallback); | 436 frameNode.setHoverCallback(hoverCallback); |
| 434 this._frameNodes.set(frame, frameNode); | 437 this._frameNodes.set(frame, frameNode); |
| 435 this._frameNode(project, target, frame.parentFrame).appendChild(frameNode); | 438 this._frameNode(project, target, frame.parentFrame).appendChild(frameNode); |
| 436 if (!frame.parentFrame) | 439 if (!frame.parentFrame) |
| (...skipping 20 matching lines...) Expand all Loading... |
| 457 * @return {!Sources.NavigatorTreeNode} | 460 * @return {!Sources.NavigatorTreeNode} |
| 458 */ | 461 */ |
| 459 _targetNode(project, target) { | 462 _targetNode(project, target) { |
| 460 if (target === SDK.targetManager.mainTarget()) | 463 if (target === SDK.targetManager.mainTarget()) |
| 461 return this._rootNode; | 464 return this._rootNode; |
| 462 | 465 |
| 463 var targetNode = this._rootNode.child('target:' + target.id()); | 466 var targetNode = this._rootNode.child('target:' + target.id()); |
| 464 if (!targetNode) { | 467 if (!targetNode) { |
| 465 targetNode = new Sources.NavigatorGroupTreeNode( | 468 targetNode = new Sources.NavigatorGroupTreeNode( |
| 466 this, project, 'target:' + target.id(), | 469 this, project, 'target:' + target.id(), |
| 467 !target.hasBrowserCapability() ? Sources.NavigatorView.Types.Worker : | 470 !target.hasBrowserCapability() ? Sources.NavigatorView.Types.Worker :
Sources.NavigatorView.Types.Frame, |
| 468 Sources.NavigatorView.Types.NetworkFo
lder, | |
| 469 target.name()); | 471 target.name()); |
| 470 this._rootNode.appendChild(targetNode); | 472 this._rootNode.appendChild(targetNode); |
| 471 } | 473 } |
| 472 return targetNode; | 474 return targetNode; |
| 473 } | 475 } |
| 474 | 476 |
| 475 /** | 477 /** |
| 476 * @param {!SDK.Target} target | 478 * @param {!SDK.Target} target |
| 477 * @param {string} projectOrigin | 479 * @param {string} projectOrigin |
| 478 * @return {string} | 480 * @return {string} |
| (...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1610 /** | 1612 /** |
| 1611 * @param {string} title | 1613 * @param {string} title |
| 1612 * @override | 1614 * @override |
| 1613 */ | 1615 */ |
| 1614 setTitle(title) { | 1616 setTitle(title) { |
| 1615 this._title = title; | 1617 this._title = title; |
| 1616 if (this._treeElement) | 1618 if (this._treeElement) |
| 1617 this._treeElement.title = this._title; | 1619 this._treeElement.title = this._title; |
| 1618 } | 1620 } |
| 1619 }; | 1621 }; |
| OLD | NEW |