Chromium Code Reviews| Index: chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js |
| diff --git a/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js b/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js |
| index de93c08df1b17741ac5612be76bb7a37cf141619..607e3423760af60d0548a963e8df8d880f597591 100644 |
| --- a/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js |
| +++ b/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js |
| @@ -48,6 +48,27 @@ Polymer({ |
| } |
| }, |
| + /** |
| + * Gets the container holding the password field. |
| + * @type {!HTMLInputElement} |
| + */ |
| + get inputElement() { |
| + return this.$$('#pin-input'); |
| + }, |
| + |
| + /** |
| + * Gets the submit button. |
| + * @type {!HTMLElement} |
| + */ |
| + get submitButton() { |
| + return this.$$('.submit-button'); |
| + }, |
| + |
| + /** Clears the current input. */ |
| + clear: function() { |
| + this.value = ''; |
| + }, |
| + |
| /** Transfers focus to the input element. */ |
| focus: function() { |
| this.$$('#pin-input').focus(); |
| @@ -59,11 +80,6 @@ Polymer({ |
| this.value += numberValue; |
| }, |
| - /** Fires a submit event with the current PIN value. */ |
| - firePinSubmitEvent_: function() { |
| - this.fire('submit', { pin: this.value }); |
| - }, |
| - |
| /** |
| * Fires an update event with the current PIN value. The event will only be |
|
jdufault
2016/07/11 22:35:08
The settings UI integration still listens for the
sammiequon
2016/07/11 23:13:23
Done.
|
| * fired if the PIN value has actually changed. |
| @@ -90,13 +106,6 @@ Polymer({ |
| event.preventDefault(); |
| return; |
| } |
| - |
| - // Enter pressed. |
| - if (event.keyCode == 13) { |
| - this.firePinSubmitEvent_(); |
| - event.preventDefault(); |
| - return; |
| - } |
| }, |
| /** |