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

Unified Diff: chrome/browser/resources/md_history/app.js

Issue 2159773003: MD History: Add shortcuts for 'Delete' and 'Backspace' to delete selected items (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@MDH_slash_key
Patch Set: revise test Created 4 years, 5 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 | chrome/browser/resources/md_history/history.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/md_history/app.js
diff --git a/chrome/browser/resources/md_history/app.js b/chrome/browser/resources/md_history/app.js
index 6761359aa0b888dfd54cd345bcc9c6e70c9b3dd3..efd6820660c243bbdf4055ef8e9ac2b6b17e40d0 100644
--- a/chrome/browser/resources/md_history/app.js
+++ b/chrome/browser/resources/md_history/app.js
@@ -135,6 +135,9 @@ Polymer({
!(this.$.toolbar.searchBar.showingSearch &&
this.$.toolbar.searchBar.isSearchFocused());
break;
+ case 'delete-command':
+ e.canExecute = this.$.toolbar.count > 0;
+ break;
}
},
@@ -145,6 +148,8 @@ Polymer({
onCommand_: function(e) {
if (e.command.id == 'find-command' || e.command.id == 'slash-command')
this.$.toolbar.showSearchField();
+ if (e.command.id == 'delete-command')
+ this.deleteSelected();
},
/**
« no previous file with comments | « no previous file | chrome/browser/resources/md_history/history.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698