OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview | 6 * @fileoverview |
7 * 'settings-lock-screen' allows the user to change how they unlock their | 7 * 'settings-lock-screen' allows the user to change how they unlock their |
8 * device. | 8 * device. |
9 * | 9 * |
10 * Example: | 10 * Example: |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 * @private | 49 * @private |
50 */ | 50 */ |
51 writeUma_: { | 51 writeUma_: { |
52 type: Object, | 52 type: Object, |
53 value: function() { | 53 value: function() { |
54 return settings.recordLockScreenProgress; | 54 return settings.recordLockScreenProgress; |
55 }, | 55 }, |
56 }, | 56 }, |
57 | 57 |
58 /** | 58 /** |
59 * True if pin unlock settings should be displayed on this machine. | 59 * True if quick unlock settings should be displayed on this machine. |
60 * @private | 60 * @private |
61 */ | 61 */ |
62 pinUnlockEnabled_: { | 62 quickUnlockEnabled_: { |
63 type: Boolean, | 63 type: Boolean, |
64 value: function() { | 64 value: function() { |
65 return loadTimeData.getBoolean('pinUnlockEnabled'); | 65 return loadTimeData.getBoolean('quickUnlockEnabled'); |
66 }, | 66 }, |
67 readOnly: true, | 67 readOnly: true, |
68 }, | 68 }, |
69 | 69 |
70 /** | 70 /** |
71 * True if fingerprint unlock settings should be displayed on this machine. | 71 * True if fingerprint unlock settings should be displayed on this machine. |
72 * @private | 72 * @private |
73 */ | 73 */ |
74 fingerprintUnlockEnabled_: { | 74 fingerprintUnlockEnabled_: { |
75 type: Boolean, | 75 type: Boolean, |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 /** | 224 /** |
225 * Returns true if the setup pin section should be shown. | 225 * Returns true if the setup pin section should be shown. |
226 * @param {!string} selectedUnlockType The current unlock type. Used to let | 226 * @param {!string} selectedUnlockType The current unlock type. Used to let |
227 * Polymer know about the dependency. | 227 * Polymer know about the dependency. |
228 * @private | 228 * @private |
229 */ | 229 */ |
230 showConfigurePinButton_: function(selectedUnlockType) { | 230 showConfigurePinButton_: function(selectedUnlockType) { |
231 return selectedUnlockType === LockScreenUnlockType.PIN_PASSWORD; | 231 return selectedUnlockType === LockScreenUnlockType.PIN_PASSWORD; |
232 }, | 232 }, |
233 | 233 |
234 /** @private */ | 234 /** |
235 getSetupPinText_: function() { | 235 * @param {boolean} hasPin |
236 if (this.hasPin) | 236 * @private |
| 237 */ |
| 238 getSetupPinText_: function(hasPin) { |
| 239 if (hasPin) |
237 return this.i18n('lockScreenChangePinButton'); | 240 return this.i18n('lockScreenChangePinButton'); |
238 return this.i18n('lockScreenSetupPinButton'); | 241 return this.i18n('lockScreenSetupPinButton'); |
239 }, | 242 }, |
240 | 243 |
241 /** @private */ | 244 /** @private */ |
242 getDescriptionText_: function() { | 245 getDescriptionText_: function() { |
243 if (this.numFingerprints_ > 0) { | 246 if (this.numFingerprints_ > 0) { |
244 return this.i18n('lockScreenNumberFingerprints', | 247 return this.i18n('lockScreenNumberFingerprints', |
245 this.numFingerprints_.toString()); | 248 this.numFingerprints_.toString()); |
246 } | 249 } |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 /** | 323 /** |
321 * @param {boolean} easyUnlockEnabled | 324 * @param {boolean} easyUnlockEnabled |
322 * @param {boolean} proximityDetectionAllowed | 325 * @param {boolean} proximityDetectionAllowed |
323 * @private | 326 * @private |
324 */ | 327 */ |
325 getShowEasyUnlockToggle_: function( | 328 getShowEasyUnlockToggle_: function( |
326 easyUnlockEnabled, proximityDetectionAllowed) { | 329 easyUnlockEnabled, proximityDetectionAllowed) { |
327 return easyUnlockEnabled && proximityDetectionAllowed; | 330 return easyUnlockEnabled && proximityDetectionAllowed; |
328 }, | 331 }, |
329 }); | 332 }); |
OLD | NEW |