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

Unified Diff: Source/devtools/front_end/timeline/TimelinePanel.js

Issue 319743002: Timeline: decouple TimelineFrameModel from TimelineModel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/timeline/TimelinePanel.js
diff --git a/Source/devtools/front_end/timeline/TimelinePanel.js b/Source/devtools/front_end/timeline/TimelinePanel.js
index 34320a53ad579bc63bbb2debd52cca241646b664..114dfe3fda7ece84082b3c27933ba15579cafe6e 100644
--- a/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -249,10 +249,11 @@ WebInspector.TimelinePanel.prototype = {
_frameModel: function()
{
if (!this._lazyFrameModel) {
- this._lazyFrameModel = new WebInspector.TimelineFrameModel(this._model);
+ this._lazyFrameModel = new WebInspector.TimelineFrameModel(this._model.target());
+ this._lazyFrameModel.setMergeRecords(!WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled() || !this._recordingInProgress);
+ this._lazyFrameModel.addRecords(this._model.records());
if (this._lazyTracingModel)
this._lazyFrameModel.addTraceEvents(this._tracingTimelineModel.inspectedTargetEvents(), this._lazyTracingModel.sessionId());
-
}
return this._lazyFrameModel;
},
@@ -671,6 +672,9 @@ WebInspector.TimelinePanel.prototype = {
this._tracingTimelineModel.willStartRecordingTraceEvents();
}
}
+ if (WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled() && this._lazyFrameModel)
+ this._lazyFrameModel.setMergeRecords(false);
+
for (var i = 0; i < this._overviewControls.length; ++i)
this._overviewControls[i].timelineStarted();
@@ -817,6 +821,10 @@ WebInspector.TimelinePanel.prototype = {
_onRecordingStopped: function()
{
this._updateToggleTimelineButton(false);
+ if (this._lazyFrameModel && WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled()) {
+ this._lazyFrameModel.reset();
+ this._lazyFrameModel.addRecords(this._model.records());
+ }
this._hideProgressPane();
},

Powered by Google App Engine
This is Rietveld 408576698