Chromium Code Reviews| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 150 _buildTopDownTree: function(eventIdCallback) | 150 _buildTopDownTree: function(eventIdCallback) |
| 151 { | 151 { |
| 152 return WebInspector.TimelineProfileTree.buildTopDown(this._model.mainThr eadEvents(), this._filters, this._startTime, this._endTime, eventIdCallback) | 152 return WebInspector.TimelineProfileTree.buildTopDown(this._model.mainThr eadEvents(), this._filters, this._startTime, this._endTime, eventIdCallback) |
| 153 }, | 153 }, |
| 154 | 154 |
| 155 /** | 155 /** |
| 156 * @param {!Array.<!WebInspector.DataGrid.ColumnDescriptor>} columns | 156 * @param {!Array.<!WebInspector.DataGrid.ColumnDescriptor>} columns |
| 157 */ | 157 */ |
| 158 _populateColumns: function(columns) | 158 _populateColumns: function(columns) |
| 159 { | 159 { |
| 160 columns.push({id: "self", title: WebInspector.UIString("Self Time"), wid th: "110px", fixedWidth: true, sortable: true}); | 160 columns.push({id: "self", title: WebInspector.UIString("Self Time"), wid th: "110px", fixedWidth: true, sortable: true, editable: false, longText: null, nonSelectable: false, align: null, sort: null}); |
|
lushnikov
2016/03/04 22:49:18
lets use constructor with optional parameters?
kozy
2016/03/04 23:18:50
introduced struct instead
| |
| 161 columns.push({id: "total", title: WebInspector.UIString("Total Time"), w idth: "110px", fixedWidth: true, sortable: true}); | 161 columns.push({id: "total", title: WebInspector.UIString("Total Time"), w idth: "110px", fixedWidth: true, sortable: true, editable: false, longText: null , nonSelectable: false, align: null, sort: null}); |
| 162 columns.push({id: "activity", title: WebInspector.UIString("Activity"), disclosure: true, sortable: true}); | 162 columns.push({id: "activity", title: WebInspector.UIString("Activity"), disclosure: true, sortable: true, editable: false, longText: null, nonSelectable : false, align: null, sort: null}); |
| 163 }, | 163 }, |
| 164 | 164 |
| 165 _sortingChanged: function() | 165 _sortingChanged: function() |
| 166 { | 166 { |
| 167 var columnIdentifier = this._dataGrid.sortColumnIdentifier(); | 167 var columnIdentifier = this._dataGrid.sortColumnIdentifier(); |
| 168 if (!columnIdentifier) | 168 if (!columnIdentifier) |
| 169 return; | 169 return; |
| 170 var sortFunction; | 170 var sortFunction; |
| 171 switch (columnIdentifier) { | 171 switch (columnIdentifier) { |
| 172 case "startTime": | 172 case "startTime": |
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 891 if (expand) | 891 if (expand) |
| 892 this._dataGridNodeForTreeNode(node).expand(); | 892 this._dataGridNodeForTreeNode(node).expand(); |
| 893 }, | 893 }, |
| 894 | 894 |
| 895 /** | 895 /** |
| 896 * @override | 896 * @override |
| 897 * @param {!Array<!WebInspector.DataGrid.ColumnDescriptor>} columns | 897 * @param {!Array<!WebInspector.DataGrid.ColumnDescriptor>} columns |
| 898 */ | 898 */ |
| 899 _populateColumns: function(columns) | 899 _populateColumns: function(columns) |
| 900 { | 900 { |
| 901 columns.push({id: "startTime", title: WebInspector.UIString("Start Time" ), width: "110px", fixedWidth: true, sortable: true}); | 901 columns.push({id: "startTime", title: WebInspector.UIString("Start Time" ), width: "110px", fixedWidth: true, sortable: true, align: null, editable: fals e, longText: null, nonSelectable: false, sort: null}); |
| 902 WebInspector.TimelineTreeView.prototype._populateColumns.call(this, colu mns); | 902 WebInspector.TimelineTreeView.prototype._populateColumns.call(this, colu mns); |
| 903 }, | 903 }, |
| 904 | 904 |
| 905 /** | 905 /** |
| 906 * @override | 906 * @override |
| 907 * @param {!Element} parent | 907 * @param {!Element} parent |
| 908 */ | 908 */ |
| 909 _populateToolbar: function(parent) | 909 _populateToolbar: function(parent) |
| 910 { | 910 { |
| 911 var filtersWidget = this._filtersControl.filtersWidget(); | 911 var filtersWidget = this._filtersControl.filtersWidget(); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1004 return selectedNode && /** @type {!WebInspector.TimelineTreeView.GridNod e} */ (selectedNode)._profileNode; | 1004 return selectedNode && /** @type {!WebInspector.TimelineTreeView.GridNod e} */ (selectedNode)._profileNode; |
| 1005 }, | 1005 }, |
| 1006 | 1006 |
| 1007 _onSelectionChanged: function() | 1007 _onSelectionChanged: function() |
| 1008 { | 1008 { |
| 1009 this.dispatchEventToListeners(WebInspector.TimelineStackView.Events.Sele ctionChanged); | 1009 this.dispatchEventToListeners(WebInspector.TimelineStackView.Events.Sele ctionChanged); |
| 1010 }, | 1010 }, |
| 1011 | 1011 |
| 1012 __proto__: WebInspector.VBox.prototype | 1012 __proto__: WebInspector.VBox.prototype |
| 1013 } | 1013 } |
| OLD | NEW |