| 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 WebInspector.NetworkLogViewColumns = class { | 7 WebInspector.NetworkLogViewColumns = class { |
| 8 /** | 8 /** |
| 9 * @param {!WebInspector.NetworkLogView} networkLogView | 9 * @param {!WebInspector.NetworkLogView} networkLogView |
| 10 * @param {!WebInspector.NetworkTransferTimeCalculator} timeCalculator | 10 * @param {!WebInspector.NetworkTransferTimeCalculator} timeCalculator |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 this._dataGrid.element.appendChild(this._timelineGrid.element); | 131 this._dataGrid.element.appendChild(this._timelineGrid.element); |
| 132 | 132 |
| 133 this._setupDropdownColumns(); | 133 this._setupDropdownColumns(); |
| 134 | 134 |
| 135 this._activeTimelineSortId = WebInspector.NetworkLogViewColumns.TimelineSort
Ids.StartTime; | 135 this._activeTimelineSortId = WebInspector.NetworkLogViewColumns.TimelineSort
Ids.StartTime; |
| 136 this._dataGrid.markColumnAsSortedBy( | 136 this._dataGrid.markColumnAsSortedBy( |
| 137 WebInspector.NetworkLogViewColumns._initialSortColumn, WebInspector.Data
Grid.Order.Ascending); | 137 WebInspector.NetworkLogViewColumns._initialSortColumn, WebInspector.Data
Grid.Order.Ascending); |
| 138 | 138 |
| 139 if (Runtime.experiments.isEnabled('canvasNetworkTimeline')) { | 139 if (Runtime.experiments.isEnabled('canvasNetworkTimeline')) { |
| 140 this._splitWidget = new WebInspector.SplitWidget(true, true, 'networkPanel
SplitViewTimeline', 200); | 140 this._splitWidget = new WebInspector.SplitWidget(true, true, 'networkPanel
SplitViewTimeline', 200); |
| 141 this._splitWidget.setMainWidget(this._dataGrid.asWidget()); | 141 var widget = this._dataGrid.asWidget(); |
| 142 widget.setMinimumSize(150, 0); |
| 143 this._splitWidget.setMainWidget(widget); |
| 142 } | 144 } |
| 143 } | 145 } |
| 144 | 146 |
| 145 _setupTimeline() { | 147 _setupTimeline() { |
| 146 this._timelineColumn = | 148 this._timelineColumn = |
| 147 new WebInspector.NetworkTimelineColumn(this._networkLogView.rowHeight(),
this._networkLogView.calculator()); | 149 new WebInspector.NetworkTimelineColumn(this._networkLogView.rowHeight(),
this._networkLogView.calculator()); |
| 148 | 150 |
| 149 this._timelineColumn.element.addEventListener('contextmenu', handleContextMe
nu.bind(this)); | 151 this._timelineColumn.element.addEventListener('contextmenu', handleContextMe
nu.bind(this)); |
| 150 this._timelineColumn.element.addEventListener('mousewheel', this._onMouseWhe
el.bind(this, false), {passive: true}); | 152 this._timelineColumn.element.addEventListener('mousewheel', this._onMouseWhe
el.bind(this, false), {passive: true}); |
| 151 this._dataGridScroller.addEventListener('mousewheel', this._onMouseWheel.bin
d(this, true), true); | 153 this._dataGridScroller.addEventListener('mousewheel', this._onMouseWheel.bin
d(this, true), true); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 166 this._dataGrid.addEventListener(WebInspector.DataGrid.Events.PaddingChanged,
() => { | 168 this._dataGrid.addEventListener(WebInspector.DataGrid.Events.PaddingChanged,
() => { |
| 167 this._timelineScrollerWidthIsStale = true; | 169 this._timelineScrollerWidthIsStale = true; |
| 168 this._syncScrollers(); | 170 this._syncScrollers(); |
| 169 }); | 171 }); |
| 170 this._dataGrid.addEventListener( | 172 this._dataGrid.addEventListener( |
| 171 WebInspector.ViewportDataGrid.Events.ViewportCalculated, this._redrawTim
elineColumn.bind(this)); | 173 WebInspector.ViewportDataGrid.Events.ViewportCalculated, this._redrawTim
elineColumn.bind(this)); |
| 172 | 174 |
| 173 this._createTimelineHeader(); | 175 this._createTimelineHeader(); |
| 174 this._timelineColumn.contentElement.classList.add('network-timeline-view'); | 176 this._timelineColumn.contentElement.classList.add('network-timeline-view'); |
| 175 | 177 |
| 178 this._timelineColumn.setMinimumSize(100, 0); |
| 176 this._splitWidget.setSidebarWidget(this._timelineColumn); | 179 this._splitWidget.setSidebarWidget(this._timelineColumn); |
| 177 | 180 |
| 178 this.switchViewMode(false); | 181 this.switchViewMode(false); |
| 179 | 182 |
| 180 /** | 183 /** |
| 181 * @param {!Event} event | 184 * @param {!Event} event |
| 182 * @this {WebInspector.NetworkLogViewColumns} | 185 * @this {WebInspector.NetworkLogViewColumns} |
| 183 */ | 186 */ |
| 184 function handleContextMenu(event) { | 187 function handleContextMenu(event) { |
| 185 var request = this._timelineColumn.getRequestFromPoint(event.offsetX, even
t.offsetY); | 188 var request = this._timelineColumn.getRequestFromPoint(event.offsetX, even
t.offsetY); |
| (...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1069 /** | 1072 /** |
| 1070 * @enum {string} | 1073 * @enum {string} |
| 1071 */ | 1074 */ |
| 1072 WebInspector.NetworkLogViewColumns.TimelineSortIds = { | 1075 WebInspector.NetworkLogViewColumns.TimelineSortIds = { |
| 1073 StartTime: 'startTime', | 1076 StartTime: 'startTime', |
| 1074 ResponseTime: 'responseReceivedTime', | 1077 ResponseTime: 'responseReceivedTime', |
| 1075 EndTime: 'endTime', | 1078 EndTime: 'endTime', |
| 1076 Duration: 'duration', | 1079 Duration: 'duration', |
| 1077 Latency: 'latency' | 1080 Latency: 'latency' |
| 1078 }; | 1081 }; |
| OLD | NEW |