Commit 0312d8fe authored by yurys@chromium.org's avatar yurys@chromium.org

Get rid of WebInspector.TracingTimelineModel.Events.TracingComplete event

WebInspector.TimelineModel.Events.RecordingStopped is sufficient.

BUG=361045

Review URL: https://codereview.chromium.org/324683002

git-svn-id: svn://svn.chromium.org/blink/trunk@175796 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 125d0924
...@@ -79,8 +79,6 @@ WebInspector.TimelinePanel = function() ...@@ -79,8 +79,6 @@ WebInspector.TimelinePanel = function()
this._tracingModel.addEventListener(WebInspector.TracingModel.Events.BufferUsage, this._onTracingBufferUsage, this); this._tracingModel.addEventListener(WebInspector.TracingModel.Events.BufferUsage, this._onTracingBufferUsage, this);
this._tracingTimelineModel = new WebInspector.TracingTimelineModel(this._tracingModel); this._tracingTimelineModel = new WebInspector.TracingTimelineModel(this._tracingModel);
this._tracingTimelineModel.addEventListener(WebInspector.TracingTimelineModel.Events.TracingComplete, this._onTracingComplete, this);
this._model = this._tracingTimelineModel; this._model = this._tracingTimelineModel;
} else { } else {
this._model = new WebInspector.TimelineModelImpl(WebInspector.timelineManager); this._model = new WebInspector.TimelineModelImpl(WebInspector.timelineManager);
...@@ -205,7 +203,7 @@ WebInspector.TimelinePanel.prototype = { ...@@ -205,7 +203,7 @@ WebInspector.TimelinePanel.prototype = {
if (this._windowStartTime) if (this._windowStartTime)
return this._windowStartTime; return this._windowStartTime;
var minimumRecordTime = this._model.minimumRecordTime(); var minimumRecordTime = this._model.minimumRecordTime();
if (minimumRecordTime && minimumRecordTime != -1) if (minimumRecordTime && minimumRecordTime !== -1)
return minimumRecordTime; return minimumRecordTime;
return 0; return 0;
}, },
...@@ -218,7 +216,7 @@ WebInspector.TimelinePanel.prototype = { ...@@ -218,7 +216,7 @@ WebInspector.TimelinePanel.prototype = {
if (this._windowEndTime < Infinity) if (this._windowEndTime < Infinity)
return this._windowEndTime; return this._windowEndTime;
var maximumRecordTime = this._model.maximumRecordTime(); var maximumRecordTime = this._model.maximumRecordTime();
if (maximumRecordTime && maximumRecordTime != -1) if (maximumRecordTime && maximumRecordTime !== -1)
return maximumRecordTime; return maximumRecordTime;
return Infinity; return Infinity;
}, },
...@@ -675,16 +673,6 @@ WebInspector.TimelinePanel.prototype = { ...@@ -675,16 +673,6 @@ WebInspector.TimelinePanel.prototype = {
this._overviewControls[i].timelineStopped(); 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() _onProfilingStateChanged: function()
{ {
this._updateToggleTimelineButton(this.toggleTimelineButton.toggled); this._updateToggleTimelineButton(this.toggleTimelineButton.toggled);
...@@ -800,10 +788,18 @@ WebInspector.TimelinePanel.prototype = { ...@@ -800,10 +788,18 @@ WebInspector.TimelinePanel.prototype = {
_onRecordingStopped: function() _onRecordingStopped: function()
{ {
this._updateToggleTimelineButton(false); this._updateToggleTimelineButton(false);
if (this._lazyFrameModel && WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled()) { if (this._lazyFrameModel) {
this._lazyFrameModel.reset(); if (this._tracingTimelineModel) {
this._lazyFrameModel.addRecords(this._model.records()); 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(); this._hideProgressPane();
}, },
......
...@@ -92,10 +92,6 @@ WebInspector.TracingTimelineModel.RecordType = { ...@@ -92,10 +92,6 @@ WebInspector.TracingTimelineModel.RecordType = {
LayerTreeHostImplSnapshot: "cc::LayerTreeHostImpl" LayerTreeHostImplSnapshot: "cc::LayerTreeHostImpl"
}; };
WebInspector.TracingTimelineModel.Events = {
TracingComplete: "TracingComplete"
};
WebInspector.TracingTimelineModel.defaultTracingCategoryFilter = "*,disabled-by-default-cc.debug,disabled-by-default-devtools.timeline"; WebInspector.TracingTimelineModel.defaultTracingCategoryFilter = "*,disabled-by-default-cc.debug,disabled-by-default-devtools.timeline";
WebInspector.TracingTimelineModel.prototype = { WebInspector.TracingTimelineModel.prototype = {
...@@ -169,7 +165,6 @@ WebInspector.TracingTimelineModel.prototype = { ...@@ -169,7 +165,6 @@ WebInspector.TracingTimelineModel.prototype = {
this._inspectedTargetEvents.sort(WebInspector.TracingModel.Event.compareStartTime); this._inspectedTargetEvents.sort(WebInspector.TracingModel.Event.compareStartTime);
this._buildTimelineRecords(); this._buildTimelineRecords();
this.dispatchEventToListeners(WebInspector.TracingTimelineModel.Events.TracingComplete);
this.dispatchEventToListeners(WebInspector.TimelineModel.Events.RecordingStopped); this.dispatchEventToListeners(WebInspector.TimelineModel.Events.RecordingStopped);
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment