Index: chrome/browser/resources/chromeos/login/user_pod_row.js |
diff --git a/chrome/browser/resources/chromeos/login/user_pod_row.js b/chrome/browser/resources/chromeos/login/user_pod_row.js |
index d84e7e0e2a9ab93c550972d728c8cfd376a0ee3a..7e585f41358bb830a2546e0ca44f9119055817ff 100644 |
--- a/chrome/browser/resources/chromeos/login/user_pod_row.js |
+++ b/chrome/browser/resources/chromeos/login/user_pod_row.js |
@@ -426,6 +426,9 @@ cr.define('login', function() { |
// Activated pod, i.e. the pod of current login attempt. |
activatedPod_: undefined, |
+ // Pod that was most recently focused, if any. |
+ lastFocusedPod_: undefined, |
Nikita (slow)
2012/10/17 14:51:03
You should probably clear that if user is deleted?
Ivan Korotkov
2012/10/17 15:34:10
Done.
|
+ |
// When moving through users quickly at login screen, set a timeout to |
// prevent loading intermediate wallpapers. |
loadWallpaperTimeout_: null, |
@@ -667,16 +670,26 @@ cr.define('login', function() { |
this.loadWallpaper_(); |
} |
this.firstShown_ = false; |
- } else { |
- chrome.send('userDeselected'); |
+ this.lastFocusedPod_ = podToFocus; |
} |
this.insideFocusPod_ = false; |
this.keyboardActivated_ = false; |
}, |
+ /** |
+ * Loads wallpaper for the active user pod, if any. |
+ */ |
loadWallpaper_: function() { |
if (this.focusedPod_) |
- chrome.send('userSelectedDelayed', [this.focusedPod_.user.username]); |
+ chrome.send('loadWallpaper', [this.focusedPod_.user.username]); |
+ }, |
+ |
+ /** |
+ * Resets wallpaper to the last active user's wallpaper, if any. |
+ */ |
+ loadLastWallpaper_: function() { |
+ if (this.lastFocusedPod_) |
+ chrome.send('loadWallpaper', [this.lastFocusedPod_.user.username]); |
}, |
/** |
@@ -722,6 +735,7 @@ cr.define('login', function() { |
this.disabled = false; |
if (this.activatedPod_) |
this.activatedPod_.reset(takeFocus); |
+ this.loadLastWallpaper_(); |
Nikita (slow)
2012/10/17 14:51:03
I suspect that reset might be called multiple time
bshe
2012/10/17 15:13:50
We will not reload the same built in wallpaper. Bu
Ivan Korotkov
2012/10/17 15:34:10
Fixed, now we only call loadLastWallpaper in respo
|
}, |
/** |
@@ -732,6 +746,7 @@ cr.define('login', function() { |
// Clear any error messages that might still be around. |
Oobe.clearErrors(); |
this.disabled = true; |
+ this.lastFocusedPod_ = this.getPodWithUsername_(email); |
Oobe.showSigninUI(email); |
}, |