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

Unified Diff: chrome/browser/resources/md_bookmarks/toolbar.js

Issue 2893833002: MD Bookmarks: Enable the delete button in the toolbar overlay (Closed)
Patch Set: Reparent Created 3 years, 7 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 | « chrome/browser/resources/md_bookmarks/toolbar.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/md_bookmarks/toolbar.js
diff --git a/chrome/browser/resources/md_bookmarks/toolbar.js b/chrome/browser/resources/md_bookmarks/toolbar.js
index 3ebeb2d5dd6a6f0f1849ec932d1e714daf345ce6..bc489049cb71018eb7188a5c14d84bf35c53a977 100644
--- a/chrome/browser/resources/md_bookmarks/toolbar.js
+++ b/chrome/browser/resources/md_bookmarks/toolbar.js
@@ -99,6 +99,14 @@ Polymer({
},
/** @private */
+ onDeleteSelectionTap_: function() {
+ var selection = this.getState().selection.items;
+ var commandManager = bookmarks.CommandManager.getInstance();
+ assert(commandManager.canExecute(Command.DELETE, selection));
+ commandManager.handle(Command.DELETE, selection);
calamity 2017/05/19 03:54:19 I do think it's worth having a test _somewhere_ th
tsergeant 2017/05/22 23:51:24 Okay, I've added a test which will hopefully fulfi
+ },
+
+ /** @private */
onClearSelectionTap_: function() {
this.dispatch(bookmarks.actions.deselectItems());
},
« no previous file with comments | « chrome/browser/resources/md_bookmarks/toolbar.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698