Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(682)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/network/NetworkLogViewColumns.js

Issue 2450663004: DevTools: do not allow using 'this' before call into super. (Closed)
Patch Set: rebaselined Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 /** 5 /**
6 * @constructor 6 * @constructor
7 * @param {!WebInspector.NetworkLogView} networkLogView 7 * @param {!WebInspector.NetworkLogView} networkLogView
8 * @param {!WebInspector.Setting} networkLogLargeRowsSetting 8 * @param {!WebInspector.Setting} networkLogLargeRowsSetting
9 */ 9 */
10 WebInspector.NetworkLogViewColumns = function(networkLogView, networkLogLargeRow sSetting) 10 WebInspector.NetworkLogViewColumns = function(networkLogView, networkLogLargeRow sSetting)
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 columnConfig.titleDOMFragment = this._makeHeaderFragment(columnC onfig.title, columnConfig.subtitle); 395 columnConfig.titleDOMFragment = this._makeHeaderFragment(columnC onfig.title, columnConfig.subtitle);
396 this._columns.push(columnConfig); 396 this._columns.push(columnConfig);
397 } 397 }
398 this._loadColumns(); 398 this._loadColumns();
399 399
400 /** @type {!Map<string, !WebInspector.NetworkTimeCalculator>} */ 400 /** @type {!Map<string, !WebInspector.NetworkTimeCalculator>} */
401 this._calculatorsMap = new Map(); 401 this._calculatorsMap = new Map();
402 this._calculatorsMap.set(WebInspector.NetworkLogViewColumns._calculatorT ypes.Time, timeCalculator); 402 this._calculatorsMap.set(WebInspector.NetworkLogViewColumns._calculatorT ypes.Time, timeCalculator);
403 this._calculatorsMap.set(WebInspector.NetworkLogViewColumns._calculatorT ypes.Duration, durationCalculator); 403 this._calculatorsMap.set(WebInspector.NetworkLogViewColumns._calculatorT ypes.Duration, durationCalculator);
404 404
405 this._popoverHelper = new WebInspector.PopoverHelper(this._networkLogVie w.element, this._getPopoverAnchor.bind(this), this._showPopover.bind(this), this ._onHidePopover.bind(this)); 405 this._popoverHelper = new WebInspector.PopoverHelper(this._networkLogVie w.element);
406 406 this._popoverHelper.initializeCallbacks(this._getPopoverAnchor.bind(this ), this._showPopover.bind(this), this._onHidePopover.bind(this));
407 this._dataGrid = new WebInspector.SortableDataGrid(this._columns.map(Web Inspector.NetworkLogViewColumns._convertToDataGridDescriptor)); 407 this._dataGrid = new WebInspector.SortableDataGrid(this._columns.map(Web Inspector.NetworkLogViewColumns._convertToDataGridDescriptor));
408 408
409 this._updateColumns(); 409 this._updateColumns();
410 this._dataGrid.addEventListener(WebInspector.DataGrid.Events.SortingChan ged, this._sortHandler, this); 410 this._dataGrid.addEventListener(WebInspector.DataGrid.Events.SortingChan ged, this._sortHandler, this);
411 this._dataGrid.addEventListener(WebInspector.DataGrid.Events.ColumnsResi zed, this.updateDividersIfNeeded, this); 411 this._dataGrid.addEventListener(WebInspector.DataGrid.Events.ColumnsResi zed, this.updateDividersIfNeeded, this);
412 412
413 this._timelineGrid = new WebInspector.TimelineGrid(); 413 this._timelineGrid = new WebInspector.TimelineGrid();
414 this._timelineGrid.element.classList.add("network-timeline-grid"); 414 this._timelineGrid.element.classList.add("network-timeline-grid");
415 if (!Runtime.experiments.isEnabled("canvasNetworkTimeline")) 415 if (!Runtime.experiments.isEnabled("canvasNetworkTimeline"))
416 this._dataGrid.element.appendChild(this._timelineGrid.element); 416 this._dataGrid.element.appendChild(this._timelineGrid.element);
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 divider.element.classList.toggle("network-frame-divider-selected", f alse); 831 divider.element.classList.toggle("network-frame-divider-selected", f alse);
832 }, 832 },
833 833
834 _updateRowsSize: function() 834 _updateRowsSize: function()
835 { 835 {
836 if (Runtime.experiments.isEnabled("canvasNetworkTimeline")) 836 if (Runtime.experiments.isEnabled("canvasNetworkTimeline"))
837 return; 837 return;
838 this._timelineGrid.element.classList.toggle("small", !this._networkLogLa rgeRowsSetting.get()); 838 this._timelineGrid.element.classList.toggle("small", !this._networkLogLa rgeRowsSetting.get());
839 } 839 }
840 }; 840 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698