| 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-pointers' is the settings subpage with mouse and touchpad settings. | 7 * 'settings-pointers' is the settings subpage with mouse and touchpad settings. |
| 8 */ | 8 */ |
| 9 Polymer({ | 9 Polymer({ |
| 10 is: 'settings-pointers', | 10 is: 'settings-pointers', |
| 11 | 11 |
| 12 properties: { | 12 properties: { |
| 13 /** Preferences state. */ | 13 /** Preferences state. */ |
| 14 prefs: { | 14 prefs: { |
| 15 type: Object, | 15 type: Object, |
| 16 notify: true, | 16 notify: true, |
| 17 }, | 17 }, |
| 18 | 18 |
| 19 hasMouse: { | 19 hasMouse: Boolean, |
| 20 type: Boolean, | |
| 21 value: false, | |
| 22 }, | |
| 23 | 20 |
| 24 hasTouchpad: { | 21 hasTouchpad: Boolean, |
| 25 type: Boolean, | |
| 26 value: false, | |
| 27 }, | |
| 28 | 22 |
| 29 /** | 23 /** |
| 30 * TODO(michaelpg): cr-slider should optionally take a min and max so we | 24 * TODO(michaelpg): cr-slider should optionally take a min and max so we |
| 31 * don't have to generate a simple range of natural numbers ourselves. | 25 * don't have to generate a simple range of natural numbers ourselves. |
| 32 * @const {!Array<number>} | 26 * @const {!Array<number>} |
| 33 * @private | 27 * @private |
| 34 */ | 28 */ |
| 35 sensitivityValues_: { | 29 sensitivityValues_: { |
| 36 type: Array, | 30 type: Array, |
| 37 value: [1, 2, 3, 4, 5], | 31 value: [1, 2, 3, 4, 5], |
| 38 readOnly: true, | 32 readOnly: true, |
| 39 }, | 33 }, |
| 40 }, | 34 }, |
| 41 | 35 |
| 42 /** | 36 /** |
| 43 * Prevents the link from activating its parent paper-radio-button. | 37 * Prevents the link from activating its parent paper-radio-button. |
| 44 * @param {!Event} e | 38 * @param {!Event} e |
| 45 * @private | 39 * @private |
| 46 */ | 40 */ |
| 47 onLearnMoreLinkActivated_: function(e) { | 41 onLearnMoreLinkActivated_: function(e) { |
| 48 settings.DevicePageBrowserProxyImpl.getInstance().handleLinkEvent(e); | 42 settings.DevicePageBrowserProxyImpl.getInstance().handleLinkEvent(e); |
| 49 }, | 43 }, |
| 50 | 44 |
| 51 // Mouse and touchpad sections are only subsections if they are both present. | 45 // Mouse and touchpad sections are only subsections if they are both present. |
| 52 getSubsectionClass_: function(hasMouse, hasTouchpad) { | 46 getSubsectionClass_: function(hasMouse, hasTouchpad) { |
| 53 return hasMouse && hasTouchpad ? 'subsection' : ''; | 47 return hasMouse && hasTouchpad ? 'subsection' : ''; |
| 54 }, | 48 }, |
| 55 }); | 49 }); |
| OLD | NEW |