| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 /** | 47 /** |
| 48 * @param {!Network.NetworkLogViewColumns.Descriptor} columnConfig | 48 * @param {!Network.NetworkLogViewColumns.Descriptor} columnConfig |
| 49 * @return {!DataGrid.DataGrid.ColumnDescriptor} | 49 * @return {!DataGrid.DataGrid.ColumnDescriptor} |
| 50 */ | 50 */ |
| 51 static _convertToDataGridDescriptor(columnConfig) { | 51 static _convertToDataGridDescriptor(columnConfig) { |
| 52 return /** @type {!DataGrid.DataGrid.ColumnDescriptor} */ ({ | 52 return /** @type {!DataGrid.DataGrid.ColumnDescriptor} */ ({ |
| 53 id: columnConfig.id, | 53 id: columnConfig.id, |
| 54 title: columnConfig.title, | 54 title: columnConfig.title, |
| 55 sortable: columnConfig.sortable, | 55 sortable: columnConfig.sortable, |
| 56 disclosure: columnConfig.disclosure, |
| 56 align: columnConfig.align, | 57 align: columnConfig.align, |
| 57 nonSelectable: columnConfig.nonSelectable, | 58 nonSelectable: columnConfig.nonSelectable, |
| 58 weight: columnConfig.weight | 59 weight: columnConfig.weight |
| 59 }); | 60 }); |
| 60 } | 61 } |
| 61 | 62 |
| 62 wasShown() { | 63 wasShown() { |
| 63 this._updateRowsSize(); | 64 this._updateRowsSize(); |
| 64 } | 65 } |
| 65 | 66 |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 Network.NetworkLogViewColumns._initialSortColumn = 'waterfall'; | 603 Network.NetworkLogViewColumns._initialSortColumn = 'waterfall'; |
| 603 | 604 |
| 604 /** | 605 /** |
| 605 * @typedef {{ | 606 * @typedef {{ |
| 606 * id: string, | 607 * id: string, |
| 607 * title: string, | 608 * title: string, |
| 608 * titleDOMFragment: (!DocumentFragment|undefined), | 609 * titleDOMFragment: (!DocumentFragment|undefined), |
| 609 * subtitle: (string|null), | 610 * subtitle: (string|null), |
| 610 * visible: boolean, | 611 * visible: boolean, |
| 611 * weight: number, | 612 * weight: number, |
| 613 * disclosure: boolean, |
| 612 * hideable: boolean, | 614 * hideable: boolean, |
| 613 * nonSelectable: boolean, | 615 * nonSelectable: boolean, |
| 614 * sortable: boolean, | 616 * sortable: boolean, |
| 615 * align: (?DataGrid.DataGrid.Align|undefined), | 617 * align: (?DataGrid.DataGrid.Align|undefined), |
| 616 * isResponseHeader: boolean, | 618 * isResponseHeader: boolean, |
| 617 * sortingFunction: (!function(!Network.NetworkNode, !Network.NetworkNode):n
umber|undefined), | 619 * sortingFunction: (!function(!Network.NetworkNode, !Network.NetworkNode):n
umber|undefined), |
| 618 * isCustomHeader: boolean | 620 * isCustomHeader: boolean |
| 619 * }} | 621 * }} |
| 620 */ | 622 */ |
| 621 Network.NetworkLogViewColumns.Descriptor; | 623 Network.NetworkLogViewColumns.Descriptor; |
| 622 | 624 |
| 623 /** @enum {string} */ | 625 /** @enum {string} */ |
| 624 Network.NetworkLogViewColumns._calculatorTypes = { | 626 Network.NetworkLogViewColumns._calculatorTypes = { |
| 625 Duration: 'Duration', | 627 Duration: 'Duration', |
| 626 Time: 'Time' | 628 Time: 'Time' |
| 627 }; | 629 }; |
| 628 | 630 |
| 629 /** | 631 /** |
| 630 * @type {!Object} column | 632 * @type {!Object} column |
| 631 */ | 633 */ |
| 632 Network.NetworkLogViewColumns._defaultColumnConfig = { | 634 Network.NetworkLogViewColumns._defaultColumnConfig = { |
| 633 subtitle: null, | 635 subtitle: null, |
| 634 visible: false, | 636 visible: false, |
| 635 weight: 6, | 637 weight: 6, |
| 636 sortable: true, | 638 sortable: true, |
| 637 hideable: true, | 639 hideable: true, |
| 640 disclosure: false, |
| 638 nonSelectable: true, | 641 nonSelectable: true, |
| 639 isResponseHeader: false, | 642 isResponseHeader: false, |
| 640 alwaysVisible: false, | 643 alwaysVisible: false, |
| 641 isCustomHeader: false | 644 isCustomHeader: false |
| 642 }; | 645 }; |
| 643 | 646 |
| 644 /** | 647 /** |
| 645 * @type {!Array.<!Network.NetworkLogViewColumns.Descriptor>} column | 648 * @type {!Array.<!Network.NetworkLogViewColumns.Descriptor>} column |
| 646 */ | 649 */ |
| 647 Network.NetworkLogViewColumns._defaultColumns = [ | 650 Network.NetworkLogViewColumns._defaultColumns = [ |
| 648 { | 651 { |
| 649 id: 'name', | 652 id: 'name', |
| 650 title: Common.UIString('Name'), | 653 title: Common.UIString('Name'), |
| 651 subtitle: Common.UIString('Path'), | 654 subtitle: Common.UIString('Path'), |
| 652 visible: true, | 655 visible: true, |
| 653 weight: 20, | 656 weight: 20, |
| 657 disclosure: true, |
| 654 hideable: false, | 658 hideable: false, |
| 655 nonSelectable: false, | 659 nonSelectable: false, |
| 656 alwaysVisible: true, | 660 alwaysVisible: true, |
| 657 sortingFunction: Network.NetworkRequestNode.NameComparator | 661 sortingFunction: Network.NetworkRequestNode.NameComparator |
| 658 }, | 662 }, |
| 659 { | 663 { |
| 660 id: 'method', | 664 id: 'method', |
| 661 title: Common.UIString('Method'), | 665 title: Common.UIString('Method'), |
| 662 sortingFunction: Network.NetworkRequestNode.RequestPropertyComparator.bind(n
ull, 'requestMethod') | 666 sortingFunction: Network.NetworkRequestNode.RequestPropertyComparator.bind(n
ull, 'requestMethod') |
| 663 }, | 667 }, |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 /** | 809 /** |
| 806 * @enum {string} | 810 * @enum {string} |
| 807 */ | 811 */ |
| 808 Network.NetworkLogViewColumns.WaterfallSortIds = { | 812 Network.NetworkLogViewColumns.WaterfallSortIds = { |
| 809 StartTime: 'startTime', | 813 StartTime: 'startTime', |
| 810 ResponseTime: 'responseReceivedTime', | 814 ResponseTime: 'responseReceivedTime', |
| 811 EndTime: 'endTime', | 815 EndTime: 'endTime', |
| 812 Duration: 'duration', | 816 Duration: 'duration', |
| 813 Latency: 'latency' | 817 Latency: 'latency' |
| 814 }; | 818 }; |
| OLD | NEW |