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

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

Issue 2740863003: MD Bookmarks: Implement search and selection in new data flow system (Closed)
Patch Set: Remove selection from this CL Created 3 years, 9 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_bookmarks/actions.js
diff --git a/chrome/browser/resources/md_bookmarks/actions.js b/chrome/browser/resources/md_bookmarks/actions.js
index 1ff0eaaeb410d48e81dab4ded48d2daabf53d213..c1a2ad2248f2da2d8b74dfc62b8f04796890d7d1 100644
--- a/chrome/browser/resources/md_bookmarks/actions.js
+++ b/chrome/browser/resources/md_bookmarks/actions.js
@@ -71,11 +71,38 @@ cr.define('bookmarks.actions', function() {
};
}
+ /**
+ * @param {string} term
+ * @return {!Action}
+ */
+ function setSearchTerm(term) {
+ if (!term)
+ return {name: 'clear-search'};
calamity 2017/03/13 04:50:36 I feel like this should be its own explicit action
tsergeant 2017/03/14 02:40:36 Done.
+
+ return {
+ name: 'start-search',
+ term: term,
+ };
+ }
+
+ /**
+ * @param {!Array<string>} ids
+ * @return {!Action}
+ */
+ function setSearchResults(ids) {
+ return {
+ name: 'finish-search',
+ results: ids,
+ };
+ }
+
return {
changeFolderOpen: changeFolderOpen,
editBookmark: editBookmark,
refreshNodes: refreshNodes,
removeBookmark: removeBookmark,
selectFolder: selectFolder,
+ setSearchResults: setSearchResults,
+ setSearchTerm: setSearchTerm,
};
});
« no previous file with comments | « no previous file | chrome/browser/resources/md_bookmarks/app.js » ('j') | chrome/browser/resources/md_bookmarks/app.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698