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 3326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3337 // is false, it doesn't focus on the password input box by default. | 3337 // is false, it doesn't focus on the password input box by default. |
3338 podToFocus.focus(); | 3338 podToFocus.focus(); |
3339 } | 3339 } |
3340 | 3340 |
3341 // focusPod() automatically loads wallpaper | 3341 // focusPod() automatically loads wallpaper |
3342 if (!podToFocus.user.isApp) | 3342 if (!podToFocus.user.isApp) |
3343 chrome.send('focusPod', [podToFocus.user.username]); | 3343 chrome.send('focusPod', [podToFocus.user.username]); |
3344 this.firstShown_ = false; | 3344 this.firstShown_ = false; |
3345 this.lastFocusedPod_ = podToFocus; | 3345 this.lastFocusedPod_ = podToFocus; |
3346 this.scrollFocusedPodIntoView(); | 3346 this.scrollFocusedPodIntoView(); |
| 3347 } else { |
| 3348 chrome.send('noPodFocused'); |
3347 } | 3349 } |
3348 this.insideFocusPod_ = false; | 3350 this.insideFocusPod_ = false; |
3349 }, | 3351 }, |
3350 | 3352 |
3351 /** | 3353 /** |
3352 * Resets wallpaper to the last active user's wallpaper, if any. | 3354 * Resets wallpaper to the last active user's wallpaper, if any. |
3353 */ | 3355 */ |
3354 loadLastWallpaper: function() { | 3356 loadLastWallpaper: function() { |
3355 if (this.lastFocusedPod_ && !this.lastFocusedPod_.user.isApp) | 3357 if (this.lastFocusedPod_ && !this.lastFocusedPod_.user.isApp) |
3356 chrome.send('loadWallpaper', [this.lastFocusedPod_.user.username]); | 3358 chrome.send('loadWallpaper', [this.lastFocusedPod_.user.username]); |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3726 if (pod && pod.multiProfilesPolicyApplied) { | 3728 if (pod && pod.multiProfilesPolicyApplied) { |
3727 pod.userTypeBubbleElement.classList.remove('bubble-shown'); | 3729 pod.userTypeBubbleElement.classList.remove('bubble-shown'); |
3728 } | 3730 } |
3729 } | 3731 } |
3730 }; | 3732 }; |
3731 | 3733 |
3732 return { | 3734 return { |
3733 PodRow: PodRow | 3735 PodRow: PodRow |
3734 }; | 3736 }; |
3735 }); | 3737 }); |
OLD | NEW |