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

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

Issue 2722993002: [DevTools] Turn TracingManager into SDKModel. (Closed)
Patch Set: review comment Created 3 years, 10 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 | « third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
index c660d14213fb759598e8232703df07822256e437..6eac0ce6f62cddffae33dbe9f662c1881109360f 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -544,8 +544,8 @@ Timeline.TimelinePanel = class extends UI.Panel {
*/
_startRecording(userInitiated) {
console.assert(!this._statusPane, 'Status pane is already opened.');
- var mainTarget = SDK.targetManager.mainTarget();
- if (!mainTarget)
+ var tracingManagers = SDK.targetManager.models(SDK.TracingManager);
+ if (!tracingManagers.length)
return Promise.resolve();
this._setState(Timeline.TimelinePanel.State.StartPending);
this._showRecordingStarted();
@@ -561,7 +561,7 @@ Timeline.TimelinePanel = class extends UI.Panel {
};
this._pendingPerformanceModel = new Timeline.PerformanceModel();
- this._controller = new Timeline.TimelineController(mainTarget, this._pendingPerformanceModel, this);
+ this._controller = new Timeline.TimelineController(tracingManagers[0], this._pendingPerformanceModel, this);
Host.userMetrics.actionTaken(
userInitiated ? Host.UserMetrics.Action.TimelineStarted : Host.UserMetrics.Action.TimelinePageReloadStarted);
this._setUIControlsEnabled(false);
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/timeline/TimelineController.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698