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

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

Issue 2795623002: MD Bookmarks: Handle bookmark creation (Closed)
Patch Set: Update test Created 3 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/resources/md_bookmarks/api_listener.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9c4915150b1d845f8b5db4d86dbf00f25aae0253..8415122d1dc211c1dbf770ed2fbf1e0f64eb2551 100644
--- a/chrome/browser/resources/md_bookmarks/actions.js
+++ b/chrome/browser/resources/md_bookmarks/actions.js
@@ -10,6 +10,20 @@
cr.define('bookmarks.actions', function() {
/**
* @param {string} id
+ * @param {BookmarkTreeNode} treeNode
+ */
+ function createBookmark(id, treeNode) {
+ return {
+ name: 'create-bookmark',
+ id: id,
+ parentId: treeNode.parentId,
+ parentIndex: treeNode.index,
+ node: bookmarks.util.normalizeNode(treeNode),
+ };
+ }
+
+ /**
+ * @param {string} id
* @param {{title: string, url: (string|undefined)}} changeInfo
* @return {!Action}
*/
@@ -171,6 +185,7 @@ cr.define('bookmarks.actions', function() {
return {
changeFolderOpen: changeFolderOpen,
clearSearch: clearSearch,
+ createBookmark: createBookmark,
deselectItems: deselectItems,
editBookmark: editBookmark,
moveBookmark: moveBookmark,
« no previous file with comments | « no previous file | chrome/browser/resources/md_bookmarks/api_listener.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698