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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 this._currentValueLabel = currentValueLabel; | 58 this._currentValueLabel = currentValueLabel; |
59 this._marker = memoryCountersPane._canvasContainer.createChild("div", "memor
y-counter-marker"); | 59 this._marker = memoryCountersPane._canvasContainer.createChild("div", "memor
y-counter-marker"); |
60 this._marker.style.backgroundColor = color; | 60 this._marker.style.backgroundColor = color; |
61 this.clearCurrentValueAndMarker(); | 61 this.clearCurrentValueAndMarker(); |
62 | 62 |
63 this.graphColor = color; | 63 this.graphColor = color; |
64 this.graphYValues = []; | 64 this.graphYValues = []; |
65 } | 65 } |
66 | 66 |
67 WebInspector.CounterUI.prototype = { | 67 WebInspector.CounterUI.prototype = { |
| 68 reset: function() |
| 69 { |
| 70 this._range.textContent = ""; |
| 71 }, |
| 72 |
68 /** | 73 /** |
69 * @param {number} minValue | 74 * @param {number} minValue |
70 * @param {number} maxValue | 75 * @param {number} maxValue |
71 */ | 76 */ |
72 setRange: function(minValue, maxValue) | 77 setRange: function(minValue, maxValue) |
73 { | 78 { |
74 this._range.textContent = WebInspector.UIString("[%d:%d]", minValue, max
Value); | 79 this._range.textContent = WebInspector.UIString("[%d:%d]", minValue, max
Value); |
75 }, | 80 }, |
76 | 81 |
77 __proto__: WebInspector.CounterUIBase.prototype | 82 __proto__: WebInspector.CounterUIBase.prototype |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 ctx.lineWidth = 1; | 202 ctx.lineWidth = 1; |
198 ctx.strokeStyle = counterUI.graphColor; | 203 ctx.strokeStyle = counterUI.graphColor; |
199 ctx.stroke(); | 204 ctx.stroke(); |
200 ctx.closePath(); | 205 ctx.closePath(); |
201 ctx.restore(); | 206 ctx.restore(); |
202 }, | 207 }, |
203 | 208 |
204 __proto__: WebInspector.MemoryStatistics.prototype | 209 __proto__: WebInspector.MemoryStatistics.prototype |
205 } | 210 } |
206 | 211 |
OLD | NEW |