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

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

Issue 212843003: DevTools: Add TimelinePowerGraph (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 21 matching lines...) Expand all
32 importScript("CountersGraph.js"); 32 importScript("CountersGraph.js");
33 importScript("MemoryCountersGraph.js"); 33 importScript("MemoryCountersGraph.js");
34 importScript("PieChart.js"); 34 importScript("PieChart.js");
35 importScript("TimelineModel.js"); 35 importScript("TimelineModel.js");
36 importScript("TimelineOverviewPane.js"); 36 importScript("TimelineOverviewPane.js");
37 importScript("TimelinePresentationModel.js"); 37 importScript("TimelinePresentationModel.js");
38 importScript("TimelineFrameModel.js"); 38 importScript("TimelineFrameModel.js");
39 importScript("TimelineEventOverview.js"); 39 importScript("TimelineEventOverview.js");
40 importScript("TimelineFrameOverview.js"); 40 importScript("TimelineFrameOverview.js");
41 importScript("TimelineMemoryOverview.js"); 41 importScript("TimelineMemoryOverview.js");
42 importScript("TimelinePowerGraph.js");
42 importScript("TimelinePowerOverview.js"); 43 importScript("TimelinePowerOverview.js");
43 importScript("TimelineFlameChart.js"); 44 importScript("TimelineFlameChart.js");
44 importScript("TimelineUIUtils.js"); 45 importScript("TimelineUIUtils.js");
45 importScript("TimelineView.js"); 46 importScript("TimelineView.js");
46 47
47 /** 48 /**
48 * @constructor 49 * @constructor
49 * @extends {WebInspector.Panel} 50 * @extends {WebInspector.Panel}
50 * @implements {WebInspector.TimelineModeViewDelegate} 51 * @implements {WebInspector.TimelineModeViewDelegate}
51 * @implements {WebInspector.Searchable} 52 * @implements {WebInspector.Searchable}
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 case WebInspector.TimelinePanel.Mode.Memory: 262 case WebInspector.TimelinePanel.Mode.Memory:
262 views.overviewView = new WebInspector.TimelineMemoryOverview(thi s._model); 263 views.overviewView = new WebInspector.TimelineMemoryOverview(thi s._model);
263 views.mainViews = [this._timelineView(), new WebInspector.Memory CountersGraph(this, this._model)]; 264 views.mainViews = [this._timelineView(), new WebInspector.Memory CountersGraph(this, this._model)];
264 break; 265 break;
265 case WebInspector.TimelinePanel.Mode.FlameChart: 266 case WebInspector.TimelinePanel.Mode.FlameChart:
266 views.overviewView = new WebInspector.TimelineFrameOverview(this ._model, this._frameModel()); 267 views.overviewView = new WebInspector.TimelineFrameOverview(this ._model, this._frameModel());
267 views.mainViews = [new WebInspector.TimelineFlameChart(this, thi s._model, this._frameModel())]; 268 views.mainViews = [new WebInspector.TimelineFlameChart(this, thi s._model, this._frameModel())];
268 break; 269 break;
269 case WebInspector.TimelinePanel.Mode.Power: 270 case WebInspector.TimelinePanel.Mode.Power:
270 views.overviewView = new WebInspector.TimelinePowerOverview(this ._model); 271 views.overviewView = new WebInspector.TimelinePowerOverview(this ._model);
271 views.mainViews = [this._timelineView()]; 272 views.mainViews = [this._timelineView(), new WebInspector.Timeli nePowerGraph(this, this._model)];
272 break; 273 break;
273 default: 274 default:
274 console.assert(false, "Unknown mode: " + mode); 275 console.assert(false, "Unknown mode: " + mode);
275 } 276 }
276 for (var i = 0; i < views.mainViews.length; ++i) 277 for (var i = 0; i < views.mainViews.length; ++i)
277 views.mainViews[i].addEventListener(WebInspector.SplitView.Event s.SidebarSizeChanged, this._sidebarResized, this); 278 views.mainViews[i].addEventListener(WebInspector.SplitView.Event s.SidebarSizeChanged, this._sidebarResized, this);
278 this._viewsMap[mode] = views; 279 this._viewsMap[mode] = views;
279 } 280 }
280 281
281 this._timelineView().setFrameModel(mode === WebInspector.TimelinePanel.M ode.Frames ? this._frameModel() : null); 282 this._timelineView().setFrameModel(mode === WebInspector.TimelinePanel.M ode.Frames ? this._frameModel() : null);
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 * @param {!WebInspector.TimelineModel.Record} record 1123 * @param {!WebInspector.TimelineModel.Record} record
1123 * @return {boolean} 1124 * @return {boolean}
1124 */ 1125 */
1125 accept: function(record) 1126 accept: function(record)
1126 { 1127 {
1127 return !this._hiddenRecords[record.type]; 1128 return !this._hiddenRecords[record.type];
1128 }, 1129 },
1129 1130
1130 __proto__: WebInspector.TimelineModel.Filter.prototype 1131 __proto__: WebInspector.TimelineModel.Filter.prototype
1131 } 1132 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698