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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 }, | 90 }, |
91 | 91 |
92 /** | 92 /** |
93 * Delete all the currently selected history items. Will prompt the user with | 93 * Delete all the currently selected history items. Will prompt the user with |
94 * a dialog to confirm that the deletion should be performed. | 94 * a dialog to confirm that the deletion should be performed. |
95 */ | 95 */ |
96 deleteSelectedWithPrompt: function() { | 96 deleteSelectedWithPrompt: function() { |
97 if (!loadTimeData.getBoolean('allowDeletingHistory')) | 97 if (!loadTimeData.getBoolean('allowDeletingHistory')) |
98 return; | 98 return; |
99 | 99 |
100 this.$.dialog.open(); | 100 this.$.dialog.showModal(); |
101 }, | 101 }, |
102 | 102 |
103 /** | 103 /** |
104 * @param {HistoryRange} range | 104 * @param {HistoryRange} range |
105 * @private | 105 * @private |
106 */ | 106 */ |
107 groupedRangeChanged_: function(range) { | 107 groupedRangeChanged_: function(range) { |
108 this.selectedPage_ = this.queryState.range == HistoryRange.ALL_TIME ? | 108 this.selectedPage_ = this.queryState.range == HistoryRange.ALL_TIME ? |
109 'infinite-list' : 'grouped-list'; | 109 'infinite-list' : 'grouped-list'; |
110 | 110 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 .then(function(items) { | 184 .then(function(items) { |
185 this.$['infinite-list'].removeDeletedHistory_(items); | 185 this.$['infinite-list'].removeDeletedHistory_(items); |
186 // This unselect-all is to reset the toolbar when deleting a selected | 186 // This unselect-all is to reset the toolbar when deleting a selected |
187 // item. TODO(tsergeant): Make this automatic based on observing list | 187 // item. TODO(tsergeant): Make this automatic based on observing list |
188 // modifications. | 188 // modifications. |
189 this.fire('unselect-all'); | 189 this.fire('unselect-all'); |
190 }.bind(this)); | 190 }.bind(this)); |
191 menu.closeMenu(); | 191 menu.closeMenu(); |
192 }, | 192 }, |
193 }); | 193 }); |
OLD | NEW |