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('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 cr.ui.decorate('tabbox', cr.ui.TabBox); | 13 cr.ui.decorate('tabbox', cr.ui.TabBox); |
14 | 14 |
15 i18nTemplate.process(document, templateData); | |
Dan Beam
2013/01/03 04:55:23
did it matter than the process happen before other
Evan Stade
2013/01/03 05:31:23
don't think so, the page still seems to work.
| |
16 | |
17 var args = JSON.parse(chrome.getVariableValue('dialogArguments')); | 15 var args = JSON.parse(chrome.getVariableValue('dialogArguments')); |
18 getCertificateInfo(args); | 16 getCertificateInfo(args); |
19 | 17 |
20 /** | 18 /** |
21 * Initialize the second tab's contents. | 19 * Initialize the second tab's contents. |
22 * This is a 'oneShot' function, meaning it will only be invoked once, | 20 * This is a 'oneShot' function, meaning it will only be invoked once, |
23 * no matter how many times it is called. This is done for unit-testing | 21 * no matter how many times it is called. This is done for unit-testing |
24 * purposes in case a test needs to initialize the tab before the timer | 22 * purposes in case a test needs to initialize the tab before the timer |
25 * fires. | 23 * fires. |
26 */ | 24 */ |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
204 chrome.send('exportCertificate', [item.detail.payload.index]); | 202 chrome.send('exportCertificate', [item.detail.payload.index]); |
205 } | 203 } |
206 | 204 |
207 return { | 205 return { |
208 initialize: initialize, | 206 initialize: initialize, |
209 getCertificateFields: getCertificateFields, | 207 getCertificateFields: getCertificateFields, |
210 }; | 208 }; |
211 }); | 209 }); |
212 | 210 |
213 document.addEventListener('DOMContentLoaded', cert_viewer.initialize); | 211 document.addEventListener('DOMContentLoaded', cert_viewer.initialize); |
OLD | NEW |