| 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 /** | 5 /** |
| 6 * @fileoverview | 6 * @fileoverview |
| 7 * 'settings-touchpad' is the settings subpage with touchpad settings. | 7 * 'settings-pointers' is the settings subpage with mouse and touchpad settings. |
| 8 */ | 8 */ |
| 9 Polymer({ | 9 Polymer({ |
| 10 is: 'settings-touchpad', | 10 is: 'settings-pointers', |
| 11 |
| 12 behaviors: [ |
| 13 I18nBehavior, |
| 14 ], |
| 11 | 15 |
| 12 properties: { | 16 properties: { |
| 13 /** Preferences state. */ | 17 /** Preferences state. */ |
| 14 prefs: { | 18 prefs: { |
| 15 type: Object, | 19 type: Object, |
| 16 notify: true, | 20 notify: true, |
| 17 }, | 21 }, |
| 22 |
| 23 hasMouse: { |
| 24 type: Boolean, |
| 25 value: false, |
| 26 }, |
| 27 |
| 28 hasTouchpad: { |
| 29 type: Boolean, |
| 30 value: false, |
| 31 }, |
| 18 }, | 32 }, |
| 19 | 33 |
| 20 /** | 34 /** |
| 21 * Prevents the link from activating its parent paper-radio-button. | 35 * Prevents the link from activating its parent paper-radio-button. |
| 22 * @param {!Event} e | 36 * @param {!Event} e |
| 23 * @private | 37 * @private |
| 24 */ | 38 */ |
| 25 onLearnMoreLinkActivated_: function(e) { | 39 onLearnMoreLinkActivated_: function(e) { |
| 26 settings.DevicePageBrowserProxyImpl.getInstance().handleLinkEvent(e); | 40 settings.DevicePageBrowserProxyImpl.getInstance().handleLinkEvent(e); |
| 27 }, | 41 }, |
| 42 |
| 43 // Mouse and touchpad sections are only subsections if they are both present. |
| 44 getSectionClass_: function(hasMouse, hasTouchpad) { |
| 45 return hasMouse && hasTouchpad ? 'subsection' : ''; |
| 46 }, |
| 28 }); | 47 }); |
| OLD | NEW |