| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 this.element.addEventListener("contextmenu", this.handleContextMenu.bind(thi
s), false); | 55 this.element.addEventListener("contextmenu", this.handleContextMenu.bind(thi
s), false); |
| 56 | 56 |
| 57 this._navigatorGroupByFolderSetting = WebInspector.moduleSetting("navigatorG
roupByFolder"); | 57 this._navigatorGroupByFolderSetting = WebInspector.moduleSetting("navigatorG
roupByFolder"); |
| 58 this._navigatorGroupByFolderSetting.addChangeListener(this._groupingChanged.
bind(this)); | 58 this._navigatorGroupByFolderSetting.addChangeListener(this._groupingChanged.
bind(this)); |
| 59 | 59 |
| 60 this._initGrouping(); | 60 this._initGrouping(); |
| 61 WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel,
WebInspector.ResourceTreeModel.Events.FrameNavigated, this._frameNavigated, this
); | 61 WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel,
WebInspector.ResourceTreeModel.Events.FrameNavigated, this._frameNavigated, this
); |
| 62 WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel,
WebInspector.ResourceTreeModel.Events.FrameDetached, this._frameDetached, this); | 62 WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel,
WebInspector.ResourceTreeModel.Events.FrameDetached, this._frameDetached, this); |
| 63 WebInspector.persistence.addEventListener(WebInspector.Persistence.Events.Bi
ndingCreated, this._onBindingChanged, this); | 63 WebInspector.persistence.addEventListener(WebInspector.Persistence.Events.Bi
ndingCreated, this._onBindingChanged, this); |
| 64 WebInspector.persistence.addEventListener(WebInspector.Persistence.Events.Bi
ndingRemoved, this._onBindingChanged, this); | 64 WebInspector.persistence.addEventListener(WebInspector.Persistence.Events.Bi
ndingRemoved, this._onBindingChanged, this); |
| 65 WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Event
s.NameChanged, this._targetNameChanged, this); |
| 65 | 66 |
| 66 WebInspector.targetManager.observeTargets(this); | 67 WebInspector.targetManager.observeTargets(this); |
| 67 this._resetWorkspace(WebInspector.workspace); | 68 this._resetWorkspace(WebInspector.workspace); |
| 68 } | 69 } |
| 69 | 70 |
| 70 WebInspector.NavigatorView.Types = { | 71 WebInspector.NavigatorView.Types = { |
| 71 Category: "category", | 72 Category: "category", |
| 72 Domain: "domain", | 73 Domain: "domain", |
| 73 File: "file", | 74 File: "file", |
| 74 FileSystem: "fs", | 75 FileSystem: "fs", |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 * @override | 808 * @override |
| 808 * @param {!WebInspector.Target} target | 809 * @param {!WebInspector.Target} target |
| 809 */ | 810 */ |
| 810 targetRemoved: function(target) | 811 targetRemoved: function(target) |
| 811 { | 812 { |
| 812 var targetNode = this._rootNode.child("target:" + target.id()); | 813 var targetNode = this._rootNode.child("target:" + target.id()); |
| 813 if (targetNode) | 814 if (targetNode) |
| 814 this._rootNode.removeChild(targetNode); | 815 this._rootNode.removeChild(targetNode); |
| 815 }, | 816 }, |
| 816 | 817 |
| 818 /** |
| 819 * @param {!WebInspector.Event} event |
| 820 */ |
| 821 _targetNameChanged: function(event) |
| 822 { |
| 823 var target = /** @type {!WebInspector.Target} */ (event.data); |
| 824 var targetNode = this._rootNode.child("target:" + target.id()); |
| 825 if (targetNode) |
| 826 targetNode.setTitle(target.name()); |
| 827 }, |
| 828 |
| 817 __proto__: WebInspector.VBox.prototype | 829 __proto__: WebInspector.VBox.prototype |
| 818 } | 830 } |
| 819 | 831 |
| 820 /** | 832 /** |
| 821 * @param {!TreeElement} treeElement1 | 833 * @param {!TreeElement} treeElement1 |
| 822 * @param {!TreeElement} treeElement2 | 834 * @param {!TreeElement} treeElement2 |
| 823 * @return {number} | 835 * @return {number} |
| 824 */ | 836 */ |
| 825 WebInspector.NavigatorView._treeElementsCompare = function compare(treeElement1,
treeElement2) | 837 WebInspector.NavigatorView._treeElementsCompare = function compare(treeElement1,
treeElement2) |
| 826 { | 838 { |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1103 */ | 1115 */ |
| 1104 hasChildren: function() | 1116 hasChildren: function() |
| 1105 { | 1117 { |
| 1106 return true; | 1118 return true; |
| 1107 }, | 1119 }, |
| 1108 | 1120 |
| 1109 onattach: function() | 1121 onattach: function() |
| 1110 { | 1122 { |
| 1111 }, | 1123 }, |
| 1112 | 1124 |
| 1125 /** |
| 1126 * @param {string} title |
| 1127 */ |
| 1128 setTitle: function(title) |
| 1129 { |
| 1130 throw "Not implemented"; |
| 1131 }, |
| 1132 |
| 1113 populate: function() | 1133 populate: function() |
| 1114 { | 1134 { |
| 1115 if (this.isPopulated()) | 1135 if (this.isPopulated()) |
| 1116 return; | 1136 return; |
| 1117 if (this.parent) | 1137 if (this.parent) |
| 1118 this.parent.populate(); | 1138 this.parent.populate(); |
| 1119 this._populated = true; | 1139 this._populated = true; |
| 1120 this.wasPopulated(); | 1140 this.wasPopulated(); |
| 1121 }, | 1141 }, |
| 1122 | 1142 |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1631 var isActive = WebInspector.persistence.filePathHasBindings(fileSystemPa
th); | 1651 var isActive = WebInspector.persistence.filePathHasBindings(fileSystemPa
th); |
| 1632 if (wasActive === isActive) | 1652 if (wasActive === isActive) |
| 1633 return; | 1653 return; |
| 1634 this._treeElement.listItemElement.classList.toggle("has-mapped-files", i
sActive); | 1654 this._treeElement.listItemElement.classList.toggle("has-mapped-files", i
sActive); |
| 1635 if (isActive) | 1655 if (isActive) |
| 1636 this._treeElement.expand(); | 1656 this._treeElement.expand(); |
| 1637 else | 1657 else |
| 1638 this._treeElement.collapse(); | 1658 this._treeElement.collapse(); |
| 1639 }, | 1659 }, |
| 1640 | 1660 |
| 1661 /** |
| 1662 * @param {string} title |
| 1663 * @override |
| 1664 */ |
| 1665 setTitle: function(title) |
| 1666 { |
| 1667 this._title = title; |
| 1668 if (this._treeElement) |
| 1669 this._treeElement.title = this._title; |
| 1670 }, |
| 1671 |
| 1641 __proto__: WebInspector.NavigatorTreeNode.prototype | 1672 __proto__: WebInspector.NavigatorTreeNode.prototype |
| 1642 } | 1673 } |
| OLD | NEW |