Chromium Code Reviews| 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, |
| }; |
| }); |