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

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: rebased 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
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineModelImpl.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 07233443e02da1c2f210e12170feccf6daac44f5..f677fac77737468be65cea8fb37929874c1961d8 100644
--- a/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -250,10 +250,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;
},
@@ -672,6 +673,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();
@@ -818,6 +822,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();
},
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineModelImpl.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698