| 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 2566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2577 }, | 2577 }, |
| 2578 | 2578 |
| 2579 /** | 2579 /** |
| 2580 * Called when window was resized. | 2580 * Called when window was resized. |
| 2581 */ | 2581 */ |
| 2582 onWindowResize: function() { | 2582 onWindowResize: function() { |
| 2583 var layout = this.calculateLayout_(); | 2583 var layout = this.calculateLayout_(); |
| 2584 if (layout.columns != this.columns || layout.rows != this.rows) | 2584 if (layout.columns != this.columns || layout.rows != this.rows) |
| 2585 this.placePods_(); | 2585 this.placePods_(); |
| 2586 | 2586 |
| 2587 if (Oobe.getInstance().virtualKeyboardShown) | 2587 this.scrollFocusedPodIntoView(); |
| 2588 this.scrollFocusedPodIntoView(); | |
| 2589 }, | 2588 }, |
| 2590 | 2589 |
| 2591 /** | 2590 /** |
| 2592 * Returns width of podrow having |columns| number of columns. | 2591 * Returns width of podrow having |columns| number of columns. |
| 2593 * @private | 2592 * @private |
| 2594 */ | 2593 */ |
| 2595 columnsToWidth_: function(columns) { | 2594 columnsToWidth_: function(columns) { |
| 2596 var isDesktopUserManager = Oobe.getInstance().displayType == | 2595 var isDesktopUserManager = Oobe.getInstance().displayType == |
| 2597 DISPLAY_TYPE.DESKTOP_USER_MANAGER; | 2596 DISPLAY_TYPE.DESKTOP_USER_MANAGER; |
| 2598 var margin = isDesktopUserManager ? DESKTOP_MARGIN_BY_COLUMNS[columns] : | 2597 var margin = isDesktopUserManager ? DESKTOP_MARGIN_BY_COLUMNS[columns] : |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2776 } else { | 2775 } else { |
| 2777 podToFocus.userTypeBubbleElement.classList.add('bubble-shown'); | 2776 podToFocus.userTypeBubbleElement.classList.add('bubble-shown'); |
| 2778 podToFocus.focus(); | 2777 podToFocus.focus(); |
| 2779 } | 2778 } |
| 2780 | 2779 |
| 2781 // focusPod() automatically loads wallpaper | 2780 // focusPod() automatically loads wallpaper |
| 2782 if (!podToFocus.user.isApp) | 2781 if (!podToFocus.user.isApp) |
| 2783 chrome.send('focusPod', [podToFocus.user.username]); | 2782 chrome.send('focusPod', [podToFocus.user.username]); |
| 2784 this.firstShown_ = false; | 2783 this.firstShown_ = false; |
| 2785 this.lastFocusedPod_ = podToFocus; | 2784 this.lastFocusedPod_ = podToFocus; |
| 2786 | 2785 this.scrollFocusedPodIntoView(); |
| 2787 if (Oobe.getInstance().virtualKeyboardShown) | |
| 2788 this.scrollFocusedPodIntoView(); | |
| 2789 } | 2786 } |
| 2790 this.insideFocusPod_ = false; | 2787 this.insideFocusPod_ = false; |
| 2791 this.keyboardActivated_ = false; | 2788 this.keyboardActivated_ = false; |
| 2792 }, | 2789 }, |
| 2793 | 2790 |
| 2794 /** | 2791 /** |
| 2795 * Resets wallpaper to the last active user's wallpaper, if any. | 2792 * Resets wallpaper to the last active user's wallpaper, if any. |
| 2796 */ | 2793 */ |
| 2797 loadLastWallpaper: function() { | 2794 loadLastWallpaper: function() { |
| 2798 if (this.lastFocusedPod_ && !this.lastFocusedPod_.user.isApp) | 2795 if (this.lastFocusedPod_ && !this.lastFocusedPod_.user.isApp) |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3149 if (pod && pod.multiProfilesPolicyApplied) { | 3146 if (pod && pod.multiProfilesPolicyApplied) { |
| 3150 pod.userTypeBubbleElement.classList.remove('bubble-shown'); | 3147 pod.userTypeBubbleElement.classList.remove('bubble-shown'); |
| 3151 } | 3148 } |
| 3152 } | 3149 } |
| 3153 }; | 3150 }; |
| 3154 | 3151 |
| 3155 return { | 3152 return { |
| 3156 PodRow: PodRow | 3153 PodRow: PodRow |
| 3157 }; | 3154 }; |
| 3158 }); | 3155 }); |
| OLD | NEW |