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

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

Issue 2781973002: DevTools: disable clear button on Performance panel during recording. (Closed)
Patch Set: Created 3 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 | « no previous file | 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 3d4326d2827eca05120b63d9cbf9110c6bcddfd5..0a85d8ec05930daaad65bbc694acf97e78644dcf 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -216,9 +216,9 @@ Timeline.TimelinePanel = class extends UI.Panel {
// Record
this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._toggleRecordAction));
this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButtonForId('main.reload'));
- var clearButton = new UI.ToolbarButton(Common.UIString('Clear'), 'largeicon-clear');
- clearButton.addEventListener(UI.ToolbarButton.Events.Click, () => this._clear());
- this._panelToolbar.appendToolbarItem(clearButton);
+ this._clearButton = new UI.ToolbarButton(Common.UIString('Clear'), 'largeicon-clear');
+ this._clearButton.addEventListener(UI.ToolbarButton.Events.Click, () => this._clear());
+ this._panelToolbar.appendToolbarItem(this._clearButton);
this._panelToolbar.appendSeparator();
// View
@@ -553,6 +553,7 @@ Timeline.TimelinePanel = class extends UI.Panel {
var state = Timeline.TimelinePanel.State;
this._toggleRecordAction.setToggled(this._state === state.Recording);
this._toggleRecordAction.setEnabled(this._state === state.Recording || this._state === state.Idle);
+ this._clearButton.setEnabled(this._state === state.Idle);
this._panelToolbar.setEnabled(this._state !== state.Loading);
this._dropTarget.setEnabled(this._state === state.Idle);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698