| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 } | 76 } |
| 77 | 77 |
| 78 var maxResults = | 78 var maxResults = |
| 79 queryState.range == HistoryRange.ALL_TIME ? RESULTS_PER_PAGE : 0; | 79 queryState.range == HistoryRange.ALL_TIME ? RESULTS_PER_PAGE : 0; |
| 80 chrome.send('queryHistory', [ | 80 chrome.send('queryHistory', [ |
| 81 queryState.searchTerm, queryState.groupedOffset, queryState.range, | 81 queryState.searchTerm, queryState.groupedOffset, queryState.range, |
| 82 lastVisitTime, maxResults | 82 lastVisitTime, maxResults |
| 83 ]); | 83 ]); |
| 84 }, | 84 }, |
| 85 | 85 |
| 86 reloadingList: function() { |
| 87 /** @type {HistoryListElement} */ (this.$['infinite-list']) |
| 88 .reloadingList(); |
| 89 }, |
| 90 |
| 86 unselectAllItems: function(count) { | 91 unselectAllItems: function(count) { |
| 87 /** @type {HistoryListElement} */ (this.$['infinite-list']) | 92 /** @type {HistoryListElement} */ (this.$['infinite-list']) |
| 88 .unselectAllItems(count); | 93 .unselectAllItems(count); |
| 89 }, | 94 }, |
| 90 | 95 |
| 91 /** | 96 /** |
| 92 * Delete all the currently selected history items. Will prompt the user with | 97 * Delete all the currently selected history items. Will prompt the user with |
| 93 * a dialog to confirm that the deletion should be performed. | 98 * a dialog to confirm that the deletion should be performed. |
| 94 */ | 99 */ |
| 95 deleteSelectedWithPrompt: function() { | 100 deleteSelectedWithPrompt: function() { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 .then(function(items) { | 188 .then(function(items) { |
| 184 this.$['infinite-list'].removeDeletedHistory_(items); | 189 this.$['infinite-list'].removeDeletedHistory_(items); |
| 185 // This unselect-all is to reset the toolbar when deleting a selected | 190 // This unselect-all is to reset the toolbar when deleting a selected |
| 186 // item. TODO(tsergeant): Make this automatic based on observing list | 191 // item. TODO(tsergeant): Make this automatic based on observing list |
| 187 // modifications. | 192 // modifications. |
| 188 this.fire('unselect-all'); | 193 this.fire('unselect-all'); |
| 189 }.bind(this)); | 194 }.bind(this)); |
| 190 menu.closeMenu(); | 195 menu.closeMenu(); |
| 191 }, | 196 }, |
| 192 }); | 197 }); |
| OLD | NEW |