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

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

Issue 219363002: Timeline: replace showAggregatedStatsInDetails with a more generic showInDetails (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/TimelinePanel.js ('k') | no next file » | 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 // Presentation record does not have model record to highlight. 316 // Presentation record does not have model record to highlight.
317 this._innerSetSelectedRecord(presentationRecord); 317 this._innerSetSelectedRecord(presentationRecord);
318 var aggregatedStats = {}; 318 var aggregatedStats = {};
319 var presentationChildren = presentationRecord.presentationChildren() ; 319 var presentationChildren = presentationRecord.presentationChildren() ;
320 for (var i = 0; i < presentationChildren.length; ++i) 320 for (var i = 0; i < presentationChildren.length; ++i)
321 WebInspector.TimelineUIUtils.aggregateTimeByCategory(aggregatedS tats, presentationChildren[i].record().aggregatedStats); 321 WebInspector.TimelineUIUtils.aggregateTimeByCategory(aggregatedS tats, presentationChildren[i].record().aggregatedStats);
322 var idle = presentationRecord.record().endTime - presentationRecord. record().startTime; 322 var idle = presentationRecord.record().endTime - presentationRecord. record().startTime;
323 for (var category in aggregatedStats) 323 for (var category in aggregatedStats)
324 idle -= aggregatedStats[category]; 324 idle -= aggregatedStats[category];
325 aggregatedStats["idle"] = idle; 325 aggregatedStats["idle"] = idle;
326 this._delegate.showAggregatedStatsInDetails(WebInspector.TimelineUIU tils.recordStyle(presentationRecord.record()).title, aggregatedStats); 326 var pieChart = WebInspector.TimelineUIUtils.generatePieChart(aggrega tedStats);
327 this._delegate.showInDetails(WebInspector.TimelineUIUtils.recordStyl e(presentationRecord.record()).title, pieChart);
327 return; 328 return;
328 } 329 }
329 this._delegate.selectRecord(presentationRecord ? presentationRecord.reco rd() : null); 330 this._delegate.selectRecord(presentationRecord ? presentationRecord.reco rd() : null);
330 }, 331 },
331 332
332 /** 333 /**
333 * @param {?WebInspector.TimelineModel.Record} record 334 * @param {?WebInspector.TimelineModel.Record} record
334 */ 335 */
335 setSelectedRecord: function(record) 336 setSelectedRecord: function(record)
336 { 337 {
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 this._element.classList.remove("hidden"); 1245 this._element.classList.remove("hidden");
1245 } else 1246 } else
1246 this._element.classList.add("hidden"); 1247 this._element.classList.add("hidden");
1247 }, 1248 },
1248 1249
1249 _dispose: function() 1250 _dispose: function()
1250 { 1251 {
1251 this._element.remove(); 1252 this._element.remove();
1252 } 1253 }
1253 } 1254 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/TimelinePanel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698