| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 } | 79 } |
| 80 | 80 |
| 81 var maxResults = | 81 var maxResults = |
| 82 queryState.range == HistoryRange.ALL_TIME ? RESULTS_PER_PAGE : 0; | 82 queryState.range == HistoryRange.ALL_TIME ? RESULTS_PER_PAGE : 0; |
| 83 chrome.send('queryHistory', [ | 83 chrome.send('queryHistory', [ |
| 84 queryState.searchTerm, queryState.groupedOffset, queryState.range, | 84 queryState.searchTerm, queryState.groupedOffset, queryState.range, |
| 85 lastVisitTime, maxResults | 85 lastVisitTime, maxResults |
| 86 ]); | 86 ]); |
| 87 }, | 87 }, |
| 88 | 88 |
| 89 /** @return {number} */ |
| 90 getSelectedItemCount: function() { |
| 91 return this.getSelectedList_().selectedPaths.size; |
| 92 }, |
| 93 |
| 89 unselectAllItems: function(count) { | 94 unselectAllItems: function(count) { |
| 90 this.getSelectedList_().unselectAllItems(count); | 95 this.getSelectedList_().unselectAllItems(count); |
| 91 }, | 96 }, |
| 92 | 97 |
| 93 /** | 98 /** |
| 94 * Delete all the currently selected history items. Will prompt the user with | 99 * Delete all the currently selected history items. Will prompt the user with |
| 95 * a dialog to confirm that the deletion should be performed. | 100 * a dialog to confirm that the deletion should be performed. |
| 96 */ | 101 */ |
| 97 deleteSelectedWithPrompt: function() { | 102 deleteSelectedWithPrompt: function() { |
| 98 if (!loadTimeData.getBoolean('allowDeletingHistory')) | 103 if (!loadTimeData.getBoolean('allowDeletingHistory')) |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 }, | 198 }, |
| 194 | 199 |
| 195 /** | 200 /** |
| 196 * @return {HTMLElement} | 201 * @return {HTMLElement} |
| 197 * @private | 202 * @private |
| 198 */ | 203 */ |
| 199 getSelectedList_: function() { | 204 getSelectedList_: function() { |
| 200 return this.$.content.selectedItem; | 205 return this.$.content.selectedItem; |
| 201 }, | 206 }, |
| 202 }); | 207 }); |
| OLD | NEW |