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

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

Issue 2750463010: [MD Bookmarks] Handle bookmark moves. (Closed)
Patch Set: 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 e70bcee0a21f1ed0409d1cfebd495db93a5574c5..62a0ba82994ce578970a535b3acf4482ec4387d2 100644
--- a/chrome/browser/resources/md_bookmarks/actions.js
+++ b/chrome/browser/resources/md_bookmarks/actions.js
@@ -25,6 +25,25 @@ cr.define('bookmarks.actions', function() {
* @param {string} id
* @param {string} parentId
* @param {number} index
+ * @param {string} oldParentId
+ * @param {number} oldIndex
+ * @return {!Action}
+ */
+ function moveBookmark(id, parentId, index, oldParentId, oldIndex) {
+ return {
+ name: 'move-bookmark',
+ id: id,
+ parentId: parentId,
+ index: index,
+ oldParentId: oldParentId,
+ oldIndex: oldIndex,
+ };
+ }
+
+ /**
+ * @param {string} id
+ * @param {string} parentId
+ * @param {number} index
* @return {!Action}
*/
function removeBookmark(id, parentId, index) {
@@ -146,6 +165,7 @@ cr.define('bookmarks.actions', function() {
changeFolderOpen: changeFolderOpen,
clearSearch: clearSearch,
editBookmark: editBookmark,
+ moveBookmark: moveBookmark,
refreshNodes: refreshNodes,
removeBookmark: removeBookmark,
selectFolder: selectFolder,

Powered by Google App Engine
This is Rietveld 408576698