| 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 2738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2749 | 2749 |
| 2750 // Clear any error messages for previous pod. | 2750 // Clear any error messages for previous pod. |
| 2751 if (!this.isFocused(podToFocus)) | 2751 if (!this.isFocused(podToFocus)) |
| 2752 Oobe.clearErrors(); | 2752 Oobe.clearErrors(); |
| 2753 | 2753 |
| 2754 var hadFocus = !!this.focusedPod_; | 2754 var hadFocus = !!this.focusedPod_; |
| 2755 this.focusedPod_ = podToFocus; | 2755 this.focusedPod_ = podToFocus; |
| 2756 if (podToFocus) { | 2756 if (podToFocus) { |
| 2757 podToFocus.classList.remove('faded'); | 2757 podToFocus.classList.remove('faded'); |
| 2758 podToFocus.classList.add('focused'); | 2758 podToFocus.classList.add('focused'); |
| 2759 if (!podToFocus.multiProfilesPolicyApplied) | 2759 if (podToFocus.multiProfilesPolicyApplied) |
| 2760 podToFocus.reset(true); // Reset and give focus. | |
| 2761 else { | |
| 2762 podToFocus.userTypeBubbleElement.classList.add('bubble-shown'); | 2760 podToFocus.userTypeBubbleElement.classList.add('bubble-shown'); |
| 2763 podToFocus.focus(); | 2761 podToFocus.focus(); |
| 2764 } | |
| 2765 | 2762 |
| 2766 // focusPod() automatically loads wallpaper | 2763 // focusPod() automatically loads wallpaper |
| 2767 if (!podToFocus.user.isApp) | 2764 if (!podToFocus.user.isApp) |
| 2768 chrome.send('focusPod', [podToFocus.user.username]); | 2765 chrome.send('focusPod', [podToFocus.user.username]); |
| 2769 this.firstShown_ = false; | 2766 this.firstShown_ = false; |
| 2770 this.lastFocusedPod_ = podToFocus; | 2767 this.lastFocusedPod_ = podToFocus; |
| 2771 | 2768 |
| 2772 if (Oobe.getInstance().virtualKeyboardShown) | 2769 if (Oobe.getInstance().virtualKeyboardShown) |
| 2773 this.scrollFocusedPodIntoView(); | 2770 this.scrollFocusedPodIntoView(); |
| 2774 } | 2771 } |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3134 if (pod && pod.multiProfilesPolicyApplied) { | 3131 if (pod && pod.multiProfilesPolicyApplied) { |
| 3135 pod.userTypeBubbleElement.classList.remove('bubble-shown'); | 3132 pod.userTypeBubbleElement.classList.remove('bubble-shown'); |
| 3136 } | 3133 } |
| 3137 } | 3134 } |
| 3138 }; | 3135 }; |
| 3139 | 3136 |
| 3140 return { | 3137 return { |
| 3141 PodRow: PodRow | 3138 PodRow: PodRow |
| 3142 }; | 3139 }; |
| 3143 }); | 3140 }); |
| OLD | NEW |