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

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

Issue 2675833002: DevTools: simplify TimelineOverview interface, move windowTimes()/windowBoundaries() to pane (Closed)
Patch Set: also always assume leftPadding to be 0 Created 3 years, 10 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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.NetworkOverview = class extends PerfUI.TimelineOverviewBase { 7 Network.NetworkOverview = class extends PerfUI.TimelineOverviewBase {
8 constructor() { 8 constructor() {
9 super(); 9 super();
10 this._selectedFilmStripTime = -1; 10 this._selectedFilmStripTime = -1;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 wasShown() { 95 wasShown() {
96 this.onResize(); 96 this.onResize();
97 } 97 }
98 98
99 /** 99 /**
100 * @override 100 * @override
101 */ 101 */
102 onResize() { 102 onResize() {
103 var width = this.element.offsetWidth; 103 var width = this.element.offsetWidth;
104 var height = this.element.offsetHeight; 104 var height = this.element.offsetHeight;
105 this.calculator().setDisplayWindow(width); 105 this.calculator().setDisplayWidth(width);
106 this.resetCanvas(); 106 this.resetCanvas();
107 var numBands = (((height - 1) / Network.NetworkOverview._bandHeight) - 1) | 0; 107 var numBands = (((height - 1) / Network.NetworkOverview._bandHeight) - 1) | 0;
108 this._numBands = (numBands > 0) ? numBands : 1; 108 this._numBands = (numBands > 0) ? numBands : 1;
109 this.scheduleUpdate(); 109 this.scheduleUpdate();
110 } 110 }
111 111
112 /** 112 /**
113 * @override 113 * @override
114 */ 114 */
115 reset() { 115 reset() {
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 } 270 }
271 context.restore(); 271 context.restore();
272 } 272 }
273 }; 273 };
274 274
275 /** @type {number} */ 275 /** @type {number} */
276 Network.NetworkOverview._bandHeight = 3; 276 Network.NetworkOverview._bandHeight = 3;
277 277
278 /** @typedef {{start: number, end: number}} */ 278 /** @typedef {{start: number, end: number}} */
279 Network.NetworkOverview.Window; 279 Network.NetworkOverview.Window;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698