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

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: 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
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..5a75bfc9b1def731a32dfd1d946d7aec49550052 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)
+ this._updateProgress(WebInspector.UIString("Loading from file..."));
+ else
+ this._updateProgress(WebInspector.UIString("%d events collected", 0));
},
_recordingInProgress: function()

Powered by Google App Engine
This is Rietveld 408576698