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

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

Issue 168813002: Refactor user pods to use authType property for distinct authentication modes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ScreenLockerTest Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
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 606fd190046f8893aadecd88a549da470e05fec2..40e05f219a0f95135ba67ce8c2442c5422377d1f 100644
--- a/chrome/browser/resources/chromeos/login/screen_account_picker.js
+++ b/chrome/browser/resources/chromeos/login/screen_account_picker.js
@@ -27,12 +27,13 @@ login.createScreen('AccountPickerScreen', 'account-picker', function() {
'setApps',
'showAppError',
'updateUserImage',
- 'forceOnlineSignin',
'setCapsLockState',
'forceLockedUserPodFocus',
'removeUser',
'showBannerMessage',
'showUserPodButton',
+ 'hideUserPodButton',
+ 'setAuthType',
],
preferredWidth_: 0,
@@ -226,15 +227,6 @@ login.createScreen('AccountPickerScreen', 'account-picker', function() {
},
/**
- * Indicates that the given user must authenticate against GAIA during the
- * next sign-in.
- * @param {string} username User for whom to enforce GAIA sign-in.
- */
- forceOnlineSignin: function(username) {
- $('pod-row').forceOnlineSigninForUser(username);
- },
-
- /**
* Updates Caps Lock state (for Caps Lock hint in password input field).
* @param {boolean} enabled Whether Caps Lock is on.
*/
@@ -279,6 +271,26 @@ login.createScreen('AccountPickerScreen', 'account-picker', function() {
*/
showUserPodButton: function(username, iconURL) {
$('pod-row').showUserPodButton(username, iconURL);
+ },
+
+ /**
+ * Hides button on the user pod of |username| added by showUserPodButton().
+ * This function is used by the chrome.screenlockPrivate API.
+ * @param {string} username Username of pod to remove button
+ */
+ hideUserPodButton: function(username) {
+ $('pod-row').hideUserPodButton(username);
+ },
+
+ /**
+ * Sets the authentication type used to authenticate the user.
+ * @param {string} username Username of selected user
+ * @param {number} authType Authentication type, must be a valid value in
+ * the AUTH_TYPE enum in user_pod_row.js.
+ * @param {string} value The initial value to use for authentication.
+ */
+ setAuthType: function(username, authType, value) {
+ $('pod-row').setAuthType(username, authType, value);
}
};
});
« no previous file with comments | « chrome/browser/chromeos/login/webui_screen_locker.cc ('k') | chrome/browser/resources/chromeos/login/user_pod_row.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698