| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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-toolbar', | 6 is: 'history-toolbar', |
| 7 properties: { | 7 properties: { |
| 8 // Number of history items currently selected. | 8 // Number of history items currently selected. |
| 9 // TODO(calamity): bind this to | 9 // TODO(calamity): bind this to |
| 10 // listContainer.selectedItem.selectedPaths.length. | 10 // listContainer.selectedItem.selectedPaths.length. |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 /** @private */ | 171 /** @private */ |
| 172 onClearSelectionTap_: function() { | 172 onClearSelectionTap_: function() { |
| 173 this.fire('unselect-all'); | 173 this.fire('unselect-all'); |
| 174 }, | 174 }, |
| 175 | 175 |
| 176 /** @private */ | 176 /** @private */ |
| 177 onDeleteTap_: function() { | 177 onDeleteTap_: function() { |
| 178 this.fire('delete-selected'); | 178 this.fire('delete-selected'); |
| 179 }, | 179 }, |
| 180 | 180 |
| 181 /** | |
| 182 * If the user is a supervised user the delete button is not shown. | |
| 183 * @private | |
| 184 */ | |
| 185 deletingAllowed_: function() { | |
| 186 return loadTimeData.getBoolean('allowDeletingHistory'); | |
| 187 }, | |
| 188 | |
| 189 /** @private */ | 181 /** @private */ |
| 190 numberOfItemsSelected_: function(count) { | 182 numberOfItemsSelected_: function(count) { |
| 191 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : ''; | 183 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : ''; |
| 192 }, | 184 }, |
| 193 }); | 185 }); |
| OLD | NEW |