| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 /** |
| 11 * Maximum number of offline login failures before online login. | 11 * Maximum number of offline login failures before online login. |
| 12 * @type {number} | 12 * @type {number} |
| 13 * @const | 13 * @const |
| 14 */ | 14 */ |
| 15 var MAX_LOGIN_ATTEMPTS_IN_POD = 3; | 15 var MAX_LOGIN_ATTEMPTS_IN_POD = 3; |
| 16 /** | 16 /** |
| 17 * Whether to preselect the first pod automatically on login screen. | 17 * Whether to preselect the first pod automatically on login screen. |
| 18 * @type {boolean} | 18 * @type {boolean} |
| 19 * @const | 19 * @const |
| 20 */ | 20 */ |
| 21 var PRESELECT_FIRST_POD = true; | 21 var PRESELECT_FIRST_POD = true; |
| 22 | 22 |
| 23 return { | 23 return { |
| 24 EXTERNAL_API: [ | 24 EXTERNAL_API: [ |
| 25 'loadUsers', | 25 'loadUsers', |
| 26 'updateUserImage', | 26 'updateUserImage', |
| 27 'updateUserGaiaNeeded', | 27 'updateUserGaiaNeeded', |
| 28 'setCapsLockState', | 28 'setCapsLockState', |
| 29 'forceLockedUserPodFocus' | 29 'forceLockedUserPodFocus', |
| 30 'onWallpaperLoaded' |
| 30 ], | 31 ], |
| 31 | 32 |
| 32 /** @override */ | 33 /** @override */ |
| 33 decorate: function() { | 34 decorate: function() { |
| 34 login.PodRow.decorate($('pod-row')); | 35 login.PodRow.decorate($('pod-row')); |
| 35 }, | 36 }, |
| 36 | 37 |
| 37 // Whether this screen is shown for the first time. | 38 // Whether this screen is shown for the first time. |
| 38 firstShown_: true, | 39 firstShown_: true, |
| 39 | 40 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 $('pod-row').classList.toggle('capslock-on', enabled); | 173 $('pod-row').classList.toggle('capslock-on', enabled); |
| 173 }, | 174 }, |
| 174 | 175 |
| 175 /** | 176 /** |
| 176 * Enforces focus on user pod of locked user. | 177 * Enforces focus on user pod of locked user. |
| 177 */ | 178 */ |
| 178 forceLockedUserPodFocus: function() { | 179 forceLockedUserPodFocus: function() { |
| 179 var row = $('pod-row'); | 180 var row = $('pod-row'); |
| 180 if (row.lockedPod) | 181 if (row.lockedPod) |
| 181 row.focusPod(row.lockedPod, true); | 182 row.focusPod(row.lockedPod, true); |
| 183 }, |
| 184 |
| 185 /** |
| 186 * Mark wallpaper loaded |
| 187 */ |
| 188 onWallpaperLoaded: function(email) { |
| 189 $('pod-row').onWallpaperLoaded(email); |
| 182 } | 190 } |
| 183 }; | 191 }; |
| 184 }); | 192 }); |
| 185 | 193 |
| OLD | NEW |