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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 $('pod-row').classList.toggle('capslock-on', enabled); | 182 $('pod-row').classList.toggle('capslock-on', enabled); |
182 }, | 183 }, |
183 | 184 |
184 /** | 185 /** |
185 * Enforces focus on user pod of locked user. | 186 * Enforces focus on user pod of locked user. |
186 */ | 187 */ |
187 forceLockedUserPodFocus: function() { | 188 forceLockedUserPodFocus: function() { |
188 var row = $('pod-row'); | 189 var row = $('pod-row'); |
189 if (row.lockedPod) | 190 if (row.lockedPod) |
190 row.focusPod(row.lockedPod, true); | 191 row.focusPod(row.lockedPod, true); |
| 192 }, |
| 193 |
| 194 /** |
| 195 * Mark wallpaper loaded |
| 196 */ |
| 197 onWallpaperLoaded: function(username) { |
| 198 $('pod-row').onWallpaperLoaded(username); |
191 } | 199 } |
192 }; | 200 }; |
193 }); | 201 }); |
194 | 202 |
OLD | NEW |