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

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

Issue 320953002: Timeline: split frame model into trace-specific and record-specific parts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased and removed extra semicolon 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 unified diff | Download patch | Annotate | Revision Log
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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 /** 242 /**
243 * @param {number} windowStartTime 243 * @param {number} windowStartTime
244 * @param {number} windowEndTime 244 * @param {number} windowEndTime
245 */ 245 */
246 requestWindowTimes: function(windowStartTime, windowEndTime) 246 requestWindowTimes: function(windowStartTime, windowEndTime)
247 { 247 {
248 this._overviewPane.requestWindowTimes(windowStartTime, windowEndTime); 248 this._overviewPane.requestWindowTimes(windowStartTime, windowEndTime);
249 }, 249 },
250 250
251 /** 251 /**
252 * @return {!WebInspector.TimelineFrameModel} 252 * @return {!WebInspector.TimelineFrameModelBase}
253 */ 253 */
254 _frameModel: function() 254 _frameModel: function()
255 { 255 {
256 if (!this._lazyFrameModel) { 256 if (this._lazyFrameModel)
257 this._lazyFrameModel = new WebInspector.TimelineFrameModel(this._mod el.target()); 257 return this._lazyFrameModel;
258 this._lazyFrameModel.setMergeRecords(!WebInspector.experimentsSettin gs.timelineNoLiveUpdate.isEnabled() || !this._recordingInProgress); 258 if (this._tracingModel) {
259 this._lazyFrameModel.addRecords(this._model.records()); 259 var tracingFrameModel = new WebInspector.TracingTimelineFrameModel(t his._model.target());
260 if (this._tracingModel) 260 tracingFrameModel.addTraceEvents(this._tracingTimelineModel.inspecte dTargetEvents(), this._tracingModel.sessionId() || "");
261 this._lazyFrameModel.addTraceEvents(this._tracingTimelineModel.i nspectedTargetEvents(), this._tracingModel.sessionId() || ""); 261 this._lazyFrameModel = tracingFrameModel;
262 } else {
263 var frameModel = new WebInspector.TimelineFrameModel(this._model.tar get());
264 frameModel.setMergeRecords(!WebInspector.experimentsSettings.timelin eNoLiveUpdate.isEnabled() || !this._recordingInProgress);
265 frameModel.addRecords(this._model.records());
266 this._lazyFrameModel = frameModel;
262 } 267 }
263 return this._lazyFrameModel; 268 return this._lazyFrameModel;
264 }, 269 },
265 270
266 /** 271 /**
267 * @return {!WebInspector.TimelineView} 272 * @return {!WebInspector.TimelineView}
268 */ 273 */
269 _timelineView: function() 274 _timelineView: function()
270 { 275 {
271 if (!this._lazyTimelineView) 276 if (!this._lazyTimelineView)
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 _onRecordAdded: function(event) 807 _onRecordAdded: function(event)
803 { 808 {
804 this._addRecord(/** @type {!WebInspector.TimelineModel.Record} */(event. data)); 809 this._addRecord(/** @type {!WebInspector.TimelineModel.Record} */(event. data));
805 }, 810 },
806 811
807 /** 812 /**
808 * @param {!WebInspector.TimelineModel.Record} record 813 * @param {!WebInspector.TimelineModel.Record} record
809 */ 814 */
810 _addRecord: function(record) 815 _addRecord: function(record)
811 { 816 {
812 if (this._lazyFrameModel) 817 if (this._lazyFrameModel && !this._tracingModel)
813 this._lazyFrameModel.addRecord(record); 818 this._lazyFrameModel.addRecord(record);
814 for (var i = 0; i < this._currentViews.length; ++i) 819 for (var i = 0; i < this._currentViews.length; ++i)
815 this._currentViews[i].addRecord(record); 820 this._currentViews[i].addRecord(record);
816 this._overviewPane.addRecord(record); 821 this._overviewPane.addRecord(record);
817 this._updateSearchHighlight(false, true); 822 this._updateSearchHighlight(false, true);
818 }, 823 },
819 824
820 /** 825 /**
821 * @param {!WebInspector.Event} event 826 * @param {!WebInspector.Event} event
822 */ 827 */
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
1418 * @param {!WebInspector.TimelineModel.Record} record 1423 * @param {!WebInspector.TimelineModel.Record} record
1419 * @return {boolean} 1424 * @return {boolean}
1420 */ 1425 */
1421 accept: function(record) 1426 accept: function(record)
1422 { 1427 {
1423 return !this._hiddenRecords[record.type()]; 1428 return !this._hiddenRecords[record.type()];
1424 }, 1429 },
1425 1430
1426 __proto__: WebInspector.TimelineModel.Filter.prototype 1431 __proto__: WebInspector.TimelineModel.Filter.prototype
1427 } 1432 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineFrameOverview.js ('k') | Source/devtools/front_end/timeline/TimelineView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698