| 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 ensureTransitionEndEvent(activatedPod); | 259 ensureTransitionEndEvent(activatedPod); |
| 260 } | 260 } |
| 261 }, | 261 }, |
| 262 | 262 |
| 263 /** | 263 /** |
| 264 * Loads the PIN keyboard if any of the users can login with a PIN. Disables | 264 * Loads the PIN keyboard if any of the users can login with a PIN. Disables |
| 265 * the PIN keyboard for users who are not allowed to use PIN unlock. | 265 * the PIN keyboard for users who are not allowed to use PIN unlock. |
| 266 * @param {array} users Array of user instances. | 266 * @param {array} users Array of user instances. |
| 267 */ | 267 */ |
| 268 initializePinKeyboardStateForUsers_: function(users) { | 268 initializePinKeyboardStateForUsers_: function(users) { |
| 269 // It is possible that the PIN keyboard HTML has already been loaded. If |
| 270 // that is the case, we want to show the user pods with the PIN keyboard |
| 271 // immediately without running the PIN show/hide effect. |
| 272 document.body.classList.add('disable-pin-animation'); |
| 273 setTimeout(function() { |
| 274 document.body.classList.remove('disable-pin-animation'); |
| 275 }); |
| 276 |
| 269 for (var i = 0; i < users.length; ++i) { | 277 for (var i = 0; i < users.length; ++i) { |
| 270 var user = users[i]; | 278 var user = users[i]; |
| 271 if (user.showPin) { | 279 if (user.showPin) { |
| 272 showPinKeyboardAsync(); | 280 showPinKeyboardAsync(); |
| 273 } else { | 281 } else { |
| 274 // Disable pin for users who cannot authenticate with PIN. For | 282 // Disable pin for users who cannot authenticate with PIN. For |
| 275 // example, users who have not set up PIN or users who have not | 283 // example, users who have not set up PIN or users who have not |
| 276 // entered their account recently. Otherwise, the PIN keyboard will | 284 // entered their account recently. Otherwise, the PIN keyboard will |
| 277 // will appear for any user if there is at least one user who has PIN | 285 // will appear for any user if there is at least one user who has PIN |
| 278 // enabled. | 286 // enabled. |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 * @param {string} userID The user ID of the public session | 473 * @param {string} userID The user ID of the public session |
| 466 * @param {string} locale The locale to which this list of keyboard layouts | 474 * @param {string} locale The locale to which this list of keyboard layouts |
| 467 * applies | 475 * applies |
| 468 * @param {!Object} list List of available keyboard layouts | 476 * @param {!Object} list List of available keyboard layouts |
| 469 */ | 477 */ |
| 470 setPublicSessionKeyboardLayouts: function(userID, locale, list) { | 478 setPublicSessionKeyboardLayouts: function(userID, locale, list) { |
| 471 $('pod-row').setPublicSessionKeyboardLayouts(userID, locale, list); | 479 $('pod-row').setPublicSessionKeyboardLayouts(userID, locale, list); |
| 472 } | 480 } |
| 473 }; | 481 }; |
| 474 }); | 482 }); |
| OLD | NEW |