| 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 | 185 |
| 184 // We want the bubble to point to where the input is after it is done | 186 // We want the bubble to point to where the input is after it is done |
| 185 // tranisitioning. | 187 // tranisitioning. |
| 186 var showBottomCallback = function() { | 188 var showBottomCallback = function() { |
| 187 activatedPod.removeEventListener("webkitTransitionEnd", | 189 activatedPod.removeEventListener("webkitTransitionEnd", |
| 188 showBottomCallback); | 190 showBottomCallback); |
| 189 $('bubble').showContentForElement(activatedPod.mainInput, | 191 $('bubble').showContentForElement(activatedPod.mainInput, |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 * @param {string} userID The user ID of the public session | 413 * @param {string} userID The user ID of the public session |
| 412 * @param {string} locale The locale to which this list of keyboard layouts | 414 * @param {string} locale The locale to which this list of keyboard layouts |
| 413 * applies | 415 * applies |
| 414 * @param {!Object} list List of available keyboard layouts | 416 * @param {!Object} list List of available keyboard layouts |
| 415 */ | 417 */ |
| 416 setPublicSessionKeyboardLayouts: function(userID, locale, list) { | 418 setPublicSessionKeyboardLayouts: function(userID, locale, list) { |
| 417 $('pod-row').setPublicSessionKeyboardLayouts(userID, locale, list); | 419 $('pod-row').setPublicSessionKeyboardLayouts(userID, locale, list); |
| 418 } | 420 } |
| 419 }; | 421 }; |
| 420 }); | 422 }); |
| OLD | NEW |