OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 2752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2763 | 2763 |
2764 // Clear any error messages for previous pod. | 2764 // Clear any error messages for previous pod. |
2765 if (!this.isFocused(podToFocus)) | 2765 if (!this.isFocused(podToFocus)) |
2766 Oobe.clearErrors(); | 2766 Oobe.clearErrors(); |
2767 | 2767 |
2768 var hadFocus = !!this.focusedPod_; | 2768 var hadFocus = !!this.focusedPod_; |
2769 this.focusedPod_ = podToFocus; | 2769 this.focusedPod_ = podToFocus; |
2770 if (podToFocus) { | 2770 if (podToFocus) { |
2771 podToFocus.classList.remove('faded'); | 2771 podToFocus.classList.remove('faded'); |
2772 podToFocus.classList.add('focused'); | 2772 podToFocus.classList.add('focused'); |
2773 if (podToFocus.multiProfilesPolicyApplied) | 2773 if (!podToFocus.multiProfilesPolicyApplied) { |
| 2774 podToFocus.classList.toggle('signing-in', false); |
| 2775 podToFocus.focusInput(); |
| 2776 } else { |
2774 podToFocus.userTypeBubbleElement.classList.add('bubble-shown'); | 2777 podToFocus.userTypeBubbleElement.classList.add('bubble-shown'); |
2775 podToFocus.focus(); | 2778 podToFocus.focus(); |
| 2779 } |
2776 | 2780 |
2777 // focusPod() automatically loads wallpaper | 2781 // focusPod() automatically loads wallpaper |
2778 if (!podToFocus.user.isApp) | 2782 if (!podToFocus.user.isApp) |
2779 chrome.send('focusPod', [podToFocus.user.username]); | 2783 chrome.send('focusPod', [podToFocus.user.username]); |
2780 this.firstShown_ = false; | 2784 this.firstShown_ = false; |
2781 this.lastFocusedPod_ = podToFocus; | 2785 this.lastFocusedPod_ = podToFocus; |
2782 | 2786 |
2783 if (Oobe.getInstance().virtualKeyboardShown) | 2787 if (Oobe.getInstance().virtualKeyboardShown) |
2784 this.scrollFocusedPodIntoView(); | 2788 this.scrollFocusedPodIntoView(); |
2785 } | 2789 } |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3145 if (pod && pod.multiProfilesPolicyApplied) { | 3149 if (pod && pod.multiProfilesPolicyApplied) { |
3146 pod.userTypeBubbleElement.classList.remove('bubble-shown'); | 3150 pod.userTypeBubbleElement.classList.remove('bubble-shown'); |
3147 } | 3151 } |
3148 } | 3152 } |
3149 }; | 3153 }; |
3150 | 3154 |
3151 return { | 3155 return { |
3152 PodRow: PodRow | 3156 PodRow: PodRow |
3153 }; | 3157 }; |
3154 }); | 3158 }); |
OLD | NEW |