Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Side by Side Diff: Source/devtools/front_end/CountersGraph.js

Issue 212843003: DevTools: Add TimelinePowerGraph (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/devtools/devtools.gypi ('k') | Source/devtools/front_end/MemoryCountersGraph.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 refresh: function() 217 refresh: function()
218 { 218 {
219 delete this._refreshTimer; 219 delete this._refreshTimer;
220 this._timelineGrid.updateDividers(this._calculator); 220 this._timelineGrid.updateDividers(this._calculator);
221 this.draw(); 221 this.draw();
222 this._refreshCurrentValues(); 222 this._refreshCurrentValues();
223 }, 223 },
224 224
225 refreshRecords: function() 225 refreshRecords: function()
226 { 226 {
227 this.reset();
228 var records = this._model.records();
229 for (var i = 0; i < records.length; ++i)
230 this.addRecord(records[i]);
231 }, 227 },
232 228
233 /** 229 /**
234 * @param {number} originY 230 * @param {number} originY
235 * @param {number} height 231 * @param {number} height
236 */ 232 */
237 _setVerticalClip: function(originY, height) 233 _setVerticalClip: function(originY, height)
238 { 234 {
239 this._originY = originY; 235 this._originY = originY;
240 this._clippedHeight = height; 236 this._clippedHeight = height;
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 { 425 {
430 this._range.textContent = ""; 426 this._range.textContent = "";
431 }, 427 },
432 428
433 /** 429 /**
434 * @param {number} minValue 430 * @param {number} minValue
435 * @param {number} maxValue 431 * @param {number} maxValue
436 */ 432 */
437 setRange: function(minValue, maxValue) 433 setRange: function(minValue, maxValue)
438 { 434 {
439 this._range.textContent = WebInspector.UIString("[%d:%d]", minValue, max Value); 435 this._range.textContent = WebInspector.UIString("[%.0f:%.0f]", minValue, maxValue);
440 }, 436 },
441 437
442 _toggleCounterGraph: function(event) 438 _toggleCounterGraph: function(event)
443 { 439 {
444 this._value.classList.toggle("hidden", !this._swatch.checked); 440 this._value.classList.toggle("hidden", !this._swatch.checked);
445 this._memoryCountersPane.refresh(); 441 this._memoryCountersPane.refresh();
446 }, 442 },
447 443
448 /** 444 /**
449 * @param {number} x 445 * @param {number} x
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 }, 516 },
521 517
522 _toggleCheckbox: function(event) 518 _toggleCheckbox: function(event)
523 { 519 {
524 this.checked = !this.checked; 520 this.checked = !this.checked;
525 this.dispatchEventToListeners(WebInspector.SwatchCheckbox.Events.Changed ); 521 this.dispatchEventToListeners(WebInspector.SwatchCheckbox.Events.Changed );
526 }, 522 },
527 523
528 __proto__: WebInspector.Object.prototype 524 __proto__: WebInspector.Object.prototype
529 } 525 }
OLDNEW
« no previous file with comments | « Source/devtools/devtools.gypi ('k') | Source/devtools/front_end/MemoryCountersGraph.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698