| OLD | NEW |
| 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 Loading... |
| 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 'showEasyUnlockBubble', | |
| 33 'setPublicSessionDisplayName', | 32 'setPublicSessionDisplayName', |
| 34 'setPublicSessionLocales', | 33 'setPublicSessionLocales', |
| 35 'setPublicSessionKeyboardLayouts', | 34 'setPublicSessionKeyboardLayouts', |
| 36 ], | 35 ], |
| 37 | 36 |
| 38 preferredWidth_: 0, | 37 preferredWidth_: 0, |
| 39 preferredHeight_: 0, | 38 preferredHeight_: 0, |
| 40 | 39 |
| 41 // Whether this screen is shown for the first time. | 40 // Whether this screen is shown for the first time. |
| 42 firstShown_: true, | 41 firstShown_: true, |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 showBannerMessage: function(message) { | 271 showBannerMessage: function(message) { |
| 273 var banner = $('signin-banner'); | 272 var banner = $('signin-banner'); |
| 274 banner.textContent = message; | 273 banner.textContent = message; |
| 275 banner.classList.toggle('message-set', true); | 274 banner.classList.toggle('message-set', true); |
| 276 }, | 275 }, |
| 277 | 276 |
| 278 /** | 277 /** |
| 279 * Shows a custom icon in the user pod of |username|. This function | 278 * Shows a custom icon in the user pod of |username|. This function |
| 280 * is used by the chrome.screenlockPrivate API. | 279 * is used by the chrome.screenlockPrivate API. |
| 281 * @param {string} username Username of pod to add button | 280 * @param {string} username Username of pod to add button |
| 282 * @param {{scale1x: string, scale2x: string}} icon Dictionary of URLs of | 281 * @param {!{resourceUrl: (string | undefined), |
| 283 * the custom icon's representations for 1x and 2x scale factors. | 282 * data: ({scale1x: string, scale2x: string} | undefined), |
| 283 * size: ({width: number, height: number} | undefined), |
| 284 * animation: ({resourceWidth: number, frameLength: number} | |
| 285 * undefined), |
| 286 * opacity: (number | undefined), |
| 287 * tooltip: ({text: string, autoshow: boolean} | undefined)}} icon |
| 288 * The icon parameters. |
| 284 */ | 289 */ |
| 285 showUserPodCustomIcon: function(username, icon) { | 290 showUserPodCustomIcon: function(username, icon) { |
| 286 $('pod-row').showUserPodCustomIcon(username, icon); | 291 $('pod-row').showUserPodCustomIcon(username, icon); |
| 287 }, | 292 }, |
| 288 | 293 |
| 289 /** | 294 /** |
| 290 * Hides the custom icon in the user pod of |username| added by | 295 * Hides the custom icon in the user pod of |username| added by |
| 291 * showUserPodCustomIcon(). This function is used by the | 296 * showUserPodCustomIcon(). This function is used by the |
| 292 * chrome.screenlockPrivate API. | 297 * chrome.screenlockPrivate API. |
| 293 * @param {string} username Username of pod to remove button | 298 * @param {string} username Username of pod to remove button |
| 294 */ | 299 */ |
| 295 hideUserPodCustomIcon: function(username) { | 300 hideUserPodCustomIcon: function(username) { |
| 296 $('pod-row').hideUserPodCustomIcon(username); | 301 $('pod-row').hideUserPodCustomIcon(username); |
| 297 }, | 302 }, |
| 298 | 303 |
| 299 /** | 304 /** |
| 300 * Sets the authentication type used to authenticate the user. | 305 * Sets the authentication type used to authenticate the user. |
| 301 * @param {string} username Username of selected user | 306 * @param {string} username Username of selected user |
| 302 * @param {number} authType Authentication type, must be a valid value in | 307 * @param {number} authType Authentication type, must be a valid value in |
| 303 * the AUTH_TYPE enum in user_pod_row.js. | 308 * the AUTH_TYPE enum in user_pod_row.js. |
| 304 * @param {string} value The initial value to use for authentication. | 309 * @param {string} value The initial value to use for authentication. |
| 305 */ | 310 */ |
| 306 setAuthType: function(username, authType, value) { | 311 setAuthType: function(username, authType, value) { |
| 307 $('pod-row').setAuthType(username, authType, value); | 312 $('pod-row').setAuthType(username, authType, value); |
| 308 }, | 313 }, |
| 309 | 314 |
| 310 /** | 315 /** |
| 311 * Shows a tooltip bubble explaining Easy Unlock. | |
| 312 */ | |
| 313 showEasyUnlockBubble: function() { | |
| 314 $('pod-row').showEasyUnlockBubble(); | |
| 315 }, | |
| 316 | |
| 317 /** | |
| 318 * Updates the display name shown on a public session pod. | 316 * Updates the display name shown on a public session pod. |
| 319 * @param {string} userID The user ID of the public session | 317 * @param {string} userID The user ID of the public session |
| 320 * @param {string} displayName The new display name | 318 * @param {string} displayName The new display name |
| 321 */ | 319 */ |
| 322 setPublicSessionDisplayName: function(userID, displayName) { | 320 setPublicSessionDisplayName: function(userID, displayName) { |
| 323 $('pod-row').setPublicSessionDisplayName(userID, displayName); | 321 $('pod-row').setPublicSessionDisplayName(userID, displayName); |
| 324 }, | 322 }, |
| 325 | 323 |
| 326 /** | 324 /** |
| 327 * Updates the list of locales available for a public session. | 325 * Updates the list of locales available for a public session. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 347 * @param {string} locale The locale to which this list of keyboard layouts | 345 * @param {string} locale The locale to which this list of keyboard layouts |
| 348 * applies | 346 * applies |
| 349 * @param {!Object} list List of available keyboard layouts | 347 * @param {!Object} list List of available keyboard layouts |
| 350 */ | 348 */ |
| 351 setPublicSessionKeyboardLayouts: function(userID, locale, list) { | 349 setPublicSessionKeyboardLayouts: function(userID, locale, list) { |
| 352 $('pod-row').setPublicSessionKeyboardLayouts(userID, locale, list); | 350 $('pod-row').setPublicSessionKeyboardLayouts(userID, locale, list); |
| 353 } | 351 } |
| 354 }; | 352 }; |
| 355 }); | 353 }); |
| 356 | 354 |
| OLD | NEW |