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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui_lazy/TimelineOverviewPane.js

Issue 2440953003: DevTools: use semicolons after each statement. (Closed)
Patch Set: rebaseline 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 this._markers = new Map(); 53 this._markers = new Map();
54 54
55 this._popoverHelper = new WebInspector.PopoverHelper(this._cursorArea, this. _getPopoverAnchor.bind(this), this._showPopover.bind(this), this._onHidePopover. bind(this)); 55 this._popoverHelper = new WebInspector.PopoverHelper(this._cursorArea, this. _getPopoverAnchor.bind(this), this._showPopover.bind(this), this._onHidePopover. bind(this));
56 this._popoverHelper.setTimeout(0); 56 this._popoverHelper.setTimeout(0);
57 57
58 this._updateThrottler = new WebInspector.Throttler(100); 58 this._updateThrottler = new WebInspector.Throttler(100);
59 59
60 this._cursorEnabled = false; 60 this._cursorEnabled = false;
61 this._cursorPosition = 0; 61 this._cursorPosition = 0;
62 this._lastWidth = 0; 62 this._lastWidth = 0;
63 } 63 };
64 64
65 /** @enum {symbol} */ 65 /** @enum {symbol} */
66 WebInspector.TimelineOverviewPane.Events = { 66 WebInspector.TimelineOverviewPane.Events = {
67 WindowChanged: Symbol("WindowChanged") 67 WindowChanged: Symbol("WindowChanged")
68 }; 68 };
69 69
70 WebInspector.TimelineOverviewPane.prototype = { 70 WebInspector.TimelineOverviewPane.prototype = {
71 /** 71 /**
72 * @param {!Element} element 72 * @param {!Element} element
73 * @param {!Event} event 73 * @param {!Event} event
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 { 334 {
335 if (!this._overviewControls.length) 335 if (!this._overviewControls.length)
336 return; 336 return;
337 var windowBoundaries = this._overviewControls[0].windowBoundaries(this._ windowStartTime, this._windowEndTime); 337 var windowBoundaries = this._overviewControls[0].windowBoundaries(this._ windowStartTime, this._windowEndTime);
338 this._muteOnWindowChanged = true; 338 this._muteOnWindowChanged = true;
339 this._overviewGrid.setWindow(windowBoundaries.left, windowBoundaries.rig ht); 339 this._overviewGrid.setWindow(windowBoundaries.left, windowBoundaries.rig ht);
340 this._muteOnWindowChanged = false; 340 this._muteOnWindowChanged = false;
341 }, 341 },
342 342
343 __proto__: WebInspector.VBox.prototype 343 __proto__: WebInspector.VBox.prototype
344 } 344 };
345 345
346 /** 346 /**
347 * @constructor 347 * @constructor
348 * @extends {WebInspector.VBox} 348 * @extends {WebInspector.VBox}
349 */ 349 */
350 WebInspector.TimelineOverviewPane.PopoverContents = function() 350 WebInspector.TimelineOverviewPane.PopoverContents = function()
351 { 351 {
352 WebInspector.VBox.call(this, true); 352 WebInspector.VBox.call(this, true);
353 this.contentElement.classList.add("timeline-overview-popover"); 353 this.contentElement.classList.add("timeline-overview-popover");
354 } 354 };
355 355
356 WebInspector.TimelineOverviewPane.PopoverContents.prototype = { 356 WebInspector.TimelineOverviewPane.PopoverContents.prototype = {
357 __proto__: WebInspector.VBox.prototype 357 __proto__: WebInspector.VBox.prototype
358 } 358 };
359 359
360 /** 360 /**
361 * @constructor 361 * @constructor
362 * @implements {WebInspector.TimelineGrid.Calculator} 362 * @implements {WebInspector.TimelineGrid.Calculator}
363 */ 363 */
364 WebInspector.TimelineOverviewCalculator = function() 364 WebInspector.TimelineOverviewCalculator = function()
365 { 365 {
366 this.reset(); 366 this.reset();
367 } 367 };
368 368
369 WebInspector.TimelineOverviewCalculator.prototype = { 369 WebInspector.TimelineOverviewCalculator.prototype = {
370 /** 370 /**
371 * @override 371 * @override
372 * @return {number} 372 * @return {number}
373 */ 373 */
374 paddingLeft: function() 374 paddingLeft: function()
375 { 375 {
376 return this._paddingLeft; 376 return this._paddingLeft;
377 }, 377 },
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 }, 459 },
460 460
461 /** 461 /**
462 * @override 462 * @override
463 * @return {number} 463 * @return {number}
464 */ 464 */
465 boundarySpan: function() 465 boundarySpan: function()
466 { 466 {
467 return this._maximumBoundary - this._minimumBoundary; 467 return this._maximumBoundary - this._minimumBoundary;
468 } 468 }
469 } 469 };
470 470
471 /** 471 /**
472 * @interface 472 * @interface
473 */ 473 */
474 WebInspector.TimelineOverview = function() 474 WebInspector.TimelineOverview = function()
475 { 475 {
476 } 476 };
477 477
478 WebInspector.TimelineOverview.prototype = { 478 WebInspector.TimelineOverview.prototype = {
479 /** 479 /**
480 * @param {!Element} parentElement 480 * @param {!Element} parentElement
481 * @param {?Element=} insertBefore 481 * @param {?Element=} insertBefore
482 */ 482 */
483 show: function(parentElement, insertBefore) { }, 483 show: function(parentElement, insertBefore) { },
484 484
485 update: function() { }, 485 update: function() { },
486 486
(...skipping 23 matching lines...) Expand all
510 /** 510 /**
511 * @param {number} startTime 511 * @param {number} startTime
512 * @param {number} endTime 512 * @param {number} endTime
513 * @return {!{left: number, right: number}} 513 * @return {!{left: number, right: number}}
514 */ 514 */
515 windowBoundaries: function(startTime, endTime) { }, 515 windowBoundaries: function(startTime, endTime) { },
516 516
517 timelineStarted: function() { }, 517 timelineStarted: function() { },
518 518
519 timelineStopped: function() { }, 519 timelineStopped: function() { },
520 } 520 };
521 521
522 /** 522 /**
523 * @constructor 523 * @constructor
524 * @extends {WebInspector.VBox} 524 * @extends {WebInspector.VBox}
525 * @implements {WebInspector.TimelineOverview} 525 * @implements {WebInspector.TimelineOverview}
526 */ 526 */
527 WebInspector.TimelineOverviewBase = function() 527 WebInspector.TimelineOverviewBase = function()
528 { 528 {
529 WebInspector.VBox.call(this); 529 WebInspector.VBox.call(this);
530 /** @type {?WebInspector.TimelineOverviewCalculator} */ 530 /** @type {?WebInspector.TimelineOverviewCalculator} */
531 this._calculator = null; 531 this._calculator = null;
532 this._canvas = this.element.createChild("canvas", "fill"); 532 this._canvas = this.element.createChild("canvas", "fill");
533 this._context = this._canvas.getContext("2d"); 533 this._context = this._canvas.getContext("2d");
534 } 534 };
535 535
536 WebInspector.TimelineOverviewBase.prototype = { 536 WebInspector.TimelineOverviewBase.prototype = {
537 /** 537 /**
538 * @override 538 * @override
539 */ 539 */
540 update: function() 540 update: function()
541 { 541 {
542 this.resetCanvas(); 542 this.resetCanvas();
543 }, 543 },
544 544
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 }; 632 };
633 }, 633 },
634 634
635 resetCanvas: function() 635 resetCanvas: function()
636 { 636 {
637 this._canvas.width = this.element.clientWidth * window.devicePixelRatio; 637 this._canvas.width = this.element.clientWidth * window.devicePixelRatio;
638 this._canvas.height = this.element.clientHeight * window.devicePixelRati o; 638 this._canvas.height = this.element.clientHeight * window.devicePixelRati o;
639 }, 639 },
640 640
641 __proto__: WebInspector.VBox.prototype 641 __proto__: WebInspector.VBox.prototype
642 } 642 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698