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 Page = cr.ui.pageManager.Page; | 6 /** @const */ var Page = cr.ui.pageManager.Page; |
7 /** @const */ var PageManager = cr.ui.pageManager.PageManager; | 7 /** @const */ var PageManager = cr.ui.pageManager.PageManager; |
8 | 8 |
9 /** | 9 /** |
10 * CertificateEditCaTrustOverlay class | 10 * CertificateEditCaTrustOverlay class |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 $('certificateEditCaTrustDescription').textContent = | 125 $('certificateEditCaTrustDescription').textContent = |
126 loadTimeData.getStringF('certificateEditCaTrustDescriptionFormat', | 126 loadTimeData.getStringF('certificateEditCaTrustDescriptionFormat', |
127 certName); | 127 certName); |
128 self.enableInputs_(false); | 128 self.enableInputs_(false); |
129 PageManager.showPageByName('certificateEditCaTrustOverlay'); | 129 PageManager.showPageByName('certificateEditCaTrustOverlay'); |
130 chrome.send('getCaCertificateTrust', [certId]); | 130 chrome.send('getCaCertificateTrust', [certId]); |
131 }; | 131 }; |
132 | 132 |
133 /** | 133 /** |
134 * Show the Import CA overlay. | 134 * Show the Import CA overlay. |
135 * @param {string} certId The id of the certificate to be passed to the | |
136 * certificate manager model. | |
137 * @param {string} certName The display name of the certificate. | 135 * @param {string} certName The display name of the certificate. |
138 * checkbox. | 136 * checkbox. |
139 */ | 137 */ |
140 CertificateEditCaTrustOverlay.showImport = function(certName) { | 138 CertificateEditCaTrustOverlay.showImport = function(certName) { |
141 var self = CertificateEditCaTrustOverlay.getInstance(); | 139 var self = CertificateEditCaTrustOverlay.getInstance(); |
142 // TODO(mattm): do we want a view certificate button here like firefox has? | 140 // TODO(mattm): do we want a view certificate button here like firefox has? |
143 $('certificateEditCaTrustCancelButton').onclick = function(event) { | 141 $('certificateEditCaTrustCancelButton').onclick = function(event) { |
144 self.cancelImport_(); | 142 self.cancelImport_(); |
145 }; | 143 }; |
146 $('certificateEditCaTrustOkButton').onclick = function(event) { | 144 $('certificateEditCaTrustOkButton').onclick = function(event) { |
147 self.finishImport_(); | 145 self.finishImport_(); |
148 }; | 146 }; |
149 $('certificateEditCaTrustDescription').textContent = | 147 $('certificateEditCaTrustDescription').textContent = |
150 loadTimeData.getStringF('certificateImportCaDescriptionFormat', | 148 loadTimeData.getStringF('certificateImportCaDescriptionFormat', |
151 certName); | 149 certName); |
152 CertificateEditCaTrustOverlay.populateTrust(false, false, false); | 150 CertificateEditCaTrustOverlay.populateTrust(false, false, false); |
153 PageManager.showPageByName('certificateEditCaTrustOverlay'); | 151 PageManager.showPageByName('certificateEditCaTrustOverlay'); |
154 }; | 152 }; |
155 | 153 |
156 CertificateEditCaTrustOverlay.dismiss = function() { | 154 CertificateEditCaTrustOverlay.dismiss = function() { |
157 CertificateEditCaTrustOverlay.getInstance().dismissOverlay_(); | 155 CertificateEditCaTrustOverlay.getInstance().dismissOverlay_(); |
158 }; | 156 }; |
159 | 157 |
160 // Export | 158 // Export |
161 return { | 159 return { |
162 CertificateEditCaTrustOverlay: CertificateEditCaTrustOverlay | 160 CertificateEditCaTrustOverlay: CertificateEditCaTrustOverlay |
163 }; | 161 }; |
164 }); | 162 }); |
OLD | NEW |