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

Unified Diff: Source/devtools/front_end/timeline/MemoryCountersGraph.js

Issue 344443007: Encapsulate implementation-specific timeline record handling in TimelineUIUtils (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/devtools.gypi ('k') | Source/devtools/front_end/timeline/TimelineEventOverview.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/timeline/MemoryCountersGraph.js
diff --git a/Source/devtools/front_end/timeline/MemoryCountersGraph.js b/Source/devtools/front_end/timeline/MemoryCountersGraph.js
index 6452dd907bca543952e628c86f80bfd2a02ebc8e..055733d2a58409ba3c5217f67e4ca34e0f161dc6 100644
--- a/Source/devtools/front_end/timeline/MemoryCountersGraph.js
+++ b/Source/devtools/front_end/timeline/MemoryCountersGraph.js
@@ -34,10 +34,12 @@
* @implements {WebInspector.TimelineModeView}
* @param {!WebInspector.TimelineModeViewDelegate} delegate
* @param {!WebInspector.TimelineModel} model
+ * @param {!WebInspector.TimelineUIUtils} uiUtils
*/
-WebInspector.MemoryCountersGraph = function(delegate, model)
+WebInspector.MemoryCountersGraph = function(delegate, model, uiUtils)
{
WebInspector.CountersGraph.call(this, WebInspector.UIString("MEMORY"), delegate, model);
+ this._uiUtils = uiUtils;
this._countersByName = {};
this._countersByName["jsHeapSizeUsed"] = this.createCounter(WebInspector.UIString("Used JS Heap"), WebInspector.UIString("JS Heap Size: %d"), "hsl(220, 90%, 43%)");
this._countersByName["documents"] = this.createCounter(WebInspector.UIString("Documents"), WebInspector.UIString("Documents: %d"), "hsl(0, 90%, 43%)");
@@ -69,7 +71,7 @@ WebInspector.MemoryCountersGraph.prototype = {
*/
function addStatistics(record)
{
- var counters = record.counters();
+ var counters = this._uiUtils.countersForRecord(record);
if (!counters)
return;
for (var name in counters) {
« no previous file with comments | « Source/devtools/devtools.gypi ('k') | Source/devtools/front_end/timeline/TimelineEventOverview.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698