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()
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();
},
......
......@@ -92,10 +92,6 @@ WebInspector.TracingTimelineModel.RecordType = {
LayerTreeHostImplSnapshot: "cc::LayerTreeHostImpl"
};
WebInspector.TracingTimelineModel.Events = {
TracingComplete: "TracingComplete"
};
WebInspector.TracingTimelineModel.defaultTracingCategoryFilter = "*,disabled-by-default-cc.debug,disabled-by-default-devtools.timeline";
WebInspector.TracingTimelineModel.prototype = {
......@@ -169,7 +165,6 @@ WebInspector.TracingTimelineModel.prototype = {
this._inspectedTargetEvents.sort(WebInspector.TracingModel.Event.compareStartTime);
this._buildTimelineRecords();
this.dispatchEventToListeners(WebInspector.TracingTimelineModel.Events.TracingComplete);
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