| 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 /** @private */ | 185 /** @private */ |
| 186 onClearSelectionTap_: function() { | 186 onClearSelectionTap_: function() { |
| 187 this.fire('unselect-all'); | 187 this.fire('unselect-all'); |
| 188 }, | 188 }, |
| 189 | 189 |
| 190 /** @private */ | 190 /** @private */ |
| 191 onDeleteTap_: function() { | 191 onDeleteTap_: function() { |
| 192 this.fire('delete-selected'); | 192 this.fire('delete-selected'); |
| 193 }, | 193 }, |
| 194 | 194 |
| 195 /** | |
| 196 * If the user is a supervised user the delete button is not shown. | |
| 197 * @private | |
| 198 */ | |
| 199 deletingAllowed_: function() { | |
| 200 return loadTimeData.getBoolean('allowDeletingHistory'); | |
| 201 }, | |
| 202 | |
| 203 /** @private */ | 195 /** @private */ |
| 204 numberOfItemsSelected_: function(count) { | 196 numberOfItemsSelected_: function(count) { |
| 205 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : ''; | 197 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : ''; |
| 206 }, | 198 }, |
| 207 | 199 |
| 208 /** @private */ | 200 /** @private */ |
| 209 getHistoryInterval_: function() { | 201 getHistoryInterval_: function() { |
| 210 var info = this.queryInfo; | 202 var info = this.queryInfo; |
| 211 if (!info) | 203 if (!info) |
| 212 return; | 204 return; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 }, | 244 }, |
| 253 | 245 |
| 254 /** | 246 /** |
| 255 * @private | 247 * @private |
| 256 * @return {boolean} | 248 * @return {boolean} |
| 257 */ | 249 */ |
| 258 isToday_: function() { | 250 isToday_: function() { |
| 259 return this.groupedOffset == 0; | 251 return this.groupedOffset == 0; |
| 260 }, | 252 }, |
| 261 }); | 253 }); |
| OLD | NEW |