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 count: { | 9 count: { |
10 type: Number, | 10 type: Number, |
(...skipping 15 matching lines...) Expand all Loading... |
26 * @private | 26 * @private |
27 */ | 27 */ |
28 changeToolbarView_: function() { | 28 changeToolbarView_: function() { |
29 this.itemsSelected_ = this.count > 0; | 29 this.itemsSelected_ = this.count > 0; |
30 }, | 30 }, |
31 | 31 |
32 onClearSelectionTap_: function() { | 32 onClearSelectionTap_: function() { |
33 this.fire('unselect-all'); | 33 this.fire('unselect-all'); |
34 }, | 34 }, |
35 | 35 |
| 36 /** |
| 37 * Relocates the user to the clear browsing data section of the settings page. |
| 38 * @private |
| 39 */ |
| 40 onClearBrowsingDataTap_: function() { |
| 41 window.location.href = 'chrome://settings/clearBrowserData'; |
| 42 }, |
| 43 |
36 onDeleteTap_: function() { | 44 onDeleteTap_: function() { |
37 this.fire('delete-selected'); | 45 this.fire('delete-selected'); |
38 }, | 46 }, |
39 | 47 |
40 /** | 48 /** |
41 * If the user is a supervised user the delete button is not shown. | 49 * If the user is a supervised user the delete button is not shown. |
42 * @private | 50 * @private |
43 */ | 51 */ |
44 deletingAllowed_: function() { | 52 deletingAllowed_: function() { |
45 return loadTimeData.getBoolean('allowDeletingHistory'); | 53 return loadTimeData.getBoolean('allowDeletingHistory'); |
46 }, | 54 }, |
47 | 55 |
48 numberOfItemsSelected_: function(count) { | 56 numberOfItemsSelected_: function(count) { |
49 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : ''; | 57 return count > 0 ? loadTimeData.getStringF('itemsSelected', count) : ''; |
50 } | 58 } |
51 }); | 59 }); |
OLD | NEW |