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

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

Issue 210053002: DevTools: merge MemoryStatistics.js and CountersGraph.js, extract DOMCountersGraph.js (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 11 matching lines...) Expand all
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 importScript("MemoryStatistics.js");
33 importScript("CountersGraph.js"); 32 importScript("CountersGraph.js");
33 importScript("DOMCountersGraph.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("TimelineFlameChart.js"); 42 importScript("TimelineFlameChart.js");
43 importScript("TimelineUIUtils.js"); 43 importScript("TimelineUIUtils.js");
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 */ 233 */
234 _timelineView: function() 234 _timelineView: function()
235 { 235 {
236 if (!this._lazyTimelineView) 236 if (!this._lazyTimelineView)
237 this._lazyTimelineView = new WebInspector.TimelineView(this, this._m odel); 237 this._lazyTimelineView = new WebInspector.TimelineView(this, this._m odel);
238 return this._lazyTimelineView; 238 return this._lazyTimelineView;
239 }, 239 },
240 240
241 /** 241 /**
242 * @param {string} mode 242 * @param {string} mode
243 * @return {!{overviewView: !WebInspector.TimelineOverview, mainViews: !Arra y.<!WebInspector.TimelineView>}}
243 */ 244 */
244 _viewsForMode: function(mode) 245 _viewsForMode: function(mode)
245 { 246 {
246 var views = this._viewsMap[mode]; 247 var views = this._viewsMap[mode];
247 if (!views) { 248 if (!views) {
248 views = {}; 249 views = {};
249 switch (mode) { 250 switch (mode) {
250 case WebInspector.TimelinePanel.Mode.Events: 251 case WebInspector.TimelinePanel.Mode.Events:
251 views.overviewView = new WebInspector.TimelineEventOverview(this ._model); 252 views.overviewView = new WebInspector.TimelineEventOverview(this ._model);
252 views.mainViews = [this._timelineView()]; 253 views.mainViews = [this._timelineView()];
253 break; 254 break;
254 case WebInspector.TimelinePanel.Mode.Frames: 255 case WebInspector.TimelinePanel.Mode.Frames:
255 views.overviewView = new WebInspector.TimelineFrameOverview(this ._model, this._frameModel()); 256 views.overviewView = new WebInspector.TimelineFrameOverview(this ._model, this._frameModel());
256 views.mainViews = [this._timelineView()]; 257 views.mainViews = [this._timelineView()];
257 break; 258 break;
258 case WebInspector.TimelinePanel.Mode.Memory: 259 case WebInspector.TimelinePanel.Mode.Memory:
259 views.overviewView = new WebInspector.TimelineMemoryOverview(thi s._model); 260 views.overviewView = new WebInspector.TimelineMemoryOverview(thi s._model);
260 views.mainViews = [this._timelineView(), new WebInspector.Counte rsGraph(this, this._model)]; 261 views.mainViews = [this._timelineView(), new WebInspector.DOMCou ntersGraph(this, this._model)];
261 break; 262 break;
262 case WebInspector.TimelinePanel.Mode.FlameChart: 263 case WebInspector.TimelinePanel.Mode.FlameChart:
263 views.overviewView = new WebInspector.TimelineFrameOverview(this ._model, this._frameModel()); 264 views.overviewView = new WebInspector.TimelineFrameOverview(this ._model, this._frameModel());
264 views.mainViews = [new WebInspector.TimelineFlameChart(this, thi s._model, this._frameModel())]; 265 views.mainViews = [new WebInspector.TimelineFlameChart(this, thi s._model, this._frameModel())];
265 break; 266 break;
266 default: 267 default:
267 console.assert(false, "Unknown mode: " + mode); 268 console.assert(false, "Unknown mode: " + mode);
268 } 269 }
269 for (var i = 0; i < views.mainViews.length; ++i) 270 for (var i = 0; i < views.mainViews.length; ++i)
270 views.mainViews[i].addEventListener(WebInspector.SplitView.Event s.SidebarSizeChanged, this._sidebarResized, this); 271 views.mainViews[i].addEventListener(WebInspector.SplitView.Event s.SidebarSizeChanged, this._sidebarResized, this);
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 * @param {!WebInspector.TimelineModel.Record} record 1110 * @param {!WebInspector.TimelineModel.Record} record
1110 * @return {boolean} 1111 * @return {boolean}
1111 */ 1112 */
1112 accept: function(record) 1113 accept: function(record)
1113 { 1114 {
1114 return !this._hiddenRecords[record.type]; 1115 return !this._hiddenRecords[record.type];
1115 }, 1116 },
1116 1117
1117 __proto__: WebInspector.TimelineModel.Filter.prototype 1118 __proto__: WebInspector.TimelineModel.Filter.prototype
1118 } 1119 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/TimelineOverviewPane.js ('k') | Source/devtools/scripts/frontend_modules.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698