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

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

Issue 324683002: Get rid of WebInspector.TracingTimelineModel.Events.TracingComplete event (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
« no previous file with comments | « no previous file | Source/devtools/front_end/timeline/TracingTimelineModel.js » ('j') | 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 228aa09f83155ce4a70ac0aafbcb4c92d23d829f..3b5194a8558bc4634cfc78bfe063b809930d634e 100644
--- a/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -79,8 +79,6 @@ WebInspector.TimelinePanel = function()
this._tracingModel.addEventListener(WebInspector.TracingModel.Events.BufferUsage, this._onTracingBufferUsage, this);
this._tracingTimelineModel = new WebInspector.TracingTimelineModel(this._tracingModel);
- this._tracingTimelineModel.addEventListener(WebInspector.TracingTimelineModel.Events.TracingComplete, this._onTracingComplete, this);
-
this._model = this._tracingTimelineModel;
} else {
this._model = new WebInspector.TimelineModelImpl(WebInspector.timelineManager);
@@ -205,7 +203,7 @@ WebInspector.TimelinePanel.prototype = {
if (this._windowStartTime)
return this._windowStartTime;
var minimumRecordTime = this._model.minimumRecordTime();
- if (minimumRecordTime && minimumRecordTime != -1)
+ if (minimumRecordTime && minimumRecordTime !== -1)
return minimumRecordTime;
return 0;
},
@@ -218,7 +216,7 @@ WebInspector.TimelinePanel.prototype = {
if (this._windowEndTime < Infinity)
return this._windowEndTime;
var maximumRecordTime = this._model.maximumRecordTime();
- if (maximumRecordTime && maximumRecordTime != -1)
+ if (maximumRecordTime && maximumRecordTime !== -1)
return maximumRecordTime;
return Infinity;
},
@@ -675,16 +673,6 @@ WebInspector.TimelinePanel.prototype = {
this._overviewControls[i].timelineStopped();
},
- _onTracingComplete: function()
- {
- if (this._lazyFrameModel) {
- this._lazyFrameModel.reset();
- this._lazyFrameModel.addTraceEvents(this._tracingTimelineModel.inspectedTargetEvents(), this._tracingModel.sessionId());
- this._overviewPane.update();
- }
- this._refreshViews();
- },
-
_onProfilingStateChanged: function()
{
this._updateToggleTimelineButton(this.toggleTimelineButton.toggled);
@@ -800,10 +788,18 @@ WebInspector.TimelinePanel.prototype = {
_onRecordingStopped: function()
{
this._updateToggleTimelineButton(false);
- if (this._lazyFrameModel && WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled()) {
- this._lazyFrameModel.reset();
- this._lazyFrameModel.addRecords(this._model.records());
+ if (this._lazyFrameModel) {
+ if (this._tracingTimelineModel) {
+ this._lazyFrameModel.reset();
+ this._lazyFrameModel.addTraceEvents(this._tracingTimelineModel.inspectedTargetEvents(), this._tracingModel.sessionId());
+ this._overviewPane.update();
+ } else if (WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled()) {
+ this._lazyFrameModel.reset();
+ this._lazyFrameModel.addRecords(this._model.records());
+ }
}
+ if (this._tracingTimelineModel)
+ this._refreshViews();
this._hideProgressPane();
},
« no previous file with comments | « no previous file | Source/devtools/front_end/timeline/TracingTimelineModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698