OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 cr.define('login', function() { | 9 cr.define('login', function() { |
10 /** | 10 /** |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // If this is showing for the lock screen display the sign out button, hide | 74 // If this is showing for the lock screen display the sign out button, hide |
75 // the add user button and activate the locked user's pod. | 75 // the add user button and activate the locked user's pod. |
76 var lockedPod = $('pod-row').lockedPod; | 76 var lockedPod = $('pod-row').lockedPod; |
77 $('add-user-header-bar-item').hidden = !!lockedPod; | 77 $('add-user-header-bar-item').hidden = !!lockedPod; |
78 $('sign-out-user-item').hidden = !lockedPod; | 78 $('sign-out-user-item').hidden = !lockedPod; |
79 if (lockedPod) | 79 if (lockedPod) |
80 lockedPod.activate(); | 80 lockedPod.activate(); |
81 }; | 81 }; |
82 | 82 |
83 /** | 83 /** |
| 84 * Updates current image of a user. |
| 85 * @param {string} email Email of the user for which to update the image. |
| 86 * @public |
| 87 */ |
| 88 AccountPickerScreen.updateUserImage = function(email) { |
| 89 console.log('updateUserImage ' + email); |
| 90 $('pod-row').updateUserImage(email); |
| 91 }; |
| 92 |
| 93 /** |
84 * Updates Caps Lock state (for Caps Lock hint in password input field). | 94 * Updates Caps Lock state (for Caps Lock hint in password input field). |
85 * @param {boolean} enabled Whether Caps Lock is on. | 95 * @param {boolean} enabled Whether Caps Lock is on. |
86 * @public | 96 * @public |
87 */ | 97 */ |
88 AccountPickerScreen.setCapsLockState = function(enabled) { | 98 AccountPickerScreen.setCapsLockState = function(enabled) { |
89 $('pod-row').classList[enabled ? 'add' : 'remove']('capslock-on'); | 99 $('pod-row').classList[enabled ? 'add' : 'remove']('capslock-on'); |
90 }; | 100 }; |
91 | 101 |
92 return { | 102 return { |
93 AccountPickerScreen: AccountPickerScreen | 103 AccountPickerScreen: AccountPickerScreen |
94 }; | 104 }; |
95 }); | 105 }); |
OLD | NEW |