OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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('cert_viewer', function() { | 5 cr.define('cert_viewer', function() { |
6 'use strict'; | 6 'use strict'; |
7 | 7 |
8 /** | 8 /** |
9 * Initialize the certificate viewer dialog by wiring up the close button, | 9 * Initialize the certificate viewer dialog by wiring up the close button, |
10 * substituting in translated strings and requesting certificate details. | 10 * substituting in translated strings and requesting certificate details. |
11 */ | 11 */ |
12 function initialize() { | 12 function initialize() { |
13 $('close').onclick = function() { | |
14 window.close(); | |
15 } | |
16 $('export').onclick = exportCertificate; | 13 $('export').onclick = exportCertificate; |
17 cr.ui.decorate('tabbox', cr.ui.TabBox); | 14 cr.ui.decorate('tabbox', cr.ui.TabBox); |
18 | 15 |
19 initializeTree($('hierarchy'), showCertificateFields); | 16 initializeTree($('hierarchy'), showCertificateFields); |
20 initializeTree($('cert-fields'), showCertificateFieldValue); | 17 initializeTree($('cert-fields'), showCertificateFieldValue); |
21 | 18 |
22 i18nTemplate.process(document, templateData); | 19 i18nTemplate.process(document, templateData); |
23 stripGtkAccessorKeys(); | 20 stripGtkAccessorKeys(); |
24 chrome.send('requestCertificateInfo'); | 21 chrome.send('requestCertificateInfo'); |
25 } | 22 } |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 } | 167 } |
171 | 168 |
172 return { | 169 return { |
173 initialize: initialize, | 170 initialize: initialize, |
174 getCertificateInfo: getCertificateInfo, | 171 getCertificateInfo: getCertificateInfo, |
175 getCertificateFields: getCertificateFields, | 172 getCertificateFields: getCertificateFields, |
176 }; | 173 }; |
177 }); | 174 }); |
178 | 175 |
179 document.addEventListener('DOMContentLoaded', cert_viewer.initialize); | 176 document.addEventListener('DOMContentLoaded', cert_viewer.initialize); |
OLD | NEW |