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

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

Issue 2799653003: MD Bookmarks: Implement 'Sort by Title' menu button (Closed)
Patch Set: 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
Index: chrome/browser/resources/md_bookmarks/api_listener.js
diff --git a/chrome/browser/resources/md_bookmarks/api_listener.js b/chrome/browser/resources/md_bookmarks/api_listener.js
index df19346acdb0d283dfd7f4ef44edacfd71ed0ed4..e65bc9391b615acbd6f62bcaec4c8f53df7ef989 100644
--- a/chrome/browser/resources/md_bookmarks/api_listener.js
+++ b/chrome/browser/resources/md_bookmarks/api_listener.js
@@ -55,6 +55,14 @@ cr.define('bookmarks.ApiListener', function() {
}
/**
+ * @param {string} id
+ * @param {{childIds: !Array<string>}} reorderInfo
+ */
+ function onChildrenReordered(id, reorderInfo) {
+ dispatch(bookmarks.actions.reorderChildren(id, reorderInfo.childIds));
+ }
+
+ /**
* Pauses the Created handler during an import. The imported nodes will all be
* loaded at once when the import is finished.
*/
@@ -72,6 +80,7 @@ cr.define('bookmarks.ApiListener', function() {
function init() {
chrome.bookmarks.onChanged.addListener(onBookmarkChanged);
+ chrome.bookmarks.onChildrenReordered.addListener(onChildrenReordered);
chrome.bookmarks.onCreated.addListener(onBookmarkCreated);
chrome.bookmarks.onMoved.addListener(onBookmarkMoved);
chrome.bookmarks.onRemoved.addListener(onBookmarkRemoved);
« no previous file with comments | « chrome/browser/resources/md_bookmarks/actions.js ('k') | chrome/browser/resources/md_bookmarks/compiled_resources2.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698