Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 /** | 5 /** |
| 6 * @typedef {{about: boolean, settings: boolean}} | 6 * @typedef {{about: boolean, settings: boolean}} |
| 7 */ | 7 */ |
| 8 var MainPageVisibility; | 8 var MainPageVisibility; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 257 whenSearchDone.then(function(request) { | 257 whenSearchDone.then(function(request) { |
| 258 resolve(); | 258 resolve(); |
| 259 if (!request.finished) { | 259 if (!request.finished) { |
| 260 // Nothing to do here. A previous search request was canceled | 260 // Nothing to do here. A previous search request was canceled |
| 261 // because a new search request was issued before the first one | 261 // because a new search request was issued before the first one |
| 262 // completed. | 262 // completed. |
| 263 return; | 263 return; |
| 264 } | 264 } |
| 265 | 265 |
| 266 this.toolbarSpinnerActive = false; | 266 this.toolbarSpinnerActive = false; |
| 267 this.inSearchMode_ = !request.isSame(''); | 267 this.inSearchMode_ = !request.isSame(''); |
|
dpapad
2017/03/14 17:07:09
Need to rebase this, after https://codereview.chro
Dan Beam
2017/03/14 18:14:37
Done.
| |
| 268 this.showNoResultsFound_ = | 268 this.showNoResultsFound_ = |
| 269 this.inSearchMode_ && !request.didFindMatches(); | 269 this.inSearchMode_ && !request.didFindMatches(); |
| 270 | |
| 271 if (this.inSearchMode_) { | |
| 272 Polymer.IronA11yAnnouncer.requestAvailability(); | |
| 273 this.fire('iron-announce', { | |
|
dpapad
2017/03/14 17:07:09
Do you also need { bubbles: true }, per the exampl
Dan Beam
2017/03/14 18:14:37
no, it works without it
| |
| 274 text: this.showNoResultsFound_ ? | |
| 275 loadTimeData.getString('searchNoResults') : | |
| 276 loadTimeData.getStringF('searchResults', query) | |
| 277 }); | |
| 278 } | |
| 270 }.bind(this)); | 279 }.bind(this)); |
| 271 }.bind(this), 0); | 280 }.bind(this), 0); |
| 272 }.bind(this)); | 281 }.bind(this)); |
| 273 }, | 282 }, |
| 274 }); | 283 }); |
| OLD | NEW |