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

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

Issue 214523005: DevTools: report timeline progress while recording. (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 a289e5e8a6ecd969fc03c3b61a266fbd2e83f0f4..f0655a2eb8c09e05f65c710207c9fae44fd50400 100644
--- a/Source/devtools/front_end/TimelineModel.js
+++ b/Source/devtools/front_end/TimelineModel.js
@@ -42,6 +42,7 @@ WebInspector.TimelineModel = function()
WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineEventRecorded, this._onRecordAdded, this);
WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineStarted, this._onStarted, this);
WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineStopped, this._onStopped, this);
+ WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.EventTypes.TimelineProgress, this._onProgress, this);
}
WebInspector.TimelineModel.TransferChunkLengthBytes = 5000000;
@@ -114,6 +115,7 @@ WebInspector.TimelineModel.Events = {
RecordsCleared: "RecordsCleared",
RecordingStarted: "RecordingStarted",
RecordingStopped: "RecordingStopped",
+ RecordingProgress: "RecordingProgress",
RecordFilterChanged: "RecordFilterChanged"
}
@@ -218,7 +220,7 @@ WebInspector.TimelineModel.prototype = {
this._clientInitiatedRecording = true;
this.reset();
var maxStackFrames = WebInspector.settings.timelineCaptureStacks.get() ? 30 : 0;
- this._bufferEvents = WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled() && !WebInspector.settings.timelineLiveUpdate.get();
+ this._bufferEvents = WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled();
var includeGPUEvents = WebInspector.experimentsSettings.gpuTimeline.isEnabled();
var liveEvents = [ WebInspector.TimelineModel.RecordType.BeginFrame,
WebInspector.TimelineModel.RecordType.DrawFrame,
@@ -288,6 +290,14 @@ WebInspector.TimelineModel.prototype = {
}
},
+ /**
+ * @param {!WebInspector.Event} event
+ */
+ _onProgress: function(event)
+ {
+ this.dispatchEventToListeners(WebInspector.TimelineModel.Events.RecordingProgress, event.data);
+ },
+
_fireRecordingStarted: function()
{
this._collectionEnabled = true;
« 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