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

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

Issue 2593273003: DevTools: Do not reset timeline recoring options on basic/advanced switch. (Closed)
Patch Set: more tests Created 4 years 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/TimelineLandingPage.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 3ae124b88d20e899b8349fdbbf727805a2132183..8abad64b1d216cc253bec7fd0a210d03a5c50a96 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -103,6 +103,8 @@ Timeline.TimelinePanel = class extends UI.Panel {
SDK.targetManager.addEventListener(SDK.TargetManager.Events.PageReloadRequested, this._pageReloadRequested, this);
SDK.targetManager.addEventListener(SDK.TargetManager.Events.Load, this._loadEventFired, this);
+ this._landingPage = new Timeline.TimelineLandingPage();
+
// Create top level properties splitter.
this._detailsSplitWidget = new UI.SplitWidget(false, true, 'timelinePanelDetailsSplitViewState');
this._detailsSplitWidget.element.classList.add('timeline-details-split');
@@ -305,7 +307,7 @@ Timeline.TimelinePanel = class extends UI.Panel {
// Record
const newButton = new UI.ToolbarButton(Common.UIString('New recording'), 'largeicon-add', Common.UIString('New'));
- newButton.setEnabled(!this._landingPage);
+ newButton.setEnabled(!this._model.isEmpty());
newButton.addEventListener(UI.ToolbarButton.Events.Click, this._clear, this);
this._panelToolbar.appendToolbarItem(newButton);
this._panelToolbar.appendSeparator();
@@ -543,14 +545,9 @@ Timeline.TimelinePanel = class extends UI.Panel {
var enabledTraceProviders = Extensions.extensionServer.traceProviders().filter(
provider => Timeline.TimelinePanel._settingForTraceProvider(provider).get());
- var captureOptions = {
- enableJSSampling: this._captureJSProfileSetting.get(),
- capturePictures: this._captureLayersAndPicturesSetting.get(),
- captureFilmStrip: this._captureFilmStripSetting.get()
- };
-
+ const recordingOptions = this._landingPage.recordingOptions();
this._controller = new Timeline.TimelineController(mainTarget, this, this._tracingModel);
- this._controller.startRecording(captureOptions, enabledTraceProviders);
+ this._controller.startRecording(recordingOptions, enabledTraceProviders);
this._recordingStartTime = Date.now();
for (var i = 0; i < this._overviewControls.length; ++i)
@@ -665,18 +662,12 @@ Timeline.TimelinePanel = class extends UI.Panel {
}
_showLandingPage() {
- if (this._landingPage)
- return;
this._timelinePane.detach();
- this._landingPage = new Timeline.TimelineLandingPage();
this._landingPage.show(this.element);
}
_hideLandingPage() {
- if (!this._landingPage)
- return;
this._landingPage.detach();
- this._landingPage = null;
this._timelinePane.show(this.element);
}
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/timeline/TimelineLandingPage.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698