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

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

Issue 2027683003: Pin keyboard moved to under the user profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Made transition smoother. Created 4 years, 6 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 97d3d0de6bc17e8f01ce9f4c1ada72494a3923d6..2646272a9f3e891d3dd3b83ae8c2f9cb66d4860d 100644
--- a/ui/login/account_picker/user_pod_row.js
+++ b/ui/login/account_picker/user_pod_row.js
@@ -732,13 +732,6 @@ cr.define('login', function() {
'keydown',
this.handleRemoveUserConfirmationKeyDown_.bind(this));
- var pinKeyboard = $('pin-keyboard');
- // The pin keyboard is not present on the md user manager.
- if (pinKeyboard) {
- pinKeyboard.addEventListener('submit',
- this.handlePinSubmitted_.bind(this));
- }
-
var customIcon = this.customIconElement;
customIcon.parentNode.replaceChild(new UserPodCustomIcon(), customIcon);
},
@@ -752,6 +745,11 @@ cr.define('login', function() {
this.passwordElement.addEventListener('keypress',
this.handlePasswordKeyPress_.bind(this));
+ if(this.pinKeyboard) {
jdufault 2016/06/14 22:50:33 nit: if (
sammiequon 2016/06/15 21:56:59 Done.
+ this.pinKeyboard.addEventListener('submit',
+ this.handlePinSubmitted_.bind(this));
jdufault 2016/06/14 22:50:34 nit: 4 space indent
sammiequon 2016/06/15 21:56:59 Done.
+ }
+
this.imageElement.addEventListener('load',
this.parentNode.handlePodImageLoad.bind(this.parentNode, this));
@@ -760,6 +758,13 @@ cr.define('login', function() {
this.setAuthType(initialAuthType, null);
this.userClickAuthAllowed_ = false;
+
+// var pinkeyboard = $('pin-keyboard');
+// // the pin keyboard is not present on the md user manager.
jdufault 2016/06/14 22:50:33 Remove this code
+// if (pinkeyboard) {
+// pinkeyboard.addeventlistener('submit',
+// this.handlepinsubmitted_.bind(this));
+// }
},
/**
@@ -778,7 +783,7 @@ cr.define('login', function() {
*/
handlePinSubmitted_: function(e) {
var pin = e.detail.pin;
- chrome.send('authenticateUserWithPin', [this.user.username, pin]);
+ chrome.send('authenticateUser', [this.user.username, pin]);
jdufault 2016/06/14 22:50:34 Revert this change.
},
/**
@@ -883,6 +888,14 @@ cr.define('login', function() {
},
/**
+ * Gets the pin-keyboard of the pod.
+ * @type {!HTMLElement}
+ */
+ get pinKeyboard() {
+ return this.querySelector('pin-keyboard');
+ },
+
+ /**
* Gets user online sign in hint element.
* @type {!HTMLDivElement}
*/

Powered by Google App Engine
This is Rietveld 408576698