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

Side by Side Diff: ui/login/account_picker/screen_account_picker.js

Issue 488563002: Desktop user manager focuses correct pod on load. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Do not focus first pod by default. Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/login/OWNERS ('k') | ui/login/account_picker/user_pod_row.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 Account picker screen implementation. 6 * @fileoverview Account picker screen implementation.
7 */ 7 */
8 8
9 login.createScreen('AccountPickerScreen', 'account-picker', function() { 9 login.createScreen('AccountPickerScreen', 'account-picker', function() {
10 /** 10 /**
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 }, 170 },
171 171
172 /** 172 /**
173 * Loads given users in pod row. 173 * Loads given users in pod row.
174 * @param {array} users Array of user. 174 * @param {array} users Array of user.
175 * @param {boolean} showGuest Whether to show guest session button. 175 * @param {boolean} showGuest Whether to show guest session button.
176 */ 176 */
177 loadUsers: function(users, showGuest) { 177 loadUsers: function(users, showGuest) {
178 $('pod-row').loadPods(users); 178 $('pod-row').loadPods(users);
179 $('login-header-bar').showGuestButton = showGuest; 179 $('login-header-bar').showGuestButton = showGuest;
180
181 // The desktop User Manager can send the index of a pod that should be
182 // initially focused.
183 var hash = window.location.hash;
184 if (hash) {
185 var podIndex = hash.substr(1);
186 if (podIndex)
187 $('pod-row').focusPodByIndex(podIndex, false);
188 }
189 }, 180 },
190 181
191 /** 182 /**
192 * Runs app with a given id from the list of loaded apps. 183 * Runs app with a given id from the list of loaded apps.
193 * @param {!string} app_id of an app to run. 184 * @param {!string} app_id of an app to run.
194 * @param {boolean=} opt_diagnostic_mode Whether to run the app in 185 * @param {boolean=} opt_diagnostic_mode Whether to run the app in
195 * diagnostic mode. Default is false. 186 * diagnostic mode. Default is false.
196 */ 187 */
197 runAppForTesting: function(app_id, opt_diagnostic_mode) { 188 runAppForTesting: function(app_id, opt_diagnostic_mode) {
198 $('pod-row').findAndRunAppForTesting(app_id, opt_diagnostic_mode); 189 $('pod-row').findAndRunAppForTesting(app_id, opt_diagnostic_mode);
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 * @param {string} locale The locale to which this list of keyboard layouts 336 * @param {string} locale The locale to which this list of keyboard layouts
346 * applies 337 * applies
347 * @param {!Object} list List of available keyboard layouts 338 * @param {!Object} list List of available keyboard layouts
348 */ 339 */
349 setPublicSessionKeyboardLayouts: function(userID, locale, list) { 340 setPublicSessionKeyboardLayouts: function(userID, locale, list) {
350 $('pod-row').setPublicSessionKeyboardLayouts(userID, locale, list); 341 $('pod-row').setPublicSessionKeyboardLayouts(userID, locale, list);
351 } 342 }
352 }; 343 };
353 }); 344 });
354 345
OLDNEW
« no previous file with comments | « ui/login/OWNERS ('k') | ui/login/account_picker/user_pod_row.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698