| Index: chrome/browser/resources/md_downloads/toolbar.js
|
| diff --git a/chrome/browser/resources/md_downloads/toolbar.js b/chrome/browser/resources/md_downloads/toolbar.js
|
| index c23364b3a9fcb446d468ea8711be89a81473d5ce..898c1b90c0dea82dd74614af05a3351138305fae 100644
|
| --- a/chrome/browser/resources/md_downloads/toolbar.js
|
| +++ b/chrome/browser/resources/md_downloads/toolbar.js
|
| @@ -9,10 +9,6 @@ cr.define('downloads', function() {
|
| attached: function() {
|
| // isRTL() only works after i18n_template.js runs to set <html dir>.
|
| this.overflowAlign_ = isRTL() ? 'left' : 'right';
|
| -
|
| - /** @private {!SearchFieldDelegate} */
|
| - this.searchFieldDelegate_ = new ToolbarSearchFieldDelegate(this);
|
| - this.$['search-input'].setDelegate(this.searchFieldDelegate_);
|
| },
|
|
|
| properties: {
|
| @@ -54,9 +50,13 @@ cr.define('downloads', function() {
|
| this.updateClearAll_();
|
| },
|
|
|
| - /** @param {string} searchTerm */
|
| - onSearchTermSearch: function(searchTerm) {
|
| - downloads.ActionService.getInstance().search(searchTerm);
|
| + /**
|
| + * @param {!CustomEvent} event
|
| + * @private
|
| + */
|
| + onSearchChanged_: function(event) {
|
| + downloads.ActionService.getInstance().search(
|
| + /** @type {string} */ (event.detail));
|
| this.updateClearAll_();
|
| },
|
|
|
| @@ -72,24 +72,6 @@ cr.define('downloads', function() {
|
| },
|
| });
|
|
|
| - /**
|
| - * @constructor
|
| - * @implements {SearchFieldDelegate}
|
| - */
|
| - // TODO(devlin): This is a bit excessive, and it would be better to just have
|
| - // Toolbar implement SearchFieldDelegate. But for now, we don't know how to
|
| - // make that happen with closure compiler.
|
| - function ToolbarSearchFieldDelegate(toolbar) {
|
| - this.toolbar_ = toolbar;
|
| - }
|
| -
|
| - ToolbarSearchFieldDelegate.prototype = {
|
| - /** @override */
|
| - onSearchTermSearch: function(searchTerm) {
|
| - this.toolbar_.onSearchTermSearch(searchTerm);
|
| - }
|
| - };
|
| -
|
| return {Toolbar: Toolbar};
|
| });
|
|
|
|
|