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

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

Issue 2444223002: [Devtools] Cleanup DataGrid's typecast and identifier naming (Closed)
Patch Set: changes 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 /* 1 /*
2 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. 2 * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public 5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 13 matching lines...) Expand all
24 WebInspector.ResourceWebSocketFrameView = function(request) 24 WebInspector.ResourceWebSocketFrameView = function(request)
25 { 25 {
26 WebInspector.VBox.call(this); 26 WebInspector.VBox.call(this);
27 this.registerRequiredCSS("network/webSocketFrameView.css"); 27 this.registerRequiredCSS("network/webSocketFrameView.css");
28 this.element.classList.add("websocket-frame-view"); 28 this.element.classList.add("websocket-frame-view");
29 this._request = request; 29 this._request = request;
30 30
31 this._splitWidget = new WebInspector.SplitWidget(false, true, "resourceWebSo cketFrameSplitViewState"); 31 this._splitWidget = new WebInspector.SplitWidget(false, true, "resourceWebSo cketFrameSplitViewState");
32 this._splitWidget.show(this.element); 32 this._splitWidget.show(this.element);
33 33
34 var columns = [ 34 var columns = /** @type {!Array<!WebInspector.DataGrid.ColumnDescriptor>} */ ([
35 {id: "data", title: WebInspector.UIString("Data"), sortable: false, weig ht: 88}, 35 {id: "data", title: WebInspector.UIString("Data"), sortable: false, weig ht: 88},
36 {id: "length", title: WebInspector.UIString("Length"), sortable: false, align: WebInspector.DataGrid.Align.Right, weight: 5}, 36 {id: "length", title: WebInspector.UIString("Length"), sortable: false, align: WebInspector.DataGrid.Align.Right, weight: 5},
37 {id: "time", title: WebInspector.UIString("Time"), sortable: true, weigh t: 7} 37 {id: "time", title: WebInspector.UIString("Time"), sortable: true, weigh t: 7}
38 ]; 38 ]);
39 39
40 this._dataGrid = new WebInspector.SortableDataGrid(columns, undefined, undef ined, undefined, this._onContextMenu.bind(this)); 40 this._dataGrid = new WebInspector.SortableDataGrid(columns, undefined, undef ined, undefined, this._onContextMenu.bind(this));
41 this._dataGrid.setStickToBottom(true); 41 this._dataGrid.setStickToBottom(true);
42 this._dataGrid.setCellClass("websocket-frame-view-td"); 42 this._dataGrid.setCellClass("websocket-frame-view-td");
43 this._timeComparator = /** @type {!WebInspector.SortableDataGrid.NodeCompara tor} */ (WebInspector.ResourceWebSocketFrameNodeTimeComparator); 43 this._timeComparator = /** @type {!WebInspector.SortableDataGrid.NodeCompara tor} */ (WebInspector.ResourceWebSocketFrameNodeTimeComparator);
44 this._dataGrid.sortNodes(this._timeComparator, false); 44 this._dataGrid.sortNodes(this._timeComparator, false);
45 this._dataGrid.markColumnAsSortedBy("time", WebInspector.DataGrid.Order.Asce nding); 45 this._dataGrid.markColumnAsSortedBy("time", WebInspector.DataGrid.Order.Asce nding);
46 this._dataGrid.addEventListener(WebInspector.DataGrid.Events.SortingChanged, this._sortItems, this); 46 this._dataGrid.addEventListener(WebInspector.DataGrid.Events.SortingChanged, this._sortItems, this);
47 47
48 this._dataGrid.setName("ResourceWebSocketFrameView"); 48 this._dataGrid.setName("ResourceWebSocketFrameView");
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 250
251 /** 251 /**
252 * @param {!WebInspector.ResourceWebSocketFrameNode} a 252 * @param {!WebInspector.ResourceWebSocketFrameNode} a
253 * @param {!WebInspector.ResourceWebSocketFrameNode} b 253 * @param {!WebInspector.ResourceWebSocketFrameNode} b
254 * @return {number} 254 * @return {number}
255 */ 255 */
256 WebInspector.ResourceWebSocketFrameNodeTimeComparator = function(a, b) 256 WebInspector.ResourceWebSocketFrameNodeTimeComparator = function(a, b)
257 { 257 {
258 return a._frame.time - b._frame.time; 258 return a._frame.time - b._frame.time;
259 }; 259 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698