| OLD | NEW |
| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 }; | 91 }; |
| 92 } | 92 } |
| 93 | 93 |
| 94 /** @return {!Action} */ | 94 /** @return {!Action} */ |
| 95 function clearSearch() { | 95 function clearSearch() { |
| 96 return { | 96 return { |
| 97 name: 'clear-search', | 97 name: 'clear-search', |
| 98 }; | 98 }; |
| 99 } | 99 } |
| 100 | 100 |
| 101 /** @return {!Action} */ |
| 102 function deselectItems() { |
| 103 return { |
| 104 name: 'deselect-items', |
| 105 }; |
| 106 } |
| 107 |
| 101 /** | 108 /** |
| 102 * @param {string} id | 109 * @param {string} id |
| 103 * @param {boolean} add | 110 * @param {boolean} add |
| 104 * @param {boolean} range | 111 * @param {boolean} range |
| 105 * @param {BookmarksPageState} state | 112 * @param {BookmarksPageState} state |
| 106 * @return {!Action} | 113 * @return {!Action} |
| 107 */ | 114 */ |
| 108 function selectItem(id, add, range, state) { | 115 function selectItem(id, add, range, state) { |
| 109 var anchor = state.selection.anchor; | 116 var anchor = state.selection.anchor; |
| 110 var toSelect = []; | 117 var toSelect = []; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 function setSearchResults(ids) { | 164 function setSearchResults(ids) { |
| 158 return { | 165 return { |
| 159 name: 'finish-search', | 166 name: 'finish-search', |
| 160 results: ids, | 167 results: ids, |
| 161 }; | 168 }; |
| 162 } | 169 } |
| 163 | 170 |
| 164 return { | 171 return { |
| 165 changeFolderOpen: changeFolderOpen, | 172 changeFolderOpen: changeFolderOpen, |
| 166 clearSearch: clearSearch, | 173 clearSearch: clearSearch, |
| 174 deselectItems: deselectItems, |
| 167 editBookmark: editBookmark, | 175 editBookmark: editBookmark, |
| 168 moveBookmark: moveBookmark, | 176 moveBookmark: moveBookmark, |
| 169 refreshNodes: refreshNodes, | 177 refreshNodes: refreshNodes, |
| 170 removeBookmark: removeBookmark, | 178 removeBookmark: removeBookmark, |
| 171 selectFolder: selectFolder, | 179 selectFolder: selectFolder, |
| 172 selectItem: selectItem, | 180 selectItem: selectItem, |
| 173 setSearchResults: setSearchResults, | 181 setSearchResults: setSearchResults, |
| 174 setSearchTerm: setSearchTerm, | 182 setSearchTerm: setSearchTerm, |
| 175 }; | 183 }; |
| 176 }); | 184 }); |
| OLD | NEW |