| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 this._createCurrentValuesBar(); | 49 this._createCurrentValuesBar(); |
| 50 this._canvasView = new WebInspector.VBoxWithResizeCallback(this._resize.bind
(this)); | 50 this._canvasView = new WebInspector.VBoxWithResizeCallback(this._resize.bind
(this)); |
| 51 this._canvasView.show(this._graphsContainer); | 51 this._canvasView.show(this._graphsContainer); |
| 52 this._canvasContainer = this._canvasView.element; | 52 this._canvasContainer = this._canvasView.element; |
| 53 this._canvasContainer.id = "memory-graphs-canvas-container"; | 53 this._canvasContainer.id = "memory-graphs-canvas-container"; |
| 54 this._canvas = this._canvasContainer.createChild("canvas"); | 54 this._canvas = this._canvasContainer.createChild("canvas"); |
| 55 this._canvas.id = "memory-counters-graph"; | 55 this._canvas.id = "memory-counters-graph"; |
| 56 | 56 |
| 57 this._canvasContainer.addEventListener("mouseover", this._onMouseMove.bind(t
his), true); | 57 this._canvasContainer.addEventListener("mouseover", this._onMouseMove.bind(t
his), true); |
| 58 this._canvasContainer.addEventListener("mousemove", this._onMouseMove.bind(t
his), true); | 58 this._canvasContainer.addEventListener("mousemove", this._onMouseMove.bind(t
his), true); |
| 59 this._canvasContainer.addEventListener("mouseout", this._onMouseOut.bind(thi
s), true); | 59 this._canvasContainer.addEventListener("mouseleave", this._onMouseLeave.bind
(this), true); |
| 60 this._canvasContainer.addEventListener("click", this._onClick.bind(this), tr
ue); | 60 this._canvasContainer.addEventListener("click", this._onClick.bind(this), tr
ue); |
| 61 // We create extra timeline grid here to reuse its event dividers. | 61 // We create extra timeline grid here to reuse its event dividers. |
| 62 this._timelineGrid = new WebInspector.TimelineGrid(); | 62 this._timelineGrid = new WebInspector.TimelineGrid(); |
| 63 this._canvasContainer.appendChild(this._timelineGrid.dividersElement); | 63 this._canvasContainer.appendChild(this._timelineGrid.dividersElement); |
| 64 | 64 |
| 65 // Populate sidebar | 65 // Populate sidebar |
| 66 this.sidebarElement().createChild("div", "sidebar-tree sidebar-tree-section"
).textContent = title; | 66 this.sidebarElement().createChild("div", "sidebar-tree sidebar-tree-section"
).textContent = title; |
| 67 this._counters = []; | 67 this._counters = []; |
| 68 this._counterUI = []; | 68 this._counterUI = []; |
| 69 } | 69 } |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 recordToReveal = record; | 194 recordToReveal = record; |
| 195 return false; | 195 return false; |
| 196 } | 196 } |
| 197 this._model.forAllRecords(null, findRecordToReveal.bind(this)); | 197 this._model.forAllRecords(null, findRecordToReveal.bind(this)); |
| 198 this._delegate.select(recordToReveal ? WebInspector.TimelineSelection.fr
omRecord(recordToReveal) : null); | 198 this._delegate.select(recordToReveal ? WebInspector.TimelineSelection.fr
omRecord(recordToReveal) : null); |
| 199 }, | 199 }, |
| 200 | 200 |
| 201 /** | 201 /** |
| 202 * @param {!Event} event | 202 * @param {!Event} event |
| 203 */ | 203 */ |
| 204 _onMouseOut: function(event) | 204 _onMouseLeave: function(event) |
| 205 { | 205 { |
| 206 delete this._markerXPosition; | 206 delete this._markerXPosition; |
| 207 this._clearCurrentValueAndMarker(); | 207 this._clearCurrentValueAndMarker(); |
| 208 }, | 208 }, |
| 209 | 209 |
| 210 _clearCurrentValueAndMarker: function() | 210 _clearCurrentValueAndMarker: function() |
| 211 { | 211 { |
| 212 for (var i = 0; i < this._counterUI.length; i++) | 212 for (var i = 0; i < this._counterUI.length; i++) |
| 213 this._counterUI[i]._clearCurrentValueAndMarker(); | 213 this._counterUI[i]._clearCurrentValueAndMarker(); |
| 214 }, | 214 }, |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 }, | 554 }, |
| 555 | 555 |
| 556 _toggleCheckbox: function(event) | 556 _toggleCheckbox: function(event) |
| 557 { | 557 { |
| 558 this.checked = !this.checked; | 558 this.checked = !this.checked; |
| 559 this.dispatchEventToListeners(WebInspector.SwatchCheckbox.Events.Changed
); | 559 this.dispatchEventToListeners(WebInspector.SwatchCheckbox.Events.Changed
); |
| 560 }, | 560 }, |
| 561 | 561 |
| 562 __proto__: WebInspector.Object.prototype | 562 __proto__: WebInspector.Object.prototype |
| 563 } | 563 } |
| OLD | NEW |