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 54846ba3961c0d4cd01abaf0046312a21d1fa9b8..dddc25459f85a8a2cb3fb71a4a865d6f43a0e5a3 100644 |
| --- a/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js |
| +++ b/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js |
| @@ -39,6 +39,14 @@ Polymer({ |
| value: false |
| }, |
| + /** |
| + * Whether or not the keyboard's submit button should be shown. |
| + */ |
| + enableSubmitButton: { |
| + type: Boolean, |
| + value: false |
| + }, |
| + |
| /** The value stored in the keyboard's input element. */ |
| value: { |
| type: String, |
| @@ -121,6 +129,7 @@ Polymer({ |
| /** |
| * Changes the color of the submit button if PIN is ready. |
| * @param {string} value |
| + * @private |
| */ |
| computeSubmitClass_: function(value) { |
| return value.length > 0 ? 'ready-background' : ''; |
| @@ -129,6 +138,7 @@ Polymer({ |
| /** |
| * Computes whether the input type for the pin input should be password or |
| * numerical. |
| + * @param {bool} enablePassword |
|
jdufault
2016/07/29 19:12:13
boolean for all of these
sammiequon
2016/07/29 19:44:49
Done.
|
| * @private |
| */ |
| computeInputType_: function(enablePassword) { |
| @@ -137,6 +147,7 @@ Polymer({ |
| /** |
| * Computes the value of the pin input placeholder. |
| + * @param {bool} enablePassword |
| * @private |
| */ |
| computeInputPlaceholder_: function(enablePassword) { |
| @@ -146,6 +157,7 @@ Polymer({ |
| /** |
| * Computes the direction of the pin input. |
| + * @param {string} password |
| * @private |
| */ |
| computeInputClass_: function(password) { |
| @@ -159,5 +171,14 @@ Polymer({ |
| // (just numbers), if the document direction is rtl. |
| var enableRtl = (document.dir == 'rtl') && !Number.isInteger(+password); |
| return enableRtl ? 'input-non-pin' : ''; |
| + }, |
| + |
| + /** |
| + * Computes if the submit button is visible. |
| + * @param {bool} submitEnabled |
| + * @private |
| + */ |
| + computeSubmitHiddenClass_: function(submitEnabled) { |
| + return submitEnabled ? '' : 'submit-button-hidden'; |
| } |
| }); |