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

Side by Side Diff: chrome/browser/resources/options2/certificate_restore_overlay.js

Issue 9379033: Settings: Focus the password field of the cert restore dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style nit. Created 8 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 cr.define('options', function() { 5 cr.define('options', function() {
6 const OptionsPage = options.OptionsPage; 6 const OptionsPage = options.OptionsPage;
7 7
8 /** 8 /**
9 * CertificateRestoreOverlay class 9 * CertificateRestoreOverlay class
10 * Encapsulated handling of the 'enter restore password' overlay page. 10 * Encapsulated handling of the 'enter restore password' overlay page.
11 * @class 11 * @class
12 */ 12 */
13 function CertificateRestoreOverlay() { 13 function CertificateRestoreOverlay() {
14 OptionsPage.call(this, 'certificateRestore', 14 OptionsPage.call(this, 'certificateRestore', '',
15 '',
16 'certificateRestoreOverlay'); 15 'certificateRestoreOverlay');
17 } 16 }
18 17
19 cr.addSingletonGetter(CertificateRestoreOverlay); 18 cr.addSingletonGetter(CertificateRestoreOverlay);
20 19
21 CertificateRestoreOverlay.prototype = { 20 CertificateRestoreOverlay.prototype = {
22 __proto__: OptionsPage.prototype, 21 __proto__: OptionsPage.prototype,
23 22
24 /** 23 /**
25 * Initializes the page. 24 * Initializes the page.
26 */ 25 */
27 initializePage: function() { 26 initializePage: function() {
28 OptionsPage.prototype.initializePage.call(this); 27 OptionsPage.prototype.initializePage.call(this);
29 28
30 var self = this; 29 var self = this;
31 $('certificateRestoreCancelButton').onclick = function(event) { 30 $('certificateRestoreCancelButton').onclick = function(event) {
32 self.cancelRestore_(); 31 self.cancelRestore_();
33 }; 32 };
34 $('certificateRestoreOkButton').onclick = function(event) { 33 $('certificateRestoreOkButton').onclick = function(event) {
35 self.finishRestore_(); 34 self.finishRestore_();
36 }; 35 };
37 36
38 self.clearInputFields_(); 37 self.clearInputFields_();
39 }, 38 },
40 39
40 /** @inheritDoc */
41 didShowPage: function() {
42 $('certificateRestorePassword').focus();
43 },
44
41 /** 45 /**
42 * Clears any uncommitted input, and dismisses the overlay. 46 * Clears any uncommitted input, and dismisses the overlay.
43 * @private 47 * @private
44 */ 48 */
45 dismissOverlay_: function() { 49 dismissOverlay_: function() {
46 this.clearInputFields_(); 50 this.clearInputFields_();
47 OptionsPage.closeOverlay(); 51 OptionsPage.closeOverlay();
48 }, 52 },
49 53
50 /** 54 /**
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 CertificateRestoreOverlay.dismiss = function() { 92 CertificateRestoreOverlay.dismiss = function() {
89 CertificateRestoreOverlay.getInstance().dismissOverlay_(); 93 CertificateRestoreOverlay.getInstance().dismissOverlay_();
90 }; 94 };
91 95
92 // Export 96 // Export
93 return { 97 return {
94 CertificateRestoreOverlay: CertificateRestoreOverlay 98 CertificateRestoreOverlay: CertificateRestoreOverlay
95 }; 99 };
96 100
97 }); 101 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698