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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 Polymer({ 5 Polymer({
6 is: 'bookmarks-app', 6 is: 'bookmarks-app',
7 7
8 properties: { 8 behaviors: [
9 selectedId: String, 9 bookmarks.StoreClient,
10 10 ],
11 /** @type {BookmarkTreeNode} */
12 rootNode: Object,
13
14 searchTerm: String,
15
16 /** @type {Array<BookmarkTreeNode>} */
17 displayedList: Array,
18 },
19 11
20 /** @override */ 12 /** @override */
21 attached: function() { 13 attached: function() {
22 /** @type {BookmarksStore} */ (this.$$('bookmarks-store')) 14 chrome.bookmarks.getTree(function(results) {
23 .initializeStore(); 15 var nodeList = bookmarks.util.normalizeNodes(results[0]);
16 var initialState = bookmarks.util.createEmptyState();
17 initialState.nodes = nodeList;
18 initialState.selectedFolder = nodeList['0'].children[0];
19
20 bookmarks.Store.getInstance().init(initialState);
21 bookmarks.ApiListener.init();
22 }.bind(this));
24 }, 23 },
25 }); 24 });
OLDNEW
« 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