| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 * @unrestricted | 5 * @unrestricted |
| 6 */ | 6 */ |
| 7 Network.NetworkLogViewColumns = class { | 7 Network.NetworkLogViewColumns = class { |
| 8 /** | 8 /** |
| 9 * @param {!Network.NetworkLogView} networkLogView | 9 * @param {!Network.NetworkLogView} networkLogView |
| 10 * @param {!Network.NetworkTransferTimeCalculator} timeCalculator | 10 * @param {!Network.NetworkTransferTimeCalculator} timeCalculator |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 } | 256 } |
| 257 | 257 |
| 258 sortByCurrentColumn() { | 258 sortByCurrentColumn() { |
| 259 this._sortHandler(); | 259 this._sortHandler(); |
| 260 } | 260 } |
| 261 | 261 |
| 262 _sortHandler() { | 262 _sortHandler() { |
| 263 var columnId = this._dataGrid.sortColumnId(); | 263 var columnId = this._dataGrid.sortColumnId(); |
| 264 this._networkLogView.removeAllNodeHighlights(); | 264 this._networkLogView.removeAllNodeHighlights(); |
| 265 this._waterfallRequestsAreStale = true; | 265 this._waterfallRequestsAreStale = true; |
| 266 this._waterfallColumnSortIcon.classList.remove('sort-ascending', 'sort-desce
nding'); |
| 267 |
| 266 if (columnId === 'waterfall') { | 268 if (columnId === 'waterfall') { |
| 267 this._waterfallColumnSortIcon.classList.remove('sort-ascending', 'sort-des
cending'); | |
| 268 | |
| 269 if (this._dataGrid.sortOrder() === DataGrid.DataGrid.Order.Ascending) | 269 if (this._dataGrid.sortOrder() === DataGrid.DataGrid.Order.Ascending) |
| 270 this._waterfallColumnSortIcon.classList.add('sort-ascending'); | 270 this._waterfallColumnSortIcon.classList.add('sort-ascending'); |
| 271 else | 271 else |
| 272 this._waterfallColumnSortIcon.classList.add('sort-descending'); | 272 this._waterfallColumnSortIcon.classList.add('sort-descending'); |
| 273 | 273 |
| 274 var sortFunction = Network.NetworkRequestNode.RequestPropertyComparator.bi
nd(null, this._activeWaterfallSortId); | 274 var sortFunction = Network.NetworkRequestNode.RequestPropertyComparator.bi
nd(null, this._activeWaterfallSortId); |
| 275 this._dataGrid.sortNodes(sortFunction, !this._dataGrid.isSortOrderAscendin
g()); | 275 this._dataGrid.sortNodes(sortFunction, !this._dataGrid.isSortOrderAscendin
g()); |
| 276 this._networkLogView.dataGridSorted(); | 276 this._networkLogView.dataGridSorted(); |
| 277 return; | 277 return; |
| 278 } | 278 } |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 /** | 803 /** |
| 804 * @enum {string} | 804 * @enum {string} |
| 805 */ | 805 */ |
| 806 Network.NetworkLogViewColumns.WaterfallSortIds = { | 806 Network.NetworkLogViewColumns.WaterfallSortIds = { |
| 807 StartTime: 'startTime', | 807 StartTime: 'startTime', |
| 808 ResponseTime: 'responseReceivedTime', | 808 ResponseTime: 'responseReceivedTime', |
| 809 EndTime: 'endTime', | 809 EndTime: 'endTime', |
| 810 Duration: 'duration', | 810 Duration: 'duration', |
| 811 Latency: 'latency' | 811 Latency: 'latency' |
| 812 }; | 812 }; |
| OLD | NEW |