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

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

Issue 8468004: [cros] Fix 'Add user' button on WebUI lock screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Focus initially given to the signed-in user pod. Created 9 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/login/screen_account_picker.js
diff --git a/chrome/browser/resources/chromeos/login/screen_account_picker.js b/chrome/browser/resources/chromeos/login/screen_account_picker.js
index 7c85f8f7d13cd5b30c2f4479c30b23ee93f223ce..a59724082ce65677d66bceefb14a71ec870145ab 100644
--- a/chrome/browser/resources/chromeos/login/screen_account_picker.js
+++ b/chrome/browser/resources/chromeos/login/screen_account_picker.js
@@ -39,8 +39,17 @@ cr.define('login', function() {
* @param data {string} Screen init payload.
*/
onBeforeShow: function(data) {
- $('add-user-header-bar-item').hidden = false;
- $('pod-row').handleShow();
+ var podRow = $('pod-row');
+ podRow.handleShow();
+
+ // If this is showing for the lock screen display the sign out button,
+ // hide the add user button and activate the locked user's pod.
+ var lockedPod = podRow.lockedPod;
+ $('add-user-header-bar-item').hidden = !!lockedPod;
+ $('sign-out-user-item').hidden = !lockedPod;
+ if (lockedPod)
+ podRow.focusPod(lockedPod);
+
if (this.firstShown_) {
this.firstShown_ = false;
// TODO(nkostylev): Enable animation back when session start jank
@@ -70,14 +79,6 @@ cr.define('login', function() {
*/
AccountPickerScreen.loadUsers = function(users, animated) {
$('pod-row').loadPods(users, animated);
-
- // If this is showing for the lock screen display the sign out button, hide
- // the add user button and activate the locked user's pod.
- var lockedPod = $('pod-row').lockedPod;
- $('add-user-header-bar-item').hidden = !!lockedPod;
- $('sign-out-user-item').hidden = !lockedPod;
- if (lockedPod)
- lockedPod.activate();
};
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698