| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.VBox} | 7 * @extends {WebInspector.VBox} |
| 8 * @param {!WebInspector.TimelineModel} model | 8 * @param {!WebInspector.TimelineModel} model |
| 9 */ | 9 */ |
| 10 WebInspector.TimelineTreeView = function(model) | 10 WebInspector.TimelineTreeView = function(model) |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 var nodeA = /** @type {!WebInspector.TimelineTreeView.GridNode} */ (
a); | 178 var nodeA = /** @type {!WebInspector.TimelineTreeView.GridNode} */ (
a); |
| 179 var nodeB = /** @type {!WebInspector.TimelineTreeView.GridNode} */ (
b); | 179 var nodeB = /** @type {!WebInspector.TimelineTreeView.GridNode} */ (
b); |
| 180 var nameA = WebInspector.TimelineTreeView.eventNameForSorting(nodeA.
_profileNode.event); | 180 var nameA = WebInspector.TimelineTreeView.eventNameForSorting(nodeA.
_profileNode.event); |
| 181 var nameB = WebInspector.TimelineTreeView.eventNameForSorting(nodeB.
_profileNode.event); | 181 var nameB = WebInspector.TimelineTreeView.eventNameForSorting(nodeB.
_profileNode.event); |
| 182 return nameA.localeCompare(nameB); | 182 return nameA.localeCompare(nameB); |
| 183 } | 183 } |
| 184 }, | 184 }, |
| 185 | 185 |
| 186 _updateDetailsForSelection: function() | 186 _updateDetailsForSelection: function() |
| 187 { | 187 { |
| 188 // FIXME: remove this as we implement details for all modes. |
| 189 if (!this._detailsView) |
| 190 return; |
| 188 var selectedNode = this._dataGrid.selectedNode ? /** @type {!WebInspecto
r.TimelineTreeView.GridNode} */ (this._dataGrid.selectedNode)._profileNode : nul
l; | 191 var selectedNode = this._dataGrid.selectedNode ? /** @type {!WebInspecto
r.TimelineTreeView.GridNode} */ (this._dataGrid.selectedNode)._profileNode : nul
l; |
| 189 if (selectedNode === this._lastSelectedNode) | 192 if (selectedNode === this._lastSelectedNode) |
| 190 return; | 193 return; |
| 191 this._lastSelectedNode = selectedNode; | 194 this._lastSelectedNode = selectedNode; |
| 192 this._detailsView.element.removeChildren(); | 195 this._detailsView.element.removeChildren(); |
| 193 if (!selectedNode || !this._showDetailsForNode(selectedNode)) { | 196 if (!selectedNode || !this._showDetailsForNode(selectedNode)) { |
| 194 var banner = this._detailsView.element.createChild("div", "banner"); | 197 var banner = this._detailsView.element.createChild("div", "banner"); |
| 195 banner.createTextChild(WebInspector.UIString("No details are availab
le for current selection.")); | 198 banner.createTextChild(WebInspector.UIString("No details are availab
le for current selection.")); |
| 196 } | 199 } |
| 197 }, | 200 }, |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 * @this {WebInspector.EventsTimelineTreeView} | 797 * @this {WebInspector.EventsTimelineTreeView} |
| 795 */ | 798 */ |
| 796 function showDetails(fragment) | 799 function showDetails(fragment) |
| 797 { | 800 { |
| 798 this._detailsView.element.appendChild(fragment); | 801 this._detailsView.element.appendChild(fragment); |
| 799 } | 802 } |
| 800 }, | 803 }, |
| 801 | 804 |
| 802 __proto__: WebInspector.TimelineTreeView.prototype | 805 __proto__: WebInspector.TimelineTreeView.prototype |
| 803 } | 806 } |
| OLD | NEW |