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

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

Issue 2735953002: MD Bookmarks: Integrate new data store with UI elements (Closed)
Patch Set: calamity@ review 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/app.js
diff --git a/chrome/browser/resources/md_bookmarks/app.js b/chrome/browser/resources/md_bookmarks/app.js
index 89d6310e5ff74374e88fd8677a637062d7d083da..23bb4984359987ce975042b8e94972673d61d652 100644
--- a/chrome/browser/resources/md_bookmarks/app.js
+++ b/chrome/browser/resources/md_bookmarks/app.js
@@ -5,21 +5,20 @@
Polymer({
is: 'bookmarks-app',
- properties: {
- selectedId: String,
-
- /** @type {BookmarkTreeNode} */
- rootNode: Object,
-
- searchTerm: String,
-
- /** @type {Array<BookmarkTreeNode>} */
- displayedList: Array,
- },
+ behaviors: [
+ bookmarks.StoreClient,
+ ],
/** @override */
attached: function() {
- /** @type {BookmarksStore} */ (this.$$('bookmarks-store'))
- .initializeStore();
+ chrome.bookmarks.getTree(function(results) {
+ var nodeList = bookmarks.util.normalizeNodes(results[0]);
+ var initialState = bookmarks.util.createEmptyState();
+ initialState.nodes = nodeList;
+ initialState.selectedFolder = nodeList['0'].children[0];
+
+ bookmarks.Store.getInstance().init(initialState);
+ bookmarks.ApiListener.init();
+ }.bind(this));
},
});
« no previous file with comments | « chrome/browser/resources/md_bookmarks/app.html ('k') | chrome/browser/resources/md_bookmarks/compiled_resources2.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698