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

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

Issue 960133002: Js fixed for proper status setting on HID screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 eb78cece55a5ede3bef128bff1cbb229359bd24d..88b5cbf461ebe0124e1c18deb54dbc97eaca2a21 100644
--- a/chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js
+++ b/chrome/browser/resources/chromeos/login/oobe_screen_hid_detection.js
@@ -169,13 +169,18 @@ login.createScreen('HIDDetectionScreen', 'hid-detection', function() {
if (state == 'update')
return;
var deviceBlock = $(blockId);
- for (var stateCase in this.CONNECTION)
+ for (var key in this.CONNECTION) {
+ var stateCase = this.CONNECTION[key];
deviceBlock.classList.toggle(stateCase, stateCase == state);
+ }
// 'Continue' button available iff at least one device is connected,
- if ((blockId in this.BLOCK) &&
- (state == this.CONNECTION.CONNECTED ||
- state == this.CONNECTION.PAIRED)) {
+ var keyboardState = this.context.get(CONTEXT_KEY_KEYBOARD_STATE, '');
Nikita (slow) 2015/02/26 12:10:08 As discussed, please move this login to C++ side.
+ var mouseState = this.context.get(CONTEXT_KEY_MOUSE_STATE, '');
+ if (keyboardState == this.CONNECTION.CONNECTED ||
+ keyboardState == this.CONNECTION.PAIRED ||
+ mouseState == this.CONNECTION.CONNECTED ||
+ mouseState == this.CONNECTION.PAIRED) {
$('hid-continue-button').disabled = false;
} else {
$('hid-continue-button').disabled = true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698