Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2318)

Unified Diff: chrome/browser/resources/chromeos/login/user_pod_row.js

Issue 11190022: [cros] Update wallpaper when displaying Gaia frame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
},
« no previous file with comments | « chrome/browser/chromeos/login/webui_login_display.cc ('k') | chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698