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 User pod row implementation. | 6 * @fileoverview User pod row implementation. |
7 */ | 7 */ |
8 | 8 |
9 cr.define('login', function() { | 9 cr.define('login', function() { |
10 /** | 10 /** |
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
947 * Resets input UI. | 947 * Resets input UI. |
948 * @param {boolean} takeFocus True to take focus. | 948 * @param {boolean} takeFocus True to take focus. |
949 */ | 949 */ |
950 reset: function(takeFocus) { | 950 reset: function(takeFocus) { |
951 this.disabled = false; | 951 this.disabled = false; |
952 if (this.activatedPod_) | 952 if (this.activatedPod_) |
953 this.activatedPod_.reset(takeFocus); | 953 this.activatedPod_.reset(takeFocus); |
954 }, | 954 }, |
955 | 955 |
956 /** | 956 /** |
| 957 * Clears focused pod password field. |
| 958 */ |
| 959 clearFocusedPod: function() { |
| 960 if (!this.disabled && this.focusedPod_) |
| 961 this.focusedPod_.reset(true); |
| 962 }, |
| 963 |
| 964 /** |
957 * Shows signin UI. | 965 * Shows signin UI. |
958 * @param {string} email Email for signin UI. | 966 * @param {string} email Email for signin UI. |
959 */ | 967 */ |
960 showSigninUI: function(email) { | 968 showSigninUI: function(email) { |
961 // Clear any error messages that might still be around. | 969 // Clear any error messages that might still be around. |
962 Oobe.clearErrors(); | 970 Oobe.clearErrors(); |
963 this.disabled = true; | 971 this.disabled = true; |
964 this.lastFocusedPod_ = this.getPodWithUsername_(email); | 972 this.lastFocusedPod_ = this.getPodWithUsername_(email); |
965 Oobe.showSigninUI(email); | 973 Oobe.showSigninUI(email); |
966 }, | 974 }, |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 this.classList.remove('images-loading'); | 1163 this.classList.remove('images-loading'); |
1156 chrome.send('userImagesLoaded'); | 1164 chrome.send('userImagesLoaded'); |
1157 } | 1165 } |
1158 } | 1166 } |
1159 }; | 1167 }; |
1160 | 1168 |
1161 return { | 1169 return { |
1162 PodRow: PodRow | 1170 PodRow: PodRow |
1163 }; | 1171 }; |
1164 }); | 1172 }); |
OLD | NEW |