| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 Polymer({ |
| 6 is: 'input-device-settings', |
| 7 |
| 8 behaviors: [Polymer.NeonAnimatableBehavior], |
| 9 |
| 10 /** |
| 11 * @param {!Event} e |
| 12 * Callback when the user toggles the touchpad. |
| 13 */ |
| 14 onTouchpadChange: function(e) { |
| 15 chrome.send('setHasTouchpad', [e.target.checked]); |
| 16 this.$.changeDescription.opened = true; |
| 17 }, |
| 18 |
| 19 /** |
| 20 * @param {!Event} e |
| 21 * Callback when the user toggles the mouse. |
| 22 */ |
| 23 onMouseChange: function(e) { |
| 24 chrome.send('setHasMouse', [e.target.checked]); |
| 25 this.$.changeDescription.opened = true; |
| 26 }, |
| 27 |
| 28 /** |
| 29 * Callback when the existence of a fake mouse changes. |
| 30 * @param {boolean} exists |
| 31 */ |
| 32 setMouseExists: function(exists) { |
| 33 this.$.mouse.checked = exists; |
| 34 }, |
| 35 |
| 36 /** |
| 37 * Callback when the existence of a fake touchpad changes. |
| 38 * @param {boolean} exists |
| 39 */ |
| 40 setTouchpadExists: function(exists) { |
| 41 this.$.touchpad.checked = exists; |
| 42 }, |
| 43 }); |
| OLD | NEW |