Chromium Code Reviews| 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 ff9173ee452a3612eb349db0c76cedc94147a62a..1ff3e31efe9848ed633ef5b0d681cd4adba018f3 100644 |
| --- a/chrome/browser/resources/md_downloads/toolbar.js |
| +++ b/chrome/browser/resources/md_downloads/toolbar.js |
| @@ -20,7 +20,7 @@ cr.define('downloads', function() { |
| reflectToAttribute: true, |
| type: Boolean, |
| value: false, |
| - observer: 'onDownloadsShowingChange_', |
| + observer: 'downloadsShowingChanged_', |
| }, |
| overflowAlign_: { |
| @@ -39,6 +39,15 @@ cr.define('downloads', function() { |
| return !this.$['search-input'].getValue() && this.downloadsShowing; |
| }, |
| + onFindCommand: function() { |
| + var searchInput = this.$ && this.$['search-input']; |
|
michaelpg
2016/01/21 22:04:14
this should already be true anyway (the element sh
Dan Beam
2016/01/21 23:39:27
I'm not sure calling .focus() should show; I'd rat
|
| + if (!searchInput) |
| + return; |
| + |
| + searchInput.showingSearch = true; |
| + searchInput.focus(); |
|
michaelpg
2016/01/21 22:04:14
doesn't this need to be async if showingSearch was
Dan Beam
2016/01/21 22:14:46
yeah, I think it was working because bugs. maybe
michaelpg
2016/01/21 22:19:01
i agree. or just have focus() do it... seems like
Dan Beam
2016/01/21 23:39:27
eh, I think it's more reasonable to compose out sh
michaelpg
2016/01/21 23:43:34
sgtm
|
| + }, |
| + |
| /** @private */ |
| onClearAllTap_: function() { |
| assert(this.canClearAll()); |
| @@ -46,7 +55,7 @@ cr.define('downloads', function() { |
| }, |
| /** @private */ |
| - onDownloadsShowingChange_: function() { |
| + downloadsShowingChanged_: function() { |
| this.updateClearAll_(); |
| }, |