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

Unified Diff: ui/login/account_picker/user_pod_row.js

Issue 1933913002: Add a very basic PIN UI implementation that is shared between lock and settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Address comments Created 4 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 side-by-side diff with in-line comments
Download patch
Index: ui/login/account_picker/user_pod_row.js
diff --git a/ui/login/account_picker/user_pod_row.js b/ui/login/account_picker/user_pod_row.js
index 26bd8cadee24f51e8c299a79ea56b206269c52dc..95413d4a6fe6b720dbab768a27810883b2b1bd90 100644
--- a/ui/login/account_picker/user_pod_row.js
+++ b/ui/login/account_picker/user_pod_row.js
@@ -732,6 +732,10 @@ cr.define('login', function() {
'keydown',
this.handleRemoveUserConfirmationKeyDown_.bind(this));
+ var pinKeyboard = document.getElementById('pin-keyboard');
+ pinKeyboard.addEventListener('submit',
+ this.handlePinSubmitted_.bind(this));
+
var customIcon = this.customIconElement;
customIcon.parentNode.replaceChild(new UserPodCustomIcon(), customIcon);
},
@@ -765,6 +769,16 @@ cr.define('login', function() {
},
/**
+ * Handles the user hitting 'submit' on the PIN keyboard.
+ * @param {Event} e Submit event object.
+ * @private
+ */
+ handlePinSubmitted_: function(e) {
+ var pin = e.detail.pin;
+ chrome.send('authenticateUserWithPin', [this.user.username, pin]);
+ },
+
+ /**
* Handles keypress event (i.e. any textual input) on password input.
* @param {Event} e Keypress Event object.
* @private

Powered by Google App Engine
This is Rietveld 408576698