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

Side by Side Diff: chrome/browser/resources/login/screen_account_picker.js

Issue 289013002: cros: Clean up screenlockPrivate plumbing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 14 matching lines...) Expand all
25 'loadUsers', 25 'loadUsers',
26 'runAppForTesting', 26 'runAppForTesting',
27 'setApps', 27 'setApps',
28 'setShouldShowApps', 28 'setShouldShowApps',
29 'showAppError', 29 'showAppError',
30 'updateUserImage', 30 'updateUserImage',
31 'setCapsLockState', 31 'setCapsLockState',
32 'forceLockedUserPodFocus', 32 'forceLockedUserPodFocus',
33 'removeUser', 33 'removeUser',
34 'showBannerMessage', 34 'showBannerMessage',
35 'showUserPodButton', 35 'showUserPodCustomIcon',
36 'hideUserPodButton', 36 'hideUserPodCustomIcon',
37 'setAuthType', 37 'setAuthType',
38 'showEasyUnlockBubble', 38 'showEasyUnlockBubble',
39 ], 39 ],
40 40
41 preferredWidth_: 0, 41 preferredWidth_: 0,
42 preferredHeight_: 0, 42 preferredHeight_: 0,
43 43
44 // Whether this screen is shown for the first time. 44 // Whether this screen is shown for the first time.
45 firstShown_: true, 45 firstShown_: true,
46 46
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 * by the chrome.screenlockPrivate.showMessage API. 267 * by the chrome.screenlockPrivate.showMessage API.
268 * @param {string} message Text to be displayed 268 * @param {string} message Text to be displayed
269 */ 269 */
270 showBannerMessage: function(message) { 270 showBannerMessage: function(message) {
271 var banner = $('signin-banner'); 271 var banner = $('signin-banner');
272 banner.textContent = message; 272 banner.textContent = message;
273 banner.classList.toggle('message-set', true); 273 banner.classList.toggle('message-set', true);
274 }, 274 },
275 275
276 /** 276 /**
277 * Shows a button with an icon on the user pod of |username|. This function 277 * Shows a custom icon in the user pod of |username|. This function
278 * is used by the chrome.screenlockPrivate API. 278 * is used by the chrome.screenlockPrivate API.
279 * @param {string} username Username of pod to add button 279 * @param {string} username Username of pod to add button
280 * @param {string} iconURL URL of the button icon 280 * @param {string} iconURL URL of the button icon
281 */ 281 */
282 showUserPodButton: function(username, iconURL) { 282 showUserPodCustomIcon: function(username, iconURL) {
283 $('pod-row').showUserPodButton(username, iconURL); 283 $('pod-row').showUserPodCustomIcon(username, iconURL);
284 }, 284 },
285 285
286 /** 286 /**
287 * Hides button on the user pod of |username| added by showUserPodButton(). 287 * Hides the custom icon in the user pod of |username| added by
288 * This function is used by the chrome.screenlockPrivate API. 288 * showUserPodCustomIcon(). This function is used by the
289 * chrome.screenlockPrivate API.
289 * @param {string} username Username of pod to remove button 290 * @param {string} username Username of pod to remove button
290 */ 291 */
291 hideUserPodButton: function(username) { 292 hideUserPodCustomIcon: function(username) {
292 $('pod-row').hideUserPodButton(username); 293 $('pod-row').hideUserPodCustomIcon(username);
293 }, 294 },
294 295
295 /** 296 /**
296 * Sets the authentication type used to authenticate the user. 297 * Sets the authentication type used to authenticate the user.
297 * @param {string} username Username of selected user 298 * @param {string} username Username of selected user
298 * @param {number} authType Authentication type, must be a valid value in 299 * @param {number} authType Authentication type, must be a valid value in
299 * the AUTH_TYPE enum in user_pod_row.js. 300 * the AUTH_TYPE enum in user_pod_row.js.
300 * @param {string} value The initial value to use for authentication. 301 * @param {string} value The initial value to use for authentication.
301 */ 302 */
302 setAuthType: function(username, authType, value) { 303 setAuthType: function(username, authType, value) {
303 $('pod-row').setAuthType(username, authType, value); 304 $('pod-row').setAuthType(username, authType, value);
304 }, 305 },
305 306
306 /** 307 /**
307 * Shows a tooltip bubble explaining Easy Unlock. 308 * Shows a tooltip bubble explaining Easy Unlock.
308 */ 309 */
309 showEasyUnlockBubble: function() { 310 showEasyUnlockBubble: function() {
310 $('pod-row').showEasyUnlockBubble(); 311 $('pod-row').showEasyUnlockBubble();
311 } 312 }
312 }; 313 };
313 }); 314 });
314 315
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698