Chromium Code Reviews| 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 326 /** | 326 /** |
| 327 * @constructor | 327 * @constructor |
| 328 */ | 328 */ |
| 329 WebInspector.CountersGraph.Counter = function() | 329 WebInspector.CountersGraph.Counter = function() |
| 330 { | 330 { |
| 331 this.times = []; | 331 this.times = []; |
| 332 this.values = []; | 332 this.values = []; |
| 333 } | 333 } |
| 334 | 334 |
| 335 WebInspector.CountersGraph.Counter.prototype = { | 335 WebInspector.CountersGraph.Counter.prototype = { |
| 336 get minimumIndex() | |
|
pfeldman
2014/04/01 14:21:10
We try to not use getters in the new code. Also, r
| |
| 337 { | |
| 338 return this._minimumIndex; | |
| 339 }, | |
| 340 | |
| 341 get maximumIndex() | |
| 342 { | |
| 343 return this._maximumIndex; | |
| 344 }, | |
| 345 | |
| 346 get minTime() | |
| 347 { | |
| 348 return this._minTime; | |
| 349 }, | |
| 350 | |
| 351 get maxTime() | |
| 352 { | |
| 353 return this._maxTime; | |
| 354 }, | |
| 355 | |
| 336 /** | 356 /** |
| 337 * @param {number} time | 357 * @param {number} time |
| 338 * @param {number} value | 358 * @param {number} value |
| 339 */ | 359 */ |
| 340 appendSample: function(time, value) | 360 appendSample: function(time, value) |
| 341 { | 361 { |
| 342 if (this.values.length && this.values.peekLast() === value) | 362 if (this.values.length && this.values.peekLast() === value) |
| 343 return; | 363 return; |
| 344 this.times.push(time); | 364 this.times.push(time); |
| 345 this.values.push(value); | 365 this.values.push(value); |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 547 }, | 567 }, |
| 548 | 568 |
| 549 _toggleCheckbox: function(event) | 569 _toggleCheckbox: function(event) |
| 550 { | 570 { |
| 551 this.checked = !this.checked; | 571 this.checked = !this.checked; |
| 552 this.dispatchEventToListeners(WebInspector.SwatchCheckbox.Events.Changed ); | 572 this.dispatchEventToListeners(WebInspector.SwatchCheckbox.Events.Changed ); |
| 553 }, | 573 }, |
| 554 | 574 |
| 555 __proto__: WebInspector.Object.prototype | 575 __proto__: WebInspector.Object.prototype |
| 556 } | 576 } |
| OLD | NEW |