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

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

Issue 2411533002: [Devtools] Added data to networking timeline canvas experiment (Closed)
Patch Set: changes Created 4 years, 2 months 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * @extends {WebInspector.VBox} 7 * @extends {WebInspector.VBox}
8 * @param {!WebInspector.NetworkLogView} networkLogView 8 * @param {!WebInspector.NetworkLogView} networkLogView
9 * @param {!WebInspector.SortableDataGrid} dataGrid 9 * @param {!WebInspector.SortableDataGrid} dataGrid
10 */ 10 */
11 WebInspector.NetworkTimelineColumn = function(networkLogView, dataGrid) 11 WebInspector.NetworkTimelineColumn = function(networkLogView, dataGrid)
12 { 12 {
13 WebInspector.VBox.call(this, true); 13 WebInspector.VBox.call(this, true);
14 this._canvas = this.contentElement.createChild("canvas"); 14 this._canvas = this.contentElement.createChild("canvas");
15 this._canvas.tabIndex = 1; 15 this._canvas.tabIndex = 1;
16 this.setDefaultFocusedElement(this._canvas); 16 this.setDefaultFocusedElement(this._canvas);
17 17
18 /** @const */ 18 /** @const */
19 this._leftPadding = 5; 19 this._leftPadding = 5;
20 /** @const */ 20 /** @const */
21 this._rightPadding = 5; 21 this._rightPadding = 5;
22 22
23 this._dataGrid = dataGrid; 23 this._dataGrid = dataGrid;
24 this._networkLogView = networkLogView; 24 this._networkLogView = networkLogView;
25 /** @type {!Array<!WebInspector.NetworkRequest>} */ 25 /** @type {!Array<!WebInspector.NetworkRequest>} */
26 this._requestData = []; 26 this._requestData = [];
27 this.refreshData();
27 } 28 }
28 29
29 WebInspector.NetworkTimelineColumn.prototype = { 30 WebInspector.NetworkTimelineColumn.prototype = {
31 refreshData: function()
dgozman 2016/10/11 02:13:00 Now I feel like passing DataGridNode to this funct
32 {
33 var currentNode = this._dataGrid.rootNode();
34 this._requestData = [];
35 while (currentNode = currentNode.traverseNextNode(true))
36 this._requestData.push(currentNode.request());
37
38 this._update();
39 },
40
30 scheduleUpdate: function() 41 scheduleUpdate: function()
31 { 42 {
32 if (this._updateRequestID) 43 if (this._updateRequestID)
33 return; 44 return;
34 this._updateRequestID = this.element.window().requestAnimationFrame(this ._update.bind(this)); 45 this._updateRequestID = this.element.window().requestAnimationFrame(this ._update.bind(this));
35 }, 46 },
36 47
37 _update: function() 48 _update: function()
38 { 49 {
39 this.element.window().cancelAnimationFrame(this._updateRequestID); 50 this.element.window().cancelAnimationFrame(this._updateRequestID);
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 context.lineWidth = lineWidth; 214 context.lineWidth = lineWidth;
204 context.strokeStyle = borderColor; 215 context.strokeStyle = borderColor;
205 context.stroke(); 216 context.stroke();
206 } 217 }
207 context.fill(); 218 context.fill();
208 context.restore(); 219 context.restore();
209 }, 220 },
210 221
211 __proto__: WebInspector.VBox.prototype 222 __proto__: WebInspector.VBox.prototype
212 } 223 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698