| OLD | NEW |
| 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 17 matching lines...) Expand all Loading... |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 /** | 31 /** |
| 32 * @constructor | 32 * @constructor |
| 33 * @extends {WebInspector.TimelineOverviewBase} | 33 * @extends {WebInspector.TimelineOverviewBase} |
| 34 * @param {!WebInspector.TimelineModel} model | 34 * @param {!WebInspector.TimelineModel} model |
| 35 */ | 35 */ |
| 36 WebInspector.TimelineMemoryOverview = function(model) | 36 WebInspector.TimelineMemoryOverview = function(model) |
| 37 { | 37 { |
| 38 WebInspector.TimelineOverviewBase.call(this, model); | 38 WebInspector.TimelineOverviewBase.call(this); |
| 39 this.element.id = "timeline-overview-memory"; | 39 this.element.id = "timeline-overview-memory"; |
| 40 this._model = model; |
| 40 | 41 |
| 41 this._heapSizeLabel = this.element.createChild("div", "memory-graph-label"); | 42 this._heapSizeLabel = this.element.createChild("div", "memory-graph-label"); |
| 42 } | 43 } |
| 43 | 44 |
| 44 WebInspector.TimelineMemoryOverview.prototype = { | 45 WebInspector.TimelineMemoryOverview.prototype = { |
| 45 resetHeapSizeLabels: function() | 46 resetHeapSizeLabels: function() |
| 46 { | 47 { |
| 47 this._heapSizeLabel.textContent = ""; | 48 this._heapSizeLabel.textContent = ""; |
| 48 }, | 49 }, |
| 49 | 50 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 ctx.fill(); | 144 ctx.fill(); |
| 144 ctx.lineWidth = lineWidth; | 145 ctx.lineWidth = lineWidth; |
| 145 ctx.strokeStyle = "hsl(220, 90%, 70%)"; | 146 ctx.strokeStyle = "hsl(220, 90%, 70%)"; |
| 146 ctx.stroke(); | 147 ctx.stroke(); |
| 147 | 148 |
| 148 this._heapSizeLabel.textContent = WebInspector.UIString("%s \u2013 %s",
Number.bytesToString(minUsedHeapSize), Number.bytesToString(maxUsedHeapSize)); | 149 this._heapSizeLabel.textContent = WebInspector.UIString("%s \u2013 %s",
Number.bytesToString(minUsedHeapSize), Number.bytesToString(maxUsedHeapSize)); |
| 149 }, | 150 }, |
| 150 | 151 |
| 151 __proto__: WebInspector.TimelineOverviewBase.prototype | 152 __proto__: WebInspector.TimelineOverviewBase.prototype |
| 152 } | 153 } |
| OLD | NEW |