| OLD | NEW |
| 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: 'history-list-container', | 6 is: 'history-list-container', |
| 7 | 7 |
| 8 properties: { | 8 properties: { |
| 9 // The path of the currently selected page. | 9 // The path of the currently selected page. |
| 10 selectedPage_: String, | 10 selectedPage_: String, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 /** | 35 /** |
| 36 * @param {HistoryQuery} info An object containing information about the | 36 * @param {HistoryQuery} info An object containing information about the |
| 37 * query. | 37 * query. |
| 38 * @param {!Array<HistoryEntry>} results A list of results. | 38 * @param {!Array<HistoryEntry>} results A list of results. |
| 39 */ | 39 */ |
| 40 historyResult: function(info, results) { | 40 historyResult: function(info, results) { |
| 41 this.initializeResults_(info, results); | 41 this.initializeResults_(info, results); |
| 42 this.closeMenu_(); | 42 this.closeMenu_(); |
| 43 | 43 |
| 44 if (info.term && !this.queryState.incremental) { | 44 if (info.term && !this.queryState.incremental) { |
| 45 announceAccessibleMessage( | 45 Polymer.IronA11yAnnouncer.requestAvailability(); |
| 46 md_history.HistoryItem.searchResultsTitle(results.length, info.term)); | 46 this.fire('iron-announce', { |
| 47 text: |
| 48 md_history.HistoryItem.searchResultsTitle(results.length, info.term) |
| 49 }); |
| 47 } | 50 } |
| 48 | 51 |
| 49 if (this.selectedPage_ == 'grouped-list') { | 52 if (this.selectedPage_ == 'grouped-list') { |
| 50 this.$$('#grouped-list').historyData = results; | 53 this.$$('#grouped-list').historyData = results; |
| 51 return; | 54 return; |
| 52 } | 55 } |
| 53 | 56 |
| 54 var list = /** @type {HistoryListElement} */(this.$['infinite-list']); | 57 var list = /** @type {HistoryListElement} */(this.$['infinite-list']); |
| 55 list.addNewResults(results, this.queryState.incremental); | 58 list.addNewResults(results, this.queryState.incremental); |
| 56 if (info.finished) | 59 if (info.finished) |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 }.bind(this)); | 270 }.bind(this)); |
| 268 menu.closeMenu(); | 271 menu.closeMenu(); |
| 269 }, | 272 }, |
| 270 | 273 |
| 271 /** | 274 /** |
| 272 * @return {HTMLElement} | 275 * @return {HTMLElement} |
| 273 * @private | 276 * @private |
| 274 */ | 277 */ |
| 275 getSelectedList_: function() { return this.$.content.selectedItem; }, | 278 getSelectedList_: function() { return this.$.content.selectedItem; }, |
| 276 }); | 279 }); |
| OLD | NEW |