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

Unified Diff: chrome/browser/resources/md_bookmarks/list.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/list.js
diff --git a/chrome/browser/resources/md_bookmarks/list.js b/chrome/browser/resources/md_bookmarks/list.js
index 5d16af2d6a3883135262bbe9193dcf7b73b23c02..83652a117a1d782a51fe16b96ec339fd7c507500 100644
--- a/chrome/browser/resources/md_bookmarks/list.js
+++ b/chrome/browser/resources/md_bookmarks/list.js
@@ -5,12 +5,23 @@
Polymer({
is: 'bookmarks-list',
+ behaviors: [
+ bookmarks.StoreClient,
+ ],
+
properties: {
- /** @type {BookmarkTreeNode} */
+ /** @type {BookmarkNode} */
menuItem_: Object,
- /** @type {Array<BookmarkTreeNode>} */
- displayedList: Array,
+ /** @type {Array<string>} */
+ displayedList: {
+ type: Array,
+ value: function() {
+ // Use an empty list during initialization so that the databinding to
+ // hide #bookmarksCard takes effect.
+ return [];
+ },
+ },
searchTerm: String,
},
@@ -19,6 +30,13 @@ Polymer({
'open-item-menu': 'onOpenItemMenu_',
},
+ attached: function() {
+ this.watch('displayedList', function(state) {
+ return bookmarks.util.getDisplayedList(state);
+ });
+ this.updateFromStore();
+ },
+
/**
* @param {Event} e
* @private
« no previous file with comments | « chrome/browser/resources/md_bookmarks/list.html ('k') | chrome/browser/resources/md_bookmarks/reducers.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698