| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview Account picker screen implementation. | 6 * @fileoverview Account picker screen implementation. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 login.createScreen('AccountPickerScreen', 'account-picker', function() { | 9 login.createScreen('AccountPickerScreen', 'account-picker', function() { |
| 10 /** | 10 /** |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 if (loginAttempts > MAX_LOGIN_ATTEMPTS_IN_POD && | 170 if (loginAttempts > MAX_LOGIN_ATTEMPTS_IN_POD && |
| 171 !activatedPod.user.supervisedUser) { | 171 !activatedPod.user.supervisedUser) { |
| 172 chrome.send('maxIncorrectPasswordAttempts', | 172 chrome.send('maxIncorrectPasswordAttempts', |
| 173 [activatedPod.user.emailAddress]); | 173 [activatedPod.user.emailAddress]); |
| 174 activatedPod.showSigninUI(); | 174 activatedPod.showSigninUI(); |
| 175 } else { | 175 } else { |
| 176 if (loginAttempts == 1) { | 176 if (loginAttempts == 1) { |
| 177 chrome.send('firstIncorrectPasswordAttempt', | 177 chrome.send('firstIncorrectPasswordAttempt', |
| 178 [activatedPod.user.emailAddress]); | 178 [activatedPod.user.emailAddress]); |
| 179 } | 179 } |
| 180 // Update the pod row display if incorrect password. |
| 181 $('pod-row').setFocusedPodErrorDisplay(true); |
| 180 // We want bubble's arrow to point to the first letter of input. | 182 // We want bubble's arrow to point to the first letter of input. |
| 181 /** @const */ var BUBBLE_OFFSET = 7; | 183 /** @const */ var BUBBLE_OFFSET = 7; |
| 182 /** @const */ var BUBBLE_PADDING = 4; | 184 /** @const */ var BUBBLE_PADDING = 4; |
| 183 $('bubble').showContentForElement(activatedPod.mainInput, | 185 $('bubble').showContentForElement(activatedPod.mainInput, |
| 184 cr.ui.Bubble.Attachment.BOTTOM, | 186 cr.ui.Bubble.Attachment.BOTTOM, |
| 185 error, | 187 error, |
| 186 BUBBLE_OFFSET, BUBBLE_PADDING); | 188 BUBBLE_OFFSET, BUBBLE_PADDING); |
| 187 // Move error bubble up if it overlaps the shelf. | 189 // Move error bubble up if it overlaps the shelf. |
| 188 var maxHeight = | 190 var maxHeight = |
| 189 cr.ui.LoginUITools.getMaxHeightBeforeShelfOverlapping($('bubble')); | 191 cr.ui.LoginUITools.getMaxHeightBeforeShelfOverlapping($('bubble')); |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 * @param {string} userID The user ID of the public session | 396 * @param {string} userID The user ID of the public session |
| 395 * @param {string} locale The locale to which this list of keyboard layouts | 397 * @param {string} locale The locale to which this list of keyboard layouts |
| 396 * applies | 398 * applies |
| 397 * @param {!Object} list List of available keyboard layouts | 399 * @param {!Object} list List of available keyboard layouts |
| 398 */ | 400 */ |
| 399 setPublicSessionKeyboardLayouts: function(userID, locale, list) { | 401 setPublicSessionKeyboardLayouts: function(userID, locale, list) { |
| 400 $('pod-row').setPublicSessionKeyboardLayouts(userID, locale, list); | 402 $('pod-row').setPublicSessionKeyboardLayouts(userID, locale, list); |
| 401 } | 403 } |
| 402 }; | 404 }; |
| 403 }); | 405 }); |
| OLD | NEW |