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

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: Review fixes 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..570b5059240d2d048167a75eb93bd108ce24bd50 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,
+
// When moving through users quickly at login screen, set a timeout to
// prevent loading intermediate wallpapers.
loadWallpaperTimeout_: null,
@@ -596,6 +599,7 @@ cr.define('login', function() {
this.innerHTML = '';
this.focusedPod_ = undefined;
this.activatedPod_ = undefined;
+ this.lastFocusedPod_ = undefined;
// Populate the pod row.
for (var i = 0; i < users.length; ++i) {
@@ -667,16 +671,27 @@ 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.
+ * @private
+ */
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]);
},
/**
@@ -732,6 +747,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/resources/chromeos/login/header_bar.js ('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