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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineView.js

Issue 1514483002: DevTools: brush up new details cards on timeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 this._innerSetSelectedRecord(presentationRecord); 333 this._innerSetSelectedRecord(presentationRecord);
334 var aggregatedStats = {}; 334 var aggregatedStats = {};
335 var presentationChildren = presentationRecord.presentationChildren() ; 335 var presentationChildren = presentationRecord.presentationChildren() ;
336 for (var i = 0; i < presentationChildren.length; ++i) 336 for (var i = 0; i < presentationChildren.length; ++i)
337 WebInspector.TimelineUIUtils.aggregateTimeForRecord(aggregatedSt ats, this._model, presentationChildren[i].record()); 337 WebInspector.TimelineUIUtils.aggregateTimeForRecord(aggregatedSt ats, this._model, presentationChildren[i].record());
338 var idle = presentationRecord.endTime() - presentationRecord.startTi me(); 338 var idle = presentationRecord.endTime() - presentationRecord.startTi me();
339 for (var category in aggregatedStats) 339 for (var category in aggregatedStats)
340 idle -= aggregatedStats[category]; 340 idle -= aggregatedStats[category];
341 aggregatedStats["idle"] = idle; 341 aggregatedStats["idle"] = idle;
342 342
343 var contentHelper = new WebInspector.TimelineDetailsContentHelper(nu ll, null, null, true); 343 var contentHelper = new WebInspector.TimelineDetailsContentHelper(nu ll, null, null);
344 var pieChart = WebInspector.TimelineUIUtils.generatePieChart(aggrega tedStats); 344 var pieChart = WebInspector.TimelineUIUtils.generatePieChart(aggrega tedStats);
345 var title = WebInspector.TimelineUIUtils.eventTitle(presentationReco rd.record().traceEvent()); 345 var title = WebInspector.TimelineUIUtils.eventTitle(presentationReco rd.record().traceEvent());
346 contentHelper.appendTextRow(WebInspector.UIString("Type"), title); 346 contentHelper.appendTextRow(WebInspector.UIString("Type"), title);
347 contentHelper.appendElementRow(WebInspector.UIString("Aggregated Tim e"), pieChart); 347 contentHelper.appendElementRow(WebInspector.UIString("Aggregated Tim e"), pieChart);
348 this._delegate.showInDetails(contentHelper.element); 348 this._delegate.showInDetails(contentHelper.element);
349 return; 349 return;
350 } 350 }
351 this._delegate.select(WebInspector.TimelineSelection.fromRecord(presenta tionRecord.record())); 351 this._delegate.select(WebInspector.TimelineSelection.fromRecord(presenta tionRecord.record()));
352 }, 352 },
353 353
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
1311 } else { 1311 } else {
1312 this._element.classList.add("hidden"); 1312 this._element.classList.add("hidden");
1313 } 1313 }
1314 }, 1314 },
1315 1315
1316 _dispose: function() 1316 _dispose: function()
1317 { 1317 {
1318 this._element.remove(); 1318 this._element.remove();
1319 } 1319 }
1320 } 1320 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698