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

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

Issue 2885723002: [MD Bookmarks] Add keyboard navigation and selection to bookmark list. (Closed)
Patch Set: address comments 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 | « no previous file | chrome/browser/resources/md_bookmarks/item.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/md_bookmarks/actions.js
diff --git a/chrome/browser/resources/md_bookmarks/actions.js b/chrome/browser/resources/md_bookmarks/actions.js
index 6fb4ae621fdca9a634911c0ff222fd9caa9c8225..6281bc064453e2078a8bf705e805bc4a038d0846 100644
--- a/chrome/browser/resources/md_bookmarks/actions.js
+++ b/chrome/browser/resources/md_bookmarks/actions.js
@@ -191,6 +191,32 @@ cr.define('bookmarks.actions', function() {
}
/**
+ * @param {Array<string>} ids
+ * @param {BookmarksPageState} state
+ * @return {!Action}
+ */
+ function selectAll(ids, state) {
+ return {
+ name: 'select-items',
+ clear: true,
+ toggle: false,
+ anchor: state.selection.anchor,
+ items: ids,
+ };
+ }
+
+ /**
+ * @param {string} id
+ * @return {!Action}
+ */
+ function updateAnchor(id) {
+ return {
+ name: 'update-anchor',
+ anchor: id,
+ };
+ }
+
+ /**
* @param {string} term
* @return {!Action}
*/
@@ -225,9 +251,11 @@ cr.define('bookmarks.actions', function() {
refreshNodes: refreshNodes,
removeBookmark: removeBookmark,
reorderChildren: reorderChildren,
+ selectAll: selectAll,
selectFolder: selectFolder,
selectItem: selectItem,
setSearchResults: setSearchResults,
setSearchTerm: setSearchTerm,
+ updateAnchor: updateAnchor,
};
});
« no previous file with comments | « no previous file | chrome/browser/resources/md_bookmarks/item.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698