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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Module for functions which produce action objects. These are 6 * @fileoverview Module for functions which produce action objects. These are
7 * listed in one place to document available actions and their parameters. 7 * listed in one place to document available actions and their parameters.
8 */ 8 */
9 9
10 cr.define('bookmarks.actions', function() { 10 cr.define('bookmarks.actions', function() {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 * @return {!Action} 64 * @return {!Action}
65 */ 65 */
66 function changeFolderOpen(id, open) { 66 function changeFolderOpen(id, open) {
67 return { 67 return {
68 name: 'change-folder-open', 68 name: 'change-folder-open',
69 id: id, 69 id: id,
70 open: open, 70 open: open,
71 }; 71 };
72 } 72 }
73 73
74 /**
75 * @param {string} term
76 * @return {!Action}
77 */
78 function setSearchTerm(term) {
79 if (!term)
80 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.
81
82 return {
83 name: 'start-search',
84 term: term,
85 };
86 }
87
88 /**
89 * @param {!Array<string>} ids
90 * @return {!Action}
91 */
92 function setSearchResults(ids) {
93 return {
94 name: 'finish-search',
95 results: ids,
96 };
97 }
98
74 return { 99 return {
75 changeFolderOpen: changeFolderOpen, 100 changeFolderOpen: changeFolderOpen,
76 editBookmark: editBookmark, 101 editBookmark: editBookmark,
77 refreshNodes: refreshNodes, 102 refreshNodes: refreshNodes,
78 removeBookmark: removeBookmark, 103 removeBookmark: removeBookmark,
79 selectFolder: selectFolder, 104 selectFolder: selectFolder,
105 setSearchResults: setSearchResults,
106 setSearchTerm: setSearchTerm,
80 }; 107 };
81 }); 108 });
OLDNEW
« 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