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

Unified Diff: Source/devtools/front_end/TimelineModel.js

Issue 197233006: DevTools: Allow disabling timeline live update as an experiment. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/TimelineManager.js ('k') | Source/devtools/front_end/TimelinePanel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/TimelineModel.js
diff --git a/Source/devtools/front_end/TimelineModel.js b/Source/devtools/front_end/TimelineModel.js
index 79a22797680dc2fd7111b7a57263c06a85f2a8c2..7c43529dc518bd8a35bfa1a17a54997aa8e26e57 100644
--- a/Source/devtools/front_end/TimelineModel.js
+++ b/Source/devtools/front_end/TimelineModel.js
@@ -221,14 +221,15 @@ WebInspector.TimelineModel.prototype = {
this._clientInitiatedRecording = true;
this.reset();
var maxStackFrames = WebInspector.settings.timelineCaptureStacks.get() ? 30 : 0;
+ var bufferEvents = WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled() && !WebInspector.settings.timelineLiveUpdate.get();
var includeGPUEvents = WebInspector.experimentsSettings.gpuTimeline.isEnabled();
- WebInspector.timelineManager.start(maxStackFrames, includeCounters, includeGPUEvents, this._fireRecordingStarted.bind(this));
+ WebInspector.timelineManager.start(maxStackFrames, bufferEvents, includeCounters, includeGPUEvents, this._fireRecordingStarted.bind(this));
},
stopRecording: function()
{
if (!this._clientInitiatedRecording) {
- WebInspector.timelineManager.start(undefined, undefined, undefined, stopTimeline.bind(this));
+ WebInspector.timelineManager.start(undefined, undefined, undefined, undefined, stopTimeline.bind(this));
return;
}
@@ -281,7 +282,7 @@ WebInspector.TimelineModel.prototype = {
{
if (event.data) {
// Stopped from console.
- this._fireRecordingStopped();
+ this._fireRecordingStopped(null);
}
},
@@ -291,9 +292,15 @@ WebInspector.TimelineModel.prototype = {
this.dispatchEventToListeners(WebInspector.TimelineModel.Events.RecordingStarted);
},
- _fireRecordingStopped: function()
+ /**
+ * @param {?Protocol.Error} error
+ * @param {!Array.<!TimelineAgent.TimelineEvent>=} events
+ */
+ _fireRecordingStopped: function(error, events)
{
this._collectionEnabled = false;
+ for (var i = 0; events && i < events.length; ++i)
+ this._addRecord(events[i]);
this.dispatchEventToListeners(WebInspector.TimelineModel.Events.RecordingStopped);
},
« no previous file with comments | « Source/devtools/front_end/TimelineManager.js ('k') | Source/devtools/front_end/TimelinePanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698