| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 return this._dataGrid; | 258 return this._dataGrid; |
| 259 } | 259 } |
| 260 | 260 |
| 261 sortByCurrentColumn() { | 261 sortByCurrentColumn() { |
| 262 this._sortHandler(); | 262 this._sortHandler(); |
| 263 } | 263 } |
| 264 | 264 |
| 265 _sortHandler() { | 265 _sortHandler() { |
| 266 var columnId = this._dataGrid.sortColumnId(); | 266 var columnId = this._dataGrid.sortColumnId(); |
| 267 this._networkLogView.removeAllNodeHighlights(); | 267 this._networkLogView.removeAllNodeHighlights(); |
| 268 this._waterfallColumnSortIcon.classList.remove('sort-ascending', 'sort-desce
nding'); |
| 269 |
| 268 if (columnId === 'waterfall') { | 270 if (columnId === 'waterfall') { |
| 269 this._waterfallColumnSortIcon.classList.remove('sort-ascending', 'sort-des
cending'); | |
| 270 | |
| 271 if (this._dataGrid.sortOrder() === DataGrid.DataGrid.Order.Ascending) | 271 if (this._dataGrid.sortOrder() === DataGrid.DataGrid.Order.Ascending) |
| 272 this._waterfallColumnSortIcon.classList.add('sort-ascending'); | 272 this._waterfallColumnSortIcon.classList.add('sort-ascending'); |
| 273 else | 273 else |
| 274 this._waterfallColumnSortIcon.classList.add('sort-descending'); | 274 this._waterfallColumnSortIcon.classList.add('sort-descending'); |
| 275 | 275 |
| 276 this._waterfallRequestsAreStale = true; | 276 this._waterfallRequestsAreStale = true; |
| 277 var sortFunction = Network.NetworkRequestNode.RequestPropertyComparator.bi
nd(null, this._activeWaterfallSortId); | 277 var sortFunction = Network.NetworkRequestNode.RequestPropertyComparator.bi
nd(null, this._activeWaterfallSortId); |
| 278 this._dataGrid.sortNodes(sortFunction, !this._dataGrid.isSortOrderAscendin
g()); | 278 this._dataGrid.sortNodes(sortFunction, !this._dataGrid.isSortOrderAscendin
g()); |
| 279 this._networkLogView.dataGridSorted(); | 279 this._networkLogView.dataGridSorted(); |
| 280 return; | 280 return; |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 /** | 806 /** |
| 807 * @enum {string} | 807 * @enum {string} |
| 808 */ | 808 */ |
| 809 Network.NetworkLogViewColumns.WaterfallSortIds = { | 809 Network.NetworkLogViewColumns.WaterfallSortIds = { |
| 810 StartTime: 'startTime', | 810 StartTime: 'startTime', |
| 811 ResponseTime: 'responseReceivedTime', | 811 ResponseTime: 'responseReceivedTime', |
| 812 EndTime: 'endTime', | 812 EndTime: 'endTime', |
| 813 Duration: 'duration', | 813 Duration: 'duration', |
| 814 Latency: 'latency' | 814 Latency: 'latency' |
| 815 }; | 815 }; |
| OLD | NEW |