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

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

Issue 2822733002: md settings: Small changes to lock screen. (Closed)
Patch Set: 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
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 * 7 *
8 * 'settings-password-prompt-dialog' shows a dialog which asks for the user to 8 * 'settings-password-prompt-dialog' shows a dialog which asks for the user to
9 * enter their password. It validates the password is correct. Once the user has 9 * enter their password. It validates the password is correct. Once the user has
10 * entered their account password, the page fires an 'authenticated' event and 10 * entered their account password, the page fires an 'authenticated' event and
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 if (!dialog.isConnected) { 103 if (!dialog.isConnected) {
104 setTimeout(this.open.bind(this)); 104 setTimeout(this.open.bind(this));
105 return; 105 return;
106 } 106 }
107 107
108 if (this.$.dialog.open) 108 if (this.$.dialog.open)
109 return; 109 return;
110 110
111 this.writeUma_(LockScreenProgress.START_SCREEN_LOCK); 111 this.writeUma_(LockScreenProgress.START_SCREEN_LOCK);
112 this.$.dialog.showModal(); 112 this.$.dialog.showModal();
113 this.async(function() {
114 this.$.passwordInput.shadowRoot.querySelector('#input').focus();
sammiequon 2017/04/14 17:22:07 This is kind of messy but the JS guide doesn't all
stevenjb 2017/04/14 21:47:20 If this.$.passwordInput.focus() doesn't work that
stevenjb 2017/04/14 21:51:30 Oh, actually, I think your problem may be that thi
sammiequon 2017/04/14 22:11:43 That doesn't seem to work, it has the same behavio
stevenjb 2017/04/14 22:29:02 Hmm, I think we need to investigate that then. Que
sammiequon 2017/04/14 23:48:13 Acknowledged. Let me see if I can find a better ap
115 }.bind(this));
113 }, 116 },
114 117
115 /** @private */ 118 /** @private */
116 onCancelTap_: function() { 119 onCancelTap_: function() {
117 if (this.$.dialog.open) 120 if (this.$.dialog.open)
118 this.$.dialog.close(); 121 this.$.dialog.close();
119 }, 122 },
120 123
121 /** 124 /**
122 * Called whenever the dialog is closed. 125 * Called whenever the dialog is closed.
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 this.quickUnlockPrivate_.getActiveModes(function(modes) { 201 this.quickUnlockPrivate_.getActiveModes(function(modes) {
199 var credentials = 202 var credentials =
200 /** @type {!Array<string>} */ (Array(modes.length).fill('')); 203 /** @type {!Array<string>} */ (Array(modes.length).fill(''));
201 this.quickUnlockPrivate_.setModes( 204 this.quickUnlockPrivate_.setModes(
202 this.password_, modes, credentials, onCheck); 205 this.password_, modes, credentials, onCheck);
203 }.bind(this)); 206 }.bind(this));
204 } 207 }
205 }); 208 });
206 209
207 })(); 210 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698