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

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

Issue 2644713002: cros: Use runtime stylus detection for ash palette. (Closed)
Patch Set: Add listeners to options and settings Created 3 years, 11 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..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_'));

Powered by Google App Engine
This is Rietveld 408576698