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

Side by Side Diff: chrome/browser/resources/settings/certificate_manager_page/certificate_password_decryption_dialog.js

Issue 2792663002: MD Settings: Restore focus after closing dialogs, for certificate page. (Closed)
Patch Set: Add better explanation for |anchor| parameter in openDialog_ 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 A dialog prompting the user for a decryption password such that 6 * @fileoverview A dialog prompting the user for a decryption password such that
7 * a previously exported personal certificate can be imported. 7 * a previously exported personal certificate can be imported.
8 */ 8 */
9 Polymer({ 9 Polymer({
10 is: 'settings-certificate-password-decryption-dialog', 10 is: 'settings-certificate-password-decryption-dialog',
(...skipping 27 matching lines...) Expand all
38 /** @private */ 38 /** @private */
39 onOkTap_: function() { 39 onOkTap_: function() {
40 this.browserProxy_.importPersonalCertificatePasswordSelected( 40 this.browserProxy_.importPersonalCertificatePasswordSelected(
41 this.password_).then( 41 this.password_).then(
42 function() { 42 function() {
43 /** @type {!CrDialogElement} */ (this.$.dialog).close(); 43 /** @type {!CrDialogElement} */ (this.$.dialog).close();
44 }.bind(this), 44 }.bind(this),
45 /** @param {!CertificatesError} error */ 45 /** @param {!CertificatesError} error */
46 function(error) { 46 function(error) {
47 /** @type {!CrDialogElement} */ (this.$.dialog).close(); 47 /** @type {!CrDialogElement} */ (this.$.dialog).close();
48 this.fire('certificates-error', error); 48 this.fire('certificates-error', {error: error, anchor: null});
49 }.bind(this)); 49 }.bind(this));
50 }, 50 },
51 51
52 /** 52 /**
53 * @param {!KeyboardEvent} e 53 * @param {!KeyboardEvent} e
54 * @private 54 * @private
55 */ 55 */
56 onKeypress_: function(e) { 56 onKeypress_: function(e) {
57 if (e.key == 'Enter' && !this.$.ok.disabled) 57 if (e.key == 'Enter' && !this.$.ok.disabled)
58 this.onOkTap_(); 58 this.onOkTap_();
59 }, 59 },
60 }); 60 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698