Chromium Code Reviews| 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 getSelectedItemCount: function() { | |
|
tsergeant
2016/08/15 04:49:50
/** @return {number} */
calamity
2016/08/15 07:18:40
Done.
| |
| 90 return this.getSelectedList_().selectedPaths.size; | |
| 91 }, | |
| 92 | |
| 89 unselectAllItems: function(count) { | 93 unselectAllItems: function(count) { |
| 90 this.getSelectedList_().unselectAllItems(count); | 94 this.getSelectedList_().unselectAllItems(count); |
| 91 }, | 95 }, |
| 92 | 96 |
| 93 /** | 97 /** |
| 94 * Delete all the currently selected history items. Will prompt the user with | 98 * Delete all the currently selected history items. Will prompt the user with |
| 95 * a dialog to confirm that the deletion should be performed. | 99 * a dialog to confirm that the deletion should be performed. |
| 96 */ | 100 */ |
| 97 deleteSelectedWithPrompt: function() { | 101 deleteSelectedWithPrompt: function() { |
| 98 if (!loadTimeData.getBoolean('allowDeletingHistory')) | 102 if (!loadTimeData.getBoolean('allowDeletingHistory')) |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 192 }, | 196 }, |
| 193 | 197 |
| 194 /** | 198 /** |
| 195 * @return {HTMLElement} | 199 * @return {HTMLElement} |
| 196 * @private | 200 * @private |
| 197 */ | 201 */ |
| 198 getSelectedList_: function() { | 202 getSelectedList_: function() { |
| 199 return this.$.content.selectedItem; | 203 return this.$.content.selectedItem; |
| 200 }, | 204 }, |
| 201 }); | 205 }); |
| OLD | NEW |