| 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, |
| 11 | 11 |
| 12 // Whether domain-grouped history is enabled. | 12 // Whether domain-grouped history is enabled. |
| 13 grouped: Boolean, | 13 grouped: Boolean, |
| 14 | 14 |
| 15 /** @type {!QueryState} */ | 15 /** @type {!QueryState} */ |
| 16 queryState: Object, | 16 queryState: Object, |
| 17 | 17 |
| 18 /** @type {!QueryResult} */ | 18 /** @type {!QueryResult} */ |
| 19 queryResult: Object, | 19 queryResult: Object, |
| 20 }, | 20 }, |
| 21 | 21 |
| 22 observers: [ | 22 observers: [ |
| 23 'groupedRangeChanged_(queryState.range)', | 23 'groupedRangeChanged_(queryState.range)', |
| 24 ], | 24 ], |
| 25 | 25 |
| 26 listeners: { | 26 listeners: { |
| 27 'history-list-scrolled': 'closeMenu_', | 27 'history-list-scrolled': 'closeMenu_', |
| 28 'load-more-history': 'loadMoreHistory_', | 28 'load-more-history': 'loadMoreHistory_', |
| 29 'tap': 'closeMenu_', | |
| 30 'toggle-menu': 'toggleMenu_', | 29 'toggle-menu': 'toggleMenu_', |
| 31 }, | 30 }, |
| 32 | 31 |
| 33 /** | 32 /** |
| 34 * @param {HistoryQuery} info An object containing information about the | 33 * @param {HistoryQuery} info An object containing information about the |
| 35 * query. | 34 * query. |
| 36 * @param {!Array<HistoryEntry>} results A list of results. | 35 * @param {!Array<HistoryEntry>} results A list of results. |
| 37 */ | 36 */ |
| 38 historyResult: function(info, results) { | 37 historyResult: function(info, results) { |
| 39 this.initializeResults_(info, results); | 38 this.initializeResults_(info, results); |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 .then(function(items) { | 183 .then(function(items) { |
| 185 this.$['infinite-list'].removeDeletedHistory_(items); | 184 this.$['infinite-list'].removeDeletedHistory_(items); |
| 186 // This unselect-all is to reset the toolbar when deleting a selected | 185 // This unselect-all is to reset the toolbar when deleting a selected |
| 187 // item. TODO(tsergeant): Make this automatic based on observing list | 186 // item. TODO(tsergeant): Make this automatic based on observing list |
| 188 // modifications. | 187 // modifications. |
| 189 this.fire('unselect-all'); | 188 this.fire('unselect-all'); |
| 190 }.bind(this)); | 189 }.bind(this)); |
| 191 menu.closeMenu(); | 190 menu.closeMenu(); |
| 192 }, | 191 }, |
| 193 }); | 192 }); |
| OLD | NEW |