| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 return e.name + ":@" + WebInspector.TimelineTreeView.eventURL(e)
; | 163 return e.name + ":@" + WebInspector.TimelineTreeView.eventURL(e)
; |
| 164 return e.name; | 164 return e.name; |
| 165 } | 165 } |
| 166 | 166 |
| 167 var groupByMapper = new Map([ | 167 var groupByMapper = new Map([ |
| 168 [WebInspector.TimelineTreeView.GroupBy.None, groupByNone], | 168 [WebInspector.TimelineTreeView.GroupBy.None, groupByNone], |
| 169 [WebInspector.TimelineTreeView.GroupBy.Domain, groupByDomain], | 169 [WebInspector.TimelineTreeView.GroupBy.Domain, groupByDomain], |
| 170 [WebInspector.TimelineTreeView.GroupBy.DomainSecondLevel, groupByDom
ainSecondLevel], | 170 [WebInspector.TimelineTreeView.GroupBy.DomainSecondLevel, groupByDom
ainSecondLevel], |
| 171 [WebInspector.TimelineTreeView.GroupBy.URL, groupByURL] | 171 [WebInspector.TimelineTreeView.GroupBy.URL, groupByURL] |
| 172 ]); | 172 ]); |
| 173 var topDown = WebInspector.TimelineUIUtils.buildTopDownTree(this._model.
mainThreadEvents(), this._startTime, this._endTime, this._filters, eventId); | 173 var topDown = WebInspector.TimelineModel.buildTopDownTree(this._model.ma
inThreadEvents(), this._startTime, this._endTime, this._filters, eventId); |
| 174 var bottomUpRoot = WebInspector.TimelineUIUtils.buildBottomUpTree(topDow
n, groupByMapper.get(groupBy)); | 174 var bottomUpRoot = WebInspector.TimelineModel.buildBottomUpTree(topDown,
groupByMapper.get(groupBy)); |
| 175 for (var group of groupNodes) | 175 for (var group of groupNodes) |
| 176 bottomUpRoot.children.set(group[0], group[1]); | 176 bottomUpRoot.children.set(group[0], group[1]); |
| 177 this.dataGrid.rootNode().removeChildren(); | 177 this.dataGrid.rootNode().removeChildren(); |
| 178 for (var child of bottomUpRoot.children.values()) { | 178 for (var child of bottomUpRoot.children.values()) { |
| 179 // Exclude the idle time off the total calculation. | 179 // Exclude the idle time off the total calculation. |
| 180 var gridNode = new WebInspector.TimelineTreeView.GridNode(child, top
Down.totalTime); | 180 var gridNode = new WebInspector.TimelineTreeView.GridNode(child, top
Down.totalTime); |
| 181 this.dataGrid.insertChild(gridNode); | 181 this.dataGrid.insertChild(gridNode); |
| 182 } | 182 } |
| 183 this._sortingChanged(); | 183 this._sortingChanged(); |
| 184 }, | 184 }, |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 if (!this._profileNode.children) | 341 if (!this._profileNode.children) |
| 342 return; | 342 return; |
| 343 for (var node of this._profileNode.children.values()) { | 343 for (var node of this._profileNode.children.values()) { |
| 344 var gridNode = new WebInspector.TimelineTreeView.GridNode(node, this
._totalTime); | 344 var gridNode = new WebInspector.TimelineTreeView.GridNode(node, this
._totalTime); |
| 345 this.insertChildOrdered(gridNode); | 345 this.insertChildOrdered(gridNode); |
| 346 } | 346 } |
| 347 }, | 347 }, |
| 348 | 348 |
| 349 __proto__: WebInspector.SortableDataGridNode.prototype | 349 __proto__: WebInspector.SortableDataGridNode.prototype |
| 350 } | 350 } |
| OLD | NEW |