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

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

Issue 2735953002: MD Bookmarks: Integrate new data store with UI elements (Closed)
Patch Set: More tweaks 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..2c183e930875fb8b9105f0be772ab01dd48d0fb6 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 [];
calamity 2017/03/09 04:58:57 Why is this necessary?
tsergeant 2017/03/09 06:27:54 This is a little fix to prevent the flash of an em
calamity 2017/03/10 03:34:21 Ah yeah, I thought it might be. Good riddance. I'm
+ },
+ },
searchTerm: String,
},
@@ -19,6 +28,13 @@ Polymer({
'open-item-menu': 'onOpenItemMenu_',
},
+ attached: function() {
+ this.watch('displayedList', function(state) {
+ return bookmarks.util.getDisplayedList(state);
+ });
+ this.updateFromStore();
+ },
+
/**
* @param {Event} e
* @private

Powered by Google App Engine
This is Rietveld 408576698