| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 this._canvasContainer.addEventListener("mouseover", this._onMouseMove.bind(t
his), true); | 56 this._canvasContainer.addEventListener("mouseover", this._onMouseMove.bind(t
his), true); |
| 57 this._canvasContainer.addEventListener("mousemove", this._onMouseMove.bind(t
his), true); | 57 this._canvasContainer.addEventListener("mousemove", this._onMouseMove.bind(t
his), true); |
| 58 this._canvasContainer.addEventListener("mouseout", this._onMouseOut.bind(thi
s), true); | 58 this._canvasContainer.addEventListener("mouseout", this._onMouseOut.bind(thi
s), true); |
| 59 this._canvasContainer.addEventListener("click", this._onClick.bind(this), tr
ue); | 59 this._canvasContainer.addEventListener("click", this._onClick.bind(this), tr
ue); |
| 60 // We create extra timeline grid here to reuse its event dividers. | 60 // We create extra timeline grid here to reuse its event dividers. |
| 61 this._timelineGrid = new WebInspector.TimelineGrid(); | 61 this._timelineGrid = new WebInspector.TimelineGrid(); |
| 62 this._canvasContainer.appendChild(this._timelineGrid.dividersElement); | 62 this._canvasContainer.appendChild(this._timelineGrid.dividersElement); |
| 63 | 63 |
| 64 // Populate sidebar | 64 // Populate sidebar |
| 65 this.sidebarElement().createChild("div", "sidebar-tree sidebar-tree-section"
).textContent = WebInspector.UIString("COUNTERS"); | 65 this.sidebarElement().createChild("div", "sidebar-tree sidebar-tree-section"
).textContent = WebInspector.UIString("COUNTERS"); |
| 66 this._createAllCounters(); | 66 this.createAllCounters(); |
| 67 } | 67 } |
| 68 | 68 |
| 69 /** | 69 /** |
| 70 * @constructor | 70 * @constructor |
| 71 * @param {string} counterName | 71 * @param {string} counterName |
| 72 */ | 72 */ |
| 73 WebInspector.MemoryStatistics.Counter = function(counterName) | 73 WebInspector.MemoryStatistics.Counter = function(counterName) |
| 74 { | 74 { |
| 75 this.counterName = counterName; | 75 this.counterName = counterName; |
| 76 this.times = []; | 76 this.times = []; |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 return this._swatch.checked; | 244 return this._swatch.checked; |
| 245 }, | 245 }, |
| 246 } | 246 } |
| 247 | 247 |
| 248 WebInspector.MemoryStatistics.prototype = { | 248 WebInspector.MemoryStatistics.prototype = { |
| 249 _createCurrentValuesBar: function() | 249 _createCurrentValuesBar: function() |
| 250 { | 250 { |
| 251 throw new Error("Not implemented"); | 251 throw new Error("Not implemented"); |
| 252 }, | 252 }, |
| 253 | 253 |
| 254 _createAllCounters: function() | 254 createAllCounters: function() |
| 255 { | 255 { |
| 256 throw new Error("Not implemented"); | 256 throw new Error("Not implemented"); |
| 257 }, | 257 }, |
| 258 | 258 |
| 259 /** | 259 /** |
| 260 * @param {!WebInspector.TimelineModel.Record} record | 260 * @param {!WebInspector.TimelineModel.Record} record |
| 261 */ | 261 */ |
| 262 addRecord: function(record) | 262 addRecord: function(record) |
| 263 { | 263 { |
| 264 throw new Error("Not implemented"); | 264 throw new Error("Not implemented"); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 refresh: function() | 392 refresh: function() |
| 393 { | 393 { |
| 394 delete this._refreshTimer; | 394 delete this._refreshTimer; |
| 395 this._timelineGrid.updateDividers(this._calculator); | 395 this._timelineGrid.updateDividers(this._calculator); |
| 396 this.draw(); | 396 this.draw(); |
| 397 this._refreshCurrentValues(); | 397 this._refreshCurrentValues(); |
| 398 }, | 398 }, |
| 399 | 399 |
| 400 refreshRecords: function() | 400 refreshRecords: function() |
| 401 { | 401 { |
| 402 this.reset(); |
| 403 var records = this._model.records(); |
| 404 for (var i = 0; i < records.length; ++i) |
| 405 this.addRecord(records[i]); |
| 402 }, | 406 }, |
| 403 | 407 |
| 404 /** | 408 /** |
| 405 * @param {number} originY | 409 * @param {number} originY |
| 406 * @param {number} height | 410 * @param {number} height |
| 407 */ | 411 */ |
| 408 _setVerticalClip: function(originY, height) | 412 _setVerticalClip: function(originY, height) |
| 409 { | 413 { |
| 410 this._originY = originY; | 414 this._originY = originY; |
| 411 this._clippedHeight = height; | 415 this._clippedHeight = height; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 428 | 432 |
| 429 /** | 433 /** |
| 430 * @param {?WebInspector.TimelineModel.Record} record | 434 * @param {?WebInspector.TimelineModel.Record} record |
| 431 */ | 435 */ |
| 432 setSelectedRecord: function(record) | 436 setSelectedRecord: function(record) |
| 433 { | 437 { |
| 434 }, | 438 }, |
| 435 | 439 |
| 436 __proto__: WebInspector.SplitView.prototype | 440 __proto__: WebInspector.SplitView.prototype |
| 437 } | 441 } |
| OLD | NEW |