OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 this._canvasContainer = canvasWidget.element; | 60 this._canvasContainer = canvasWidget.element; |
61 this._canvasContainer.id = 'memory-graphs-canvas-container'; | 61 this._canvasContainer.id = 'memory-graphs-canvas-container'; |
62 this._canvas = this._canvasContainer.createChild('canvas'); | 62 this._canvas = this._canvasContainer.createChild('canvas'); |
63 this._canvas.id = 'memory-counters-graph'; | 63 this._canvas.id = 'memory-counters-graph'; |
64 | 64 |
65 this._canvasContainer.addEventListener('mouseover', this._onMouseMove.bind(t
his), true); | 65 this._canvasContainer.addEventListener('mouseover', this._onMouseMove.bind(t
his), true); |
66 this._canvasContainer.addEventListener('mousemove', this._onMouseMove.bind(t
his), true); | 66 this._canvasContainer.addEventListener('mousemove', this._onMouseMove.bind(t
his), true); |
67 this._canvasContainer.addEventListener('mouseleave', this._onMouseLeave.bind
(this), true); | 67 this._canvasContainer.addEventListener('mouseleave', this._onMouseLeave.bind
(this), true); |
68 this._canvasContainer.addEventListener('click', this._onClick.bind(this), tr
ue); | 68 this._canvasContainer.addEventListener('click', this._onClick.bind(this), tr
ue); |
69 // We create extra timeline grid here to reuse its event dividers. | 69 // We create extra timeline grid here to reuse its event dividers. |
70 this._timelineGrid = new UI.TimelineGrid(); | 70 this._timelineGrid = new PerfUI.TimelineGrid(); |
71 this._canvasContainer.appendChild(this._timelineGrid.dividersElement); | 71 this._canvasContainer.appendChild(this._timelineGrid.dividersElement); |
72 | 72 |
73 this._counters = []; | 73 this._counters = []; |
74 this._counterUI = []; | 74 this._counterUI = []; |
75 } | 75 } |
76 | 76 |
77 _createCurrentValuesBar() { | 77 _createCurrentValuesBar() { |
78 this._currentValuesBar = this._graphsContainer.element.createChild('div'); | 78 this._currentValuesBar = this._graphsContainer.element.createChild('div'); |
79 this._currentValuesBar.id = 'counter-values-bar'; | 79 this._currentValuesBar.id = 'counter-values-bar'; |
80 } | 80 } |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 | 515 |
516 /** | 516 /** |
517 * @return {boolean} | 517 * @return {boolean} |
518 */ | 518 */ |
519 visible() { | 519 visible() { |
520 return this._filter.checked(); | 520 return this._filter.checked(); |
521 } | 521 } |
522 }; | 522 }; |
523 | 523 |
524 /** | 524 /** |
525 * @implements {UI.TimelineGrid.Calculator} | 525 * @implements {PerfUI.TimelineGrid.Calculator} |
526 * @unrestricted | 526 * @unrestricted |
527 */ | 527 */ |
528 Timeline.CounterGraphCalculator = class { | 528 Timeline.CounterGraphCalculator = class { |
529 /** | 529 /** |
530 * @param {!TimelineModel.TimelineModel} model | 530 * @param {!TimelineModel.TimelineModel} model |
531 */ | 531 */ |
532 constructor(model) { | 532 constructor(model) { |
533 this._model = model; | 533 this._model = model; |
534 } | 534 } |
535 | 535 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 /** | 601 /** |
602 * @override | 602 * @override |
603 * @return {number} | 603 * @return {number} |
604 */ | 604 */ |
605 boundarySpan() { | 605 boundarySpan() { |
606 return this._maximumBoundary - this._minimumBoundary; | 606 return this._maximumBoundary - this._minimumBoundary; |
607 } | 607 } |
608 }; | 608 }; |
609 | 609 |
610 Timeline.CounterGraphCalculator._minWidth = 5; | 610 Timeline.CounterGraphCalculator._minWidth = 5; |
OLD | NEW |