| 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' | |
| 31 ], | 30 ], |
| 32 | 31 |
| 33 /** @override */ | 32 /** @override */ |
| 34 decorate: function() { | 33 decorate: function() { |
| 35 login.PodRow.decorate($('pod-row')); | 34 login.PodRow.decorate($('pod-row')); |
| 36 }, | 35 }, |
| 37 | 36 |
| 38 // Whether this screen is shown for the first time. | 37 // Whether this screen is shown for the first time. |
| 39 firstShown_: true, | 38 firstShown_: true, |
| 40 | 39 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 $('pod-row').classList.toggle('capslock-on', enabled); | 172 $('pod-row').classList.toggle('capslock-on', enabled); |
| 174 }, | 173 }, |
| 175 | 174 |
| 176 /** | 175 /** |
| 177 * Enforces focus on user pod of locked user. | 176 * Enforces focus on user pod of locked user. |
| 178 */ | 177 */ |
| 179 forceLockedUserPodFocus: function() { | 178 forceLockedUserPodFocus: function() { |
| 180 var row = $('pod-row'); | 179 var row = $('pod-row'); |
| 181 if (row.lockedPod) | 180 if (row.lockedPod) |
| 182 row.focusPod(row.lockedPod, true); | 181 row.focusPod(row.lockedPod, true); |
| 183 }, | |
| 184 | |
| 185 /** | |
| 186 * Mark wallpaper loaded | |
| 187 */ | |
| 188 onWallpaperLoaded: function(email) { | |
| 189 $('pod-row').onWallpaperLoaded(email); | |
| 190 } | 182 } |
| 191 }; | 183 }; |
| 192 }); | 184 }); |
| 193 | 185 |
| OLD | NEW |