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

Unified Diff: chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js

Issue 770563003: HID fix for device info check. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Continue button and icon states set up. Created 6 years 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/chromeos/login/oobe_screen_hid_detection.js
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js b/chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js
index 7610e2b788a4a22072d8d6b01f137c481a5b8c63..498846a572161ae4bfe3d15e8a8b921acf51d3d3 100644
--- a/chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js
+++ b/chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js
@@ -79,6 +79,16 @@ login.createScreen('HIDDetectionScreen', 'hid-detection', function() {
deviceBlock.classList.remove(states[i]);
}
deviceBlock.classList.add(state);
+
+ // 'Continue' button available iff at least one device is connected,
+ if ($('hid-mouse-block').classList.contains('connected') ||
ygorshenin1 2014/12/24 09:34:47 Also, it would be nice to declare a dictionary for
ygorshenin1 2014/12/24 09:34:47 I thought it would be better to rewrite predicate
merkulova 2014/12/24 13:47:46 Done.
merkulova 2014/12/24 13:47:46 Done.
+ $('hid-mouse-block').classList.contains('paired') ||
+ $('hid-keyboard-block').classList.contains('connected') ||
+ $('hid-keyboard-block').classList.contains('paired')) {
+ $('hid-continue-button').disabled = false;
+ } else {
+ $('hid-continue-button').disabled = true;
+ }
},
/**
@@ -142,15 +152,5 @@ login.createScreen('HIDDetectionScreen', 'hid-detection', function() {
}
}
},
-
- /**
ygorshenin1 2014/12/24 09:34:47 Why this code is removed?
merkulova 2014/12/24 13:47:46 1. Its logic is wrong: if list of connected device
- * Event handler that is invoked just before the screen in shown.
- * @param {Object} data Screen init payload.
- */
- onBeforeShow: function(data) {
- $('hid-continue-button').disabled = true;
- this.setDeviceBlockState_('hid-mouse-block', 'searching');
- this.setDeviceBlockState_('hid-keyboard-block', 'searching');
- },
};
});

Powered by Google App Engine
This is Rietveld 408576698