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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 * Delete all the currently selected history items. Will prompt the user with | 87 * Delete all the currently selected history items. Will prompt the user with |
88 * a dialog to confirm that the deletion should be performed. | 88 * a dialog to confirm that the deletion should be performed. |
89 */ | 89 */ |
90 deleteSelectedWithPrompt: function() { | 90 deleteSelectedWithPrompt: function() { |
91 if (!loadTimeData.getBoolean('allowDeletingHistory')) | 91 if (!loadTimeData.getBoolean('allowDeletingHistory')) |
92 return; | 92 return; |
93 | 93 |
94 this.$.dialog.open(); | 94 this.$.dialog.open(); |
95 }, | 95 }, |
96 | 96 |
| 97 /** @return {HistoryListElement} */ |
| 98 getHistoryList: function() { |
| 99 return this.$['infinite-list']; |
| 100 }, |
| 101 |
97 /** | 102 /** |
98 * @param {string} searchTerm | 103 * @param {string} searchTerm |
99 * @private | 104 * @private |
100 */ | 105 */ |
101 searchTermChanged_: function(searchTerm) { this.queryHistory(false); }, | 106 searchTermChanged_: function(searchTerm) { this.queryHistory(false); }, |
102 | 107 |
103 /** | 108 /** |
104 * @param {HistoryRange} range | 109 * @param {HistoryRange} range |
105 * @private | 110 * @private |
106 */ | 111 */ |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 onDialogConfirmTap_: function() { | 147 onDialogConfirmTap_: function() { |
143 this.$['infinite-list'].deleteSelected(); | 148 this.$['infinite-list'].deleteSelected(); |
144 this.$.dialog.close(); | 149 this.$.dialog.close(); |
145 }, | 150 }, |
146 | 151 |
147 /** @private */ | 152 /** @private */ |
148 onDialogCancelTap_: function() { | 153 onDialogCancelTap_: function() { |
149 this.$.dialog.close(); | 154 this.$.dialog.close(); |
150 } | 155 } |
151 }); | 156 }); |
OLD | NEW |