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

Unified Diff: chrome/browser/resources/md_history/history_list.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: 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
Index: chrome/browser/resources/md_history/history_list.js
diff --git a/chrome/browser/resources/md_history/history_list.js b/chrome/browser/resources/md_history/history_list.js
index ba358120f6b4f93984e925bb05bad7a508f37f7f..dc1f42acd78d84bb162c98772234427a21048ee4 100644
--- a/chrome/browser/resources/md_history/history_list.js
+++ b/chrome/browser/resources/md_history/history_list.js
@@ -206,6 +206,16 @@ Polymer({
},
/**
+ * Return the number of history items to be deleted.
+ * @return {number}
+ */
+ numToBeDeleted: function() {
tsergeant 2016/07/19 05:09:41 Nit: Rename this to something like numSelected or
lshang 2016/07/20 01:19:09 I deleted this method and used 'toolbar.count' ins
+ return this.historyData_.filter(function(item) {
+ return item.selected;
+ }).length;
+ },
+
+ /**
* Called when the page is scrolled to near the bottom of the list.
* @private
*/

Powered by Google App Engine
This is Rietveld 408576698