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

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

Issue 471973002: Single pod autofocus disabled for touch view mode. Delegate class created for ash interactions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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 11 matching lines...) Expand all
22 'setShouldShowApps', 22 'setShouldShowApps',
23 'showAppError', 23 'showAppError',
24 'updateUserImage', 24 'updateUserImage',
25 'setCapsLockState', 25 'setCapsLockState',
26 'forceLockedUserPodFocus', 26 'forceLockedUserPodFocus',
27 'removeUser', 27 'removeUser',
28 'showBannerMessage', 28 'showBannerMessage',
29 'showUserPodCustomIcon', 29 'showUserPodCustomIcon',
30 'hideUserPodCustomIcon', 30 'hideUserPodCustomIcon',
31 'setAuthType', 31 'setAuthType',
32 'setTouchViewState',
32 'showEasyUnlockBubble', 33 'showEasyUnlockBubble',
33 'setPublicSessionDisplayName', 34 'setPublicSessionDisplayName',
34 'setPublicSessionLocales', 35 'setPublicSessionLocales',
35 'setPublicSessionKeyboardLayouts', 36 'setPublicSessionKeyboardLayouts',
36 ], 37 ],
37 38
38 preferredWidth_: 0, 39 preferredWidth_: 0,
39 preferredHeight_: 0, 40 preferredHeight_: 0,
40 41
41 // Whether this screen is shown for the first time. 42 // Whether this screen is shown for the first time.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 /** 97 /**
97 * Event handler that is invoked just before the frame is shown. 98 * Event handler that is invoked just before the frame is shown.
98 * @param {string} data Screen init payload. 99 * @param {string} data Screen init payload.
99 */ 100 */
100 onBeforeShow: function(data) { 101 onBeforeShow: function(data) {
101 chrome.send('loginUIStateChanged', ['account-picker', true]); 102 chrome.send('loginUIStateChanged', ['account-picker', true]);
102 $('login-header-bar').signinUIState = SIGNIN_UI_STATE.ACCOUNT_PICKER; 103 $('login-header-bar').signinUIState = SIGNIN_UI_STATE.ACCOUNT_PICKER;
103 chrome.send('hideCaptivePortal'); 104 chrome.send('hideCaptivePortal');
104 var podRow = $('pod-row'); 105 var podRow = $('pod-row');
105 podRow.handleBeforeShow(); 106 podRow.handleBeforeShow();
107 if (data !== undefined && data.touchViewEnabled) {
Nikita (slow) 2014/08/14 15:48:00 nit: Drop {}
merkulova 2014/08/14 15:56:02 Done.
108 this.setTouchViewState(data.touchViewEnabled);
109 }
106 110
107 // In case of the preselected pod onShow will be called once pod 111 // In case of the preselected pod onShow will be called once pod
108 // receives focus. 112 // receives focus.
109 if (!podRow.preselectedPod) 113 if (!podRow.preselectedPod)
110 this.onShow(); 114 this.onShow();
111 }, 115 },
112 116
113 /** 117 /**
114 * Event handler invoked when the page is shown and ready. 118 * Event handler invoked when the page is shown and ready.
115 */ 119 */
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 * @param {string} username Username of selected user 305 * @param {string} username Username of selected user
302 * @param {number} authType Authentication type, must be a valid value in 306 * @param {number} authType Authentication type, must be a valid value in
303 * the AUTH_TYPE enum in user_pod_row.js. 307 * the AUTH_TYPE enum in user_pod_row.js.
304 * @param {string} value The initial value to use for authentication. 308 * @param {string} value The initial value to use for authentication.
305 */ 309 */
306 setAuthType: function(username, authType, value) { 310 setAuthType: function(username, authType, value) {
307 $('pod-row').setAuthType(username, authType, value); 311 $('pod-row').setAuthType(username, authType, value);
308 }, 312 },
309 313
310 /** 314 /**
315 * Sets the state of touch view mode.
316 * @param {boolean} isTouchViewEnabled true if the mode is on.
317 */
318 setTouchViewState: function(isTouchViewEnabled) {
319 $('pod-row').setTouchViewState(isTouchViewEnabled);
320 },
321
322 /**
311 * Shows a tooltip bubble explaining Easy Unlock. 323 * Shows a tooltip bubble explaining Easy Unlock.
312 */ 324 */
313 showEasyUnlockBubble: function() { 325 showEasyUnlockBubble: function() {
314 $('pod-row').showEasyUnlockBubble(); 326 $('pod-row').showEasyUnlockBubble();
315 }, 327 },
316 328
317 /** 329 /**
318 * Updates the display name shown on a public session pod. 330 * Updates the display name shown on a public session pod.
319 * @param {string} userID The user ID of the public session 331 * @param {string} userID The user ID of the public session
320 * @param {string} displayName The new display name 332 * @param {string} displayName The new display name
(...skipping 26 matching lines...) Expand all
347 * @param {string} locale The locale to which this list of keyboard layouts 359 * @param {string} locale The locale to which this list of keyboard layouts
348 * applies 360 * applies
349 * @param {!Object} list List of available keyboard layouts 361 * @param {!Object} list List of available keyboard layouts
350 */ 362 */
351 setPublicSessionKeyboardLayouts: function(userID, locale, list) { 363 setPublicSessionKeyboardLayouts: function(userID, locale, list) {
352 $('pod-row').setPublicSessionKeyboardLayouts(userID, locale, list); 364 $('pod-row').setPublicSessionKeyboardLayouts(userID, locale, list);
353 } 365 }
354 }; 366 };
355 }); 367 });
356 368
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698