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

Side by Side Diff: chrome/browser/resources/md_bookmarks/toolbar.js

Issue 2745993002: MD Bookmarks: Update URL router to work in new data binding system (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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 Polymer({ 5 Polymer({
6 is: 'bookmarks-toolbar', 6 is: 'bookmarks-toolbar',
7 7
8 behaviors: [ 8 behaviors: [
9 bookmarks.StoreClient, 9 bookmarks.StoreClient,
10 ], 10 ],
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 var menu = /** @type {!CrActionMenuElement} */ (this.$.dropdown); 75 var menu = /** @type {!CrActionMenuElement} */ (this.$.dropdown);
76 menu.close(); 76 menu.close();
77 }, 77 },
78 78
79 /** 79 /**
80 * @param {Event} e 80 * @param {Event} e
81 * @private 81 * @private
82 */ 82 */
83 onSearchChanged_: function(e) { 83 onSearchChanged_: function(e) {
84 var searchTerm = /** @type {string} */ (e.detail); 84 var searchTerm = /** @type {string} */ (e.detail);
85 this.dispatch(bookmarks.actions.setSearchTerm(searchTerm)); 85 if (searchTerm != this.searchTerm_)
86 this.dispatch(bookmarks.actions.setSearchTerm(searchTerm));
86 }, 87 },
87 88
88 onSidebarWidthChanged_: function() { 89 onSidebarWidthChanged_: function() {
89 this.style.setProperty('--sidebar-width', this.sidebarWidth); 90 this.style.setProperty('--sidebar-width', this.sidebarWidth);
90 }, 91 },
91 92
92 /** @private */ 93 /** @private */
93 onSearchTermChanged_: function() { 94 onSearchTermChanged_: function() {
94 this.searchField.setValue(this.searchTerm_ || ''); 95 this.searchField.setValue(this.searchTerm_ || '');
95 }, 96 },
96 }); 97 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_bookmarks/router.js ('k') | chrome/test/data/webui/md_bookmarks/md_bookmarks_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698