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

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

Issue 2629503002: DevTools: Replace Timeline "New" button with Close (Closed)
Patch Set: Created 3 years, 11 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 ea13f19990dc01b1d2a46d05f1eb9fbbfeac0563..bb22953601b16371efca99c4359f629ea5108a32 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -306,12 +306,15 @@ Timeline.TimelinePanel = class extends UI.Panel {
_recreateToolbarItems() {
this._panelToolbar.removeToolbarItems();
+ // Close
+ if (!this._model.isEmpty()) {
+ const clearButton = new UI.ToolbarButton(Common.UIString('Close profile'), 'largeicon-delete');
+ clearButton.addEventListener(UI.ToolbarButton.Events.Click, this._clear, this);
+ this._panelToolbar.appendToolbarItem(clearButton);
+ this._panelToolbar.appendSeparator();
+ }
+
// Record
- const newButton = new UI.ToolbarButton(Common.UIString('New recording'), 'largeicon-add', Common.UIString('New'));
- newButton.setEnabled(!this._model.isEmpty());
- newButton.addEventListener(UI.ToolbarButton.Events.Click, this._clear, this);
- this._panelToolbar.appendToolbarItem(newButton);
- this._panelToolbar.appendSeparator();
this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._toggleRecordAction));
this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButtonForId('main.reload'));
this._panelToolbar.appendSeparator();
« 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