Chromium Code Reviews| 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-side-bar', | 6 is: 'history-side-bar', |
| 7 | 7 |
| 8 behaviors: [Polymer.IronA11yKeysBehavior], | 8 behaviors: [Polymer.IronA11yKeysBehavior], |
| 9 | 9 |
| 10 properties: { | 10 properties: { |
| 11 selectedPage: { | 11 selectedPage: { |
| 12 type: String, | 12 type: String, |
| 13 notify: true, | 13 notify: true, |
| 14 }, | 14 }, |
| 15 | 15 |
| 16 showFooter: Boolean, | 16 showFooter: Boolean, |
|
Dan Beam
2017/02/02 07:43:11
nit: this could be a property instead?
deletingAl
tsergeant
2017/02/03 00:34:50
Seems like a better pattern -- we should probably
calamity
2017/02/07 05:08:58
Done.
| |
| 17 }, | 17 }, |
| 18 | 18 |
| 19 keyBindings: { | 19 keyBindings: { |
| 20 'space:keydown': 'onSpacePressed_', | 20 'space:keydown': 'onSpacePressed_', |
| 21 }, | 21 }, |
| 22 | 22 |
| 23 /** | 23 /** |
| 24 * @param {CustomEvent} e | 24 * @param {CustomEvent} e |
| 25 * @private | 25 * @private |
| 26 */ | 26 */ |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 49 }, | 49 }, |
| 50 | 50 |
| 51 /** | 51 /** |
| 52 * Prevent clicks on sidebar items from navigating. These are only links for | 52 * Prevent clicks on sidebar items from navigating. These are only links for |
| 53 * accessibility purposes, taps are handled separately by <iron-selector>. | 53 * accessibility purposes, taps are handled separately by <iron-selector>. |
| 54 * @private | 54 * @private |
| 55 */ | 55 */ |
| 56 onItemClick_: function(e) { | 56 onItemClick_: function(e) { |
| 57 e.preventDefault(); | 57 e.preventDefault(); |
| 58 }, | 58 }, |
| 59 | |
| 60 /** | |
| 61 * If the user is a supervised user the delete button is not shown. | |
| 62 * @private | |
| 63 */ | |
| 64 deletingAllowed_: function() { | |
| 65 return loadTimeData.getBoolean('allowDeletingHistory'); | |
| 66 }, | |
| 59 }); | 67 }); |
| OLD | NEW |