Chromium Code Reviews| 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 200 if (this.shouldAskForPassword_(settings.getCurrentRoute())) { | 200 if (this.shouldAskForPassword_(settings.getCurrentRoute())) { |
| 201 this.$.setupPin.close(); | 201 this.$.setupPin.close(); |
| 202 this.$.passwordPrompt.open(); | 202 this.$.passwordPrompt.open(); |
| 203 } | 203 } |
| 204 }, | 204 }, |
| 205 | 205 |
| 206 /** @private */ | 206 /** @private */ |
| 207 onPasswordClosed_: function() { | 207 onPasswordClosed_: function() { |
| 208 if (!this.setModes_) | 208 if (!this.setModes_) |
| 209 settings.navigateTo(settings.Route.PEOPLE); | 209 settings.navigateTo(settings.Route.PEOPLE); |
| 210 else | |
| 211 this.$$('#unlockType').focus(); | |
|
dpapad
2017/04/13 17:56:32
Nit (optional): The new ID seems redundant, since
stevenjb
2017/04/13 18:02:10
For now... This page may grow over time. *shrug*
| |
| 210 }, | 212 }, |
| 211 | 213 |
| 212 /** @private */ | 214 /** @private */ |
| 213 onPinSetupDone_: function() { | 215 onPinSetupDone_: function() { |
| 214 this.$.setupPin.close(); | 216 this.$.setupPin.close(); |
| 215 }, | 217 }, |
| 216 | 218 |
| 219 /** @private */ | |
| 220 onSetupPinClosed_: function() { | |
| 221 this.$$('#setupPinLink').focus(); | |
|
dpapad
2017/04/13 17:56:32
Nit (optional): Same here, $$('link[is=action-link
stevenjb
2017/04/13 18:02:10
Ditto.
| |
| 222 }, | |
| 223 | |
| 217 /** | 224 /** |
| 218 * Returns true if the setup pin section should be shown. | 225 * Returns true if the setup pin section should be shown. |
| 219 * @param {!string} selectedUnlockType The current unlock type. Used to let | 226 * @param {!string} selectedUnlockType The current unlock type. Used to let |
| 220 * Polymer know about the dependency. | 227 * Polymer know about the dependency. |
| 221 * @private | 228 * @private |
| 222 */ | 229 */ |
| 223 showConfigurePinButton_: function(selectedUnlockType) { | 230 showConfigurePinButton_: function(selectedUnlockType) { |
| 224 return selectedUnlockType === LockScreenUnlockType.PIN_PASSWORD; | 231 return selectedUnlockType === LockScreenUnlockType.PIN_PASSWORD; |
| 225 }, | 232 }, |
| 226 | 233 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 313 /** | 320 /** |
| 314 * @param {boolean} easyUnlockEnabled | 321 * @param {boolean} easyUnlockEnabled |
| 315 * @param {boolean} proximityDetectionAllowed | 322 * @param {boolean} proximityDetectionAllowed |
| 316 * @private | 323 * @private |
| 317 */ | 324 */ |
| 318 getShowEasyUnlockToggle_: function( | 325 getShowEasyUnlockToggle_: function( |
| 319 easyUnlockEnabled, proximityDetectionAllowed) { | 326 easyUnlockEnabled, proximityDetectionAllowed) { |
| 320 return easyUnlockEnabled && proximityDetectionAllowed; | 327 return easyUnlockEnabled && proximityDetectionAllowed; |
| 321 }, | 328 }, |
| 322 }); | 329 }); |
| OLD | NEW |