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

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

Issue 2560043005: DevTools: Remove unused variables. Disallow unused variables with eslint (Closed)
Patch Set: Created 4 years 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 UI.TimelineOverviewBase { 7 Network.NetworkOverview = class extends UI.TimelineOverviewBase {
8 constructor() { 8 constructor() {
9 super(); 9 super();
10 this.element.classList.add('network-overview'); 10 this.element.classList.add('network-overview');
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 var newBoundary = 167 var newBoundary =
168 new Network.NetworkTimeBoundary(this._calculator.minimumBoundary(), this ._calculator.maximumBoundary()); 168 new Network.NetworkTimeBoundary(this._calculator.minimumBoundary(), this ._calculator.maximumBoundary());
169 if (!this._lastBoundary || !newBoundary.equals(this._lastBoundary)) { 169 if (!this._lastBoundary || !newBoundary.equals(this._lastBoundary)) {
170 var span = this._calculator.boundarySpan(); 170 var span = this._calculator.boundarySpan();
171 while (this._span < span) 171 while (this._span < span)
172 this._span *= 1.25; 172 this._span *= 1.25;
173 this._calculator.setBounds(this._calculator.minimumBoundary(), this._calcu lator.minimumBoundary() + this._span); 173 this._calculator.setBounds(this._calculator.minimumBoundary(), this._calcu lator.minimumBoundary() + this._span);
174 this._lastBoundary = 174 this._lastBoundary =
175 new Network.NetworkTimeBoundary(this._calculator.minimumBoundary(), th is._calculator.maximumBoundary()); 175 new Network.NetworkTimeBoundary(this._calculator.minimumBoundary(), th is._calculator.maximumBoundary());
176 if (this._windowStart || this._windowEnd) { 176 if (this._windowStart || this._windowEnd) {
177 this._restoringWindow = true; 177 this._restoringWindow = true;
dgozman 2016/12/10 02:15:14 Let's maybe remove more now?
einbinder 2016/12/12 20:41:18 Done.
178 var startTime = this._calculator.minimumBoundary();
179 var totalTime = this._calculator.boundarySpan();
dgozman 2016/12/10 02:15:14 Let's double-check for side-effects.
einbinder 2016/12/12 20:41:18 Done.
180 var left = (this._windowStart - startTime) / totalTime;
181 var right = (this._windowEnd - startTime) / totalTime;
182 this._restoringWindow = false; 178 this._restoringWindow = false;
183 } 179 }
184 } 180 }
185 181
186 var context = this._canvas.getContext('2d'); 182 var context = this._canvas.getContext('2d');
187 var calculator = this._calculator; 183 var calculator = this._calculator;
188 var linesByType = {}; 184 var linesByType = {};
189 var paddingTop = 2; 185 var paddingTop = 2;
190 186
191 /** 187 /**
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 } 285 }
290 context.restore(); 286 context.restore();
291 } 287 }
292 }; 288 };
293 289
294 /** @type {number} */ 290 /** @type {number} */
295 Network.NetworkOverview._bandHeight = 3; 291 Network.NetworkOverview._bandHeight = 3;
296 292
297 /** @typedef {{start: number, end: number}} */ 293 /** @typedef {{start: number, end: number}} */
298 Network.NetworkOverview.Window; 294 Network.NetworkOverview.Window;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698