Chromium Code Reviews| Index: chrome/browser/resources/settings/device_page/device_page.js |
| diff --git a/chrome/browser/resources/settings/device_page/device_page.js b/chrome/browser/resources/settings/device_page/device_page.js |
| index b3bb4acc65d12446faed1485211b399f86723921..0dd856b8b96b5cf42b2a8ed6e627a47b4d96d82f 100644 |
| --- a/chrome/browser/resources/settings/device_page/device_page.js |
| +++ b/chrome/browser/resources/settings/device_page/device_page.js |
| @@ -22,8 +22,8 @@ Polymer({ |
| }, |
| /** |
| - * |hasMouse_| and |hasTouchpad_| start undefined so observers don't trigger |
| - * until both have been populated. |
| + * |hasMouse_|, |hasTouchpad_|, and |hasStylus_| start undefined so |
| + * observers don't trigger until they have been populated. |
| * @private |
| */ |
| hasMouse_: Boolean, |
| @@ -32,13 +32,7 @@ Polymer({ |
| hasTouchpad_: Boolean, |
| /** @private */ |
| - stylusAllowed_: { |
| - type: Boolean, |
| - value: function() { |
| - return loadTimeData.getBoolean('stylusAllowed'); |
| - }, |
| - readOnly: true, |
| - }, |
| + hasStylus_: Boolean, |
|
stevenjb
2017/02/03 23:11:26
This should actually initialize to 'false', otherw
jdufault
2017/02/06 21:44:41
Done; I was following the pattern for hasMouse_ an
|
| /** |
| * Whether power status and settings should be fetched and displayed. |
| @@ -109,6 +103,10 @@ Polymer({ |
| 'has-touchpad-changed', this.set.bind(this, 'hasTouchpad_')); |
| settings.DevicePageBrowserProxyImpl.getInstance().initializePointers(); |
| + this.addWebUIListener( |
| + 'has-stylus-changed', this.set.bind(this, 'hasStylus_')); |
| + settings.DevicePageBrowserProxyImpl.getInstance().initializeStylus(); |
| + |
| if (this.enablePowerSettings_) { |
| this.addWebUIListener( |
| 'battery-status-changed', this.set.bind(this, 'batteryStatus_')); |