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

Unified Diff: chrome/browser/resources/md_bookmarks/toolbar.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/toolbar.js
diff --git a/chrome/browser/resources/md_bookmarks/toolbar.js b/chrome/browser/resources/md_bookmarks/toolbar.js
index 5b80c74fbef76ca922d66d67cd7c0c724778a044..1d13074bc676ba788f7b9011995ba4843088fd3c 100644
--- a/chrome/browser/resources/md_bookmarks/toolbar.js
+++ b/chrome/browser/resources/md_bookmarks/toolbar.js
@@ -5,6 +5,10 @@
Polymer({
is: 'bookmarks-toolbar',
+ behaviors: [
+ bookmarks.StoreClient,
+ ],
+
properties: {
searchTerm: {
type: String,
@@ -12,6 +16,12 @@ Polymer({
},
},
+ attached: function() {
+ this.observe('searchTerm', function(state) {
+ return state.search.term;
+ });
+ },
+
/** @return {CrToolbarSearchFieldElement} */
get searchField() {
return /** @type {CrToolbarElement} */ (this.$$('cr-toolbar'))
@@ -66,7 +76,7 @@ Polymer({
*/
onSearchChanged_: function(e) {
var searchTerm = /** @type {string} */ (e.detail);
- this.fire('search-term-changed', searchTerm);
+ this.dispatch(bookmarks.actions.setSearchTerm(searchTerm));
},
/** @private */
« no previous file with comments | « chrome/browser/resources/md_bookmarks/store_client.js ('k') | chrome/browser/resources/md_bookmarks/types.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698