| 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 var OptionsPage = options.OptionsPage; | 6 var OptionsPage = options.OptionsPage; |
| 7 | 7 |
| 8 ///////////////////////////////////////////////////////////////////////////// | 8 ///////////////////////////////////////////////////////////////////////////// |
| 9 // CertificateManagerTab class: | 9 // CertificateManagerTab class: |
| 10 | 10 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 this.exportButton.onclick = function(e) { | 88 this.exportButton.onclick = function(e) { |
| 89 var selected = tree.selectedItem; | 89 var selected = tree.selectedItem; |
| 90 chrome.send('exportCertificate', [selected.data.id]); | 90 chrome.send('exportCertificate', [selected.data.id]); |
| 91 } | 91 } |
| 92 } | 92 } |
| 93 | 93 |
| 94 this.deleteButton = $(id + '-delete'); | 94 this.deleteButton = $(id + '-delete'); |
| 95 this.deleteButton.onclick = function(e) { | 95 this.deleteButton.onclick = function(e) { |
| 96 var data = tree.selectedItem.data; | 96 var data = tree.selectedItem.data; |
| 97 AlertOverlay.show( | 97 AlertOverlay.show( |
| 98 localStrings.getStringF(id + 'DeleteConfirm', data.name), | 98 loadTimeData.getStringF(id + 'DeleteConfirm', data.name), |
| 99 localStrings.getString(id + 'DeleteImpact'), | 99 loadTimeData.getString(id + 'DeleteImpact'), |
| 100 localStrings.getString('ok'), | 100 loadTimeData.getString('ok'), |
| 101 localStrings.getString('cancel'), | 101 loadTimeData.getString('cancel'), |
| 102 function() { | 102 function() { |
| 103 tree.selectedItem = null; | 103 tree.selectedItem = null; |
| 104 chrome.send('deleteCertificate', [data.id]); | 104 chrome.send('deleteCertificate', [data.id]); |
| 105 }); | 105 }); |
| 106 } | 106 } |
| 107 } | 107 } |
| 108 | 108 |
| 109 CertificateManagerTab.prototype = { | 109 CertificateManagerTab.prototype = { |
| 110 | 110 |
| 111 /** | 111 /** |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 166 |
| 167 ///////////////////////////////////////////////////////////////////////////// | 167 ///////////////////////////////////////////////////////////////////////////// |
| 168 // CertificateManager class: | 168 // CertificateManager class: |
| 169 | 169 |
| 170 /** | 170 /** |
| 171 * Encapsulated handling of ChromeOS accounts options page. | 171 * Encapsulated handling of ChromeOS accounts options page. |
| 172 * @constructor | 172 * @constructor |
| 173 */ | 173 */ |
| 174 function CertificateManager(model) { | 174 function CertificateManager(model) { |
| 175 OptionsPage.call(this, 'certificates', | 175 OptionsPage.call(this, 'certificates', |
| 176 templateData.certificateManagerPageTabTitle, | 176 loadTimeData.getString('certificateManagerPageTabTitle'), |
| 177 'certificateManagerPage'); | 177 'certificateManagerPage'); |
| 178 } | 178 } |
| 179 | 179 |
| 180 cr.addSingletonGetter(CertificateManager); | 180 cr.addSingletonGetter(CertificateManager); |
| 181 | 181 |
| 182 CertificateManager.prototype = { | 182 CertificateManager.prototype = { |
| 183 __proto__: OptionsPage.prototype, | 183 __proto__: OptionsPage.prototype, |
| 184 | 184 |
| 185 initializePage: function() { | 185 initializePage: function() { |
| 186 OptionsPage.prototype.initializePage.call(this); | 186 OptionsPage.prototype.initializePage.call(this); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 tpmPollingTimer = window.setTimeout(checkTpmToken, 5000); | 245 tpmPollingTimer = window.setTimeout(checkTpmToken, 5000); |
| 246 } | 246 } |
| 247 }; | 247 }; |
| 248 | 248 |
| 249 // Export | 249 // Export |
| 250 return { | 250 return { |
| 251 CertificateManagerTab: CertificateManagerTab, | 251 CertificateManagerTab: CertificateManagerTab, |
| 252 CertificateManager: CertificateManager | 252 CertificateManager: CertificateManager |
| 253 }; | 253 }; |
| 254 }); | 254 }); |
| OLD | NEW |