| 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 * @return {!Action} | 246 * @return {!Action} |
| 247 */ | 247 */ |
| 248 function setIncognitoAvailability(availability) { | 248 function setIncognitoAvailability(availability) { |
| 249 assert(availability != IncognitoAvailability.FORCED); | 249 assert(availability != IncognitoAvailability.FORCED); |
| 250 return { | 250 return { |
| 251 name: 'set-incognito-availability', | 251 name: 'set-incognito-availability', |
| 252 value: availability, | 252 value: availability, |
| 253 }; | 253 }; |
| 254 } | 254 } |
| 255 | 255 |
| 256 /** |
| 257 * @param {boolean} canEdit |
| 258 * @return {!Action} |
| 259 */ |
| 260 function setCanEditBookmarks(canEdit) { |
| 261 return { |
| 262 name: 'set-can-edit', |
| 263 value: canEdit, |
| 264 }; |
| 265 } |
| 266 |
| 256 return { | 267 return { |
| 257 changeFolderOpen: changeFolderOpen, | 268 changeFolderOpen: changeFolderOpen, |
| 258 clearSearch: clearSearch, | 269 clearSearch: clearSearch, |
| 259 createBookmark: createBookmark, | 270 createBookmark: createBookmark, |
| 260 deselectItems: deselectItems, | 271 deselectItems: deselectItems, |
| 261 editBookmark: editBookmark, | 272 editBookmark: editBookmark, |
| 262 moveBookmark: moveBookmark, | 273 moveBookmark: moveBookmark, |
| 263 refreshNodes: refreshNodes, | 274 refreshNodes: refreshNodes, |
| 264 removeBookmark: removeBookmark, | 275 removeBookmark: removeBookmark, |
| 265 reorderChildren: reorderChildren, | 276 reorderChildren: reorderChildren, |
| 266 selectAll: selectAll, | 277 selectAll: selectAll, |
| 267 selectFolder: selectFolder, | 278 selectFolder: selectFolder, |
| 268 selectItem: selectItem, | 279 selectItem: selectItem, |
| 280 setCanEditBookmarks: setCanEditBookmarks, |
| 269 setIncognitoAvailability: setIncognitoAvailability, | 281 setIncognitoAvailability: setIncognitoAvailability, |
| 270 setSearchResults: setSearchResults, | 282 setSearchResults: setSearchResults, |
| 271 setSearchTerm: setSearchTerm, | 283 setSearchTerm: setSearchTerm, |
| 272 updateAnchor: updateAnchor, | 284 updateAnchor: updateAnchor, |
| 273 }; | 285 }; |
| 274 }); | 286 }); |
| OLD | NEW |