| 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..6b89342cf60b2116c08b802315b13bf06ec394c7 100644
|
| --- a/chrome/browser/resources/md_bookmarks/toolbar.js
|
| +++ b/chrome/browser/resources/md_bookmarks/toolbar.js
|
| @@ -5,13 +5,24 @@
|
| Polymer({
|
| is: 'bookmarks-toolbar',
|
|
|
| + behaviors: [
|
| + bookmarks.StoreClient,
|
| + ],
|
| +
|
| properties: {
|
| - searchTerm: {
|
| + /** @private */
|
| + searchTerm_: {
|
| type: String,
|
| observer: 'onSearchTermChanged_',
|
| },
|
| },
|
|
|
| + attached: function() {
|
| + this.watch('searchTerm_', function(state) {
|
| + return state.search.term;
|
| + });
|
| + },
|
| +
|
| /** @return {CrToolbarSearchFieldElement} */
|
| get searchField() {
|
| return /** @type {CrToolbarElement} */ (this.$$('cr-toolbar'))
|
| @@ -66,11 +77,11 @@ Polymer({
|
| */
|
| onSearchChanged_: function(e) {
|
| var searchTerm = /** @type {string} */ (e.detail);
|
| - this.fire('search-term-changed', searchTerm);
|
| + this.dispatch(bookmarks.actions.setSearchTerm(searchTerm));
|
| },
|
|
|
| /** @private */
|
| onSearchTermChanged_: function() {
|
| - this.searchField.setValue(this.searchTerm || '');
|
| + this.searchField.setValue(this.searchTerm_ || '');
|
| },
|
| });
|
|
|