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

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

Issue 705273002: DevTools: loading timeline pretends it is recording w/ 0 events collected. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Pass fromFile as event data field Created 6 years, 1 month 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 | « no previous file | Source/devtools/front_end/timeline/TracingTimelineModel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/timeline/TimelinePanel.js
diff --git a/Source/devtools/front_end/timeline/TimelinePanel.js b/Source/devtools/front_end/timeline/TimelinePanel.js
index 676950fc42c3d0cd7be8860129fd912e9de552bc..0cce28d40dfebe9780676bffabba3c69bacd58de 100644
--- a/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -481,8 +481,18 @@ WebInspector.TimelinePanel.prototype = {
this._updateToggleTimelineButton(false);
this._stopRecording();
}
+
+ /**
+ * @this {!WebInspector.TimelinePanel}
+ */
+ function finishLoading()
+ {
+ this._setOperationInProgress(null);
+ this._updateToggleTimelineButton(false);
+ this._hideProgressPane();
+ }
var progressIndicator = new WebInspector.ProgressIndicator();
- progressIndicator.addEventListener(WebInspector.Progress.Events.Done, this._setOperationInProgress.bind(this, null));
+ progressIndicator.addEventListener(WebInspector.Progress.Events.Done, finishLoading.bind(this));
this._setOperationInProgress(progressIndicator);
return progressIndicator;
},
@@ -746,10 +756,16 @@ WebInspector.TimelinePanel.prototype = {
this._updateSelectionDetails();
},
- _onRecordingStarted: function()
+ /**
+ * @param {!WebInspector.Event} event
+ */
+ _onRecordingStarted: function(event)
{
this._updateToggleTimelineButton(true);
- this._updateProgress(WebInspector.UIString("%d events collected", 0));
+ if (event.data && event.data.fromFile)
+ this._updateProgress(WebInspector.UIString("Loading from file..."));
+ else
+ this._updateProgress(WebInspector.UIString("%d events collected", 0));
},
_recordingInProgress: function()
« no previous file with comments | « no previous file | Source/devtools/front_end/timeline/TracingTimelineModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698