Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4809)

Unified Diff: chrome/browser/resources/settings/device_page/device_page.js

Issue 2644713002: cros: Use runtime stylus detection for ash palette. (Closed)
Patch Set: Fix test Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..23a004e28425926d8d7456fa57df93f2841254ca 100644
--- a/chrome/browser/resources/settings/device_page/device_page.js
+++ b/chrome/browser/resources/settings/device_page/device_page.js
@@ -22,22 +22,25 @@ 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,
+ hasMouse_: {
+ type: Boolean,
+ value: false
+ },
/** @private */
- hasTouchpad_: Boolean,
+ hasTouchpad_: {
+ type: Boolean,
+ value: false
+ },
/** @private */
- stylusAllowed_: {
+ hasStylus_: {
type: Boolean,
- value: function() {
- return loadTimeData.getBoolean('stylusAllowed');
- },
- readOnly: true,
+ value: false
},
/**
@@ -109,6 +112,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_'));

Powered by Google App Engine
This is Rietveld 408576698