OLD | NEW |
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 */ var OptionsPage = options.OptionsPage; | 6 /** @const */ var 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 'certificateRestoreOverlay'); | 15 'certificateRestoreOverlay'); |
16 } | 16 } |
17 | 17 |
18 cr.addSingletonGetter(CertificateRestoreOverlay); | 18 cr.addSingletonGetter(CertificateRestoreOverlay); |
19 | 19 |
20 CertificateRestoreOverlay.prototype = { | 20 CertificateRestoreOverlay.prototype = { |
21 __proto__: OptionsPage.prototype, | 21 __proto__: OptionsPage.prototype, |
22 | 22 |
23 /** | 23 /** @override */ |
24 * Initializes the page. | |
25 */ | |
26 initializePage: function() { | 24 initializePage: function() { |
27 OptionsPage.prototype.initializePage.call(this); | 25 OptionsPage.prototype.initializePage.call(this); |
28 | 26 |
29 var self = this; | 27 var self = this; |
30 $('certificateRestoreCancelButton').onclick = function(event) { | 28 $('certificateRestoreCancelButton').onclick = function(event) { |
31 self.cancelRestore_(); | 29 self.cancelRestore_(); |
32 }; | 30 }; |
33 $('certificateRestoreOkButton').onclick = function(event) { | 31 $('certificateRestoreOkButton').onclick = function(event) { |
34 self.finishRestore_(); | 32 self.finishRestore_(); |
35 }; | 33 }; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 CertificateRestoreOverlay.dismiss = function() { | 90 CertificateRestoreOverlay.dismiss = function() { |
93 CertificateRestoreOverlay.getInstance().dismissOverlay_(); | 91 CertificateRestoreOverlay.getInstance().dismissOverlay_(); |
94 }; | 92 }; |
95 | 93 |
96 // Export | 94 // Export |
97 return { | 95 return { |
98 CertificateRestoreOverlay: CertificateRestoreOverlay | 96 CertificateRestoreOverlay: CertificateRestoreOverlay |
99 }; | 97 }; |
100 | 98 |
101 }); | 99 }); |
OLD | NEW |