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

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

Issue 476773002: Nuke TimelineAllEventsReceived event (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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/sdk/TimelineManager.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/TimelineModelImpl.js
diff --git a/Source/devtools/front_end/timeline/TimelineModelImpl.js b/Source/devtools/front_end/timeline/TimelineModelImpl.js
index 04e55ae0dbbb3adb0ae8a97c6dbf847e399c16d1..7ddf613545bfdbba6076111df691ab49e43bec62 100644
--- a/Source/devtools/front_end/timeline/TimelineModelImpl.js
+++ b/Source/devtools/front_end/timeline/TimelineModelImpl.js
@@ -20,7 +20,6 @@ WebInspector.TimelineModelImpl = function()
WebInspector.targetManager.addModelListener(WebInspector.TimelineManager, WebInspector.TimelineManager.EventTypes.TimelineEventRecorded, this._onRecordAdded, this);
WebInspector.targetManager.addModelListener(WebInspector.TimelineManager, WebInspector.TimelineManager.EventTypes.TimelineStarted, this._onStarted, this);
WebInspector.targetManager.addModelListener(WebInspector.TimelineManager, WebInspector.TimelineManager.EventTypes.TimelineStopped, this._onStopped, this);
- WebInspector.targetManager.addModelListener(WebInspector.TimelineManager, WebInspector.TimelineManager.EventTypes.TimelineAllEventsReceived, this._onAllEventsReceived, this);
WebInspector.targetManager.addModelListener(WebInspector.TimelineManager, WebInspector.TimelineManager.EventTypes.TimelineProgress, this._onProgress, this);
WebInspector.targetManager.observeTargets(this);
}
@@ -133,20 +132,16 @@ WebInspector.TimelineModelImpl.prototype = {
// We were buffering events, discard those that got through, the real ones are coming!
this.reset();
this._currentTarget = timelineManager.target();
- if (event.data) {
+
+ var events = /** @type {!Array.<!TimelineAgent.TimelineEvent>} */ (event.data.events);
+ for (var i = 0; i < events.length; ++i)
+ this._addRecord(events[i]);
+
+ if (event.data.consoleTimeline) {
// Stopped from console.
this._fireRecordingStopped(null, null);
}
- },
- /**
- * @param {!WebInspector.Event} event
- */
- _onAllEventsReceived: function(event)
- {
- var timelineManager = /** @type {!WebInspector.TimelineManager} */ (event.target);
- if (timelineManager.target() !== this._currentTarget)
- return;
this._collectionEnabled = false;
},
« no previous file with comments | « Source/devtools/front_end/sdk/TimelineManager.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698