Chromium Code Reviews| 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 18df6abd69253c827e6fe66b1bb9a12272d05c19..f7fc6c3b680ac1a201c8e854c985bf01048f5573 100644 |
| --- a/chrome/browser/resources/md_history/app.js |
| +++ b/chrome/browser/resources/md_history/app.js |
| @@ -128,6 +128,9 @@ Polymer({ |
| !(this.$.toolbar.searchBar.showingSearch && |
| this.$.toolbar.searchBar.isSearchFocused()); |
| break; |
| + case 'delete-command': |
| + e.canExecute = this.$['history'].getHistoryList().numToBeDeleted() > 0; |
|
tsergeant
2016/07/19 05:09:41
You could probably simplify this using `this.$.too
lshang
2016/07/20 01:19:09
Done.
|
| + break; |
| } |
| }, |
| @@ -138,6 +141,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(); |
| }, |
| /** |