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

Unified Diff: chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js

Issue 2841313002: md settings: Update lock screen to match new mocks. (Closed)
Patch Set: Rebased. Created 3 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: 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 0c82fd2e3e8b33f13a90cf620987cef466a820a6..d3740c76c39c4fdc94efc0eeaef7bc46903561c7 100644
--- a/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js
+++ b/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js
@@ -62,7 +62,7 @@ Polymer({
*/
enablePassword: {
type: Boolean,
- value: false
+ value: false,
},
/**
@@ -73,19 +73,10 @@ Polymer({
*/
passwordElement: {
type: Object,
- value: function() { return this.$$('#pin-input'); },
- observer: 'onPasswordElementAttached_'
- },
-
- /**
- * The value stored in the keyboard's input element.
- * @private
- */
- value: {
- type: String,
- notify: true,
- value: '',
- observer: 'onPinValueChange_'
+ value: function() {
+ return this.$.pinInput.inputElement;
+ },
+ observer: 'onPasswordElementAttached_',
},
/**
@@ -94,7 +85,7 @@ Polymer({
*/
repeatBackspaceIntervalId_: {
type: Number,
- value: 0
+ value: 0,
},
/**
@@ -103,8 +94,28 @@ Polymer({
*/
startAutoBackspaceId_: {
type: Number,
- value: 0
- }
+ value: 0,
+ },
+
+ /**
+ * Whether or not to show the default pin input.
+ * @private
+ */
+ showPinInput_: {
+ type: Boolean,
+ value: false,
+ },
+
+ /**
+ * The value stored in the keyboard's input element.
+ * @private
+ */
+ value: {
+ type: String,
+ notify: true,
+ value: '',
+ observer: 'onPinValueChange_',
+ },
},
/**
@@ -113,8 +124,7 @@ Polymer({
* @private
*/
onPasswordElementAttached_: function(inputElement) {
- if (inputElement != this.$$('#pin-input'))
- this.$$('#pin-input').hidden = true;
+ this.showPinInput_ = inputElement == this.$.pinInput.inputElement;
inputElement.addEventListener('input',
this.handleInputChanged_.bind(this));
},

Powered by Google App Engine
This is Rietveld 408576698