| 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 19 matching lines...) Expand all Loading... |
| 30 'toggle-menu': 'toggleMenu_', | 30 'toggle-menu': 'toggleMenu_', |
| 31 }, | 31 }, |
| 32 | 32 |
| 33 /** | 33 /** |
| 34 * @param {HistoryQuery} info An object containing information about the | 34 * @param {HistoryQuery} info An object containing information about the |
| 35 * query. | 35 * query. |
| 36 * @param {!Array<HistoryEntry>} results A list of results. | 36 * @param {!Array<HistoryEntry>} results A list of results. |
| 37 */ | 37 */ |
| 38 historyResult: function(info, results) { | 38 historyResult: function(info, results) { |
| 39 this.initializeResults_(info, results); | 39 this.initializeResults_(info, results); |
| 40 this.closeMenu_(); |
| 40 | 41 |
| 41 if (this.selectedPage_ == 'grouped-list') { | 42 if (this.selectedPage_ == 'grouped-list') { |
| 42 this.$$('#grouped-list').historyData = results; | 43 this.$$('#grouped-list').historyData = results; |
| 43 return; | 44 return; |
| 44 } | 45 } |
| 45 | 46 |
| 46 var list = /** @type {HistoryListElement} */(this.$['infinite-list']); | 47 var list = /** @type {HistoryListElement} */(this.$['infinite-list']); |
| 47 list.addNewResults(results); | 48 list.addNewResults(results); |
| 48 if (info.finished) | 49 if (info.finished) |
| 49 list.disableResultLoading(); | 50 list.disableResultLoading(); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 .then(function(items) { | 184 .then(function(items) { |
| 184 this.$['infinite-list'].removeDeletedHistory_(items); | 185 this.$['infinite-list'].removeDeletedHistory_(items); |
| 185 // This unselect-all is to reset the toolbar when deleting a selected | 186 // This unselect-all is to reset the toolbar when deleting a selected |
| 186 // item. TODO(tsergeant): Make this automatic based on observing list | 187 // item. TODO(tsergeant): Make this automatic based on observing list |
| 187 // modifications. | 188 // modifications. |
| 188 this.fire('unselect-all'); | 189 this.fire('unselect-all'); |
| 189 }.bind(this)); | 190 }.bind(this)); |
| 190 menu.closeMenu(); | 191 menu.closeMenu(); |
| 191 }, | 192 }, |
| 192 }); | 193 }); |
| OLD | NEW |