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

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

Issue 2704983002: MD Bookmarks: Proof-of-concept reimplementation of data storage/binding layer (Closed)
Patch Set: Add doc comments Created 3 years, 10 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..fdc2a560a975e79d5c24c90241704eaaa422857f 100644
--- a/chrome/browser/resources/md_bookmarks/list.js
+++ b/chrome/browser/resources/md_bookmarks/list.js
@@ -5,12 +5,21 @@
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() {
+ return [];
+ },
+ },
searchTerm: String,
},
@@ -19,6 +28,16 @@ Polymer({
'open-item-menu': 'onOpenItemMenu_',
},
+ attached: function() {
+ this.observe('displayedList', function(state) {
+ return bookmarks.util.getDisplayedList(state);
+ });
+ this.observe('searchTerm', function(state) {
+ return state.search.term;
+ });
+ 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