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

Side by Side Diff: chrome/browser/resources/settings/people_page/lock_screen.js

Issue 2814423002: MD Settings: Users: Focus dialog buttons on close (Closed)
Patch Set: Feedback Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/settings/people_page/lock_screen.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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();
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();
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
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 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/people_page/lock_screen.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698