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 var Page = cr.ui.pageManager.Page; | 7 var Page = cr.ui.pageManager.Page; |
8 var PageManager = cr.ui.pageManager.PageManager; | 8 var PageManager = cr.ui.pageManager.PageManager; |
9 | 9 |
10 ///////////////////////////////////////////////////////////////////////////// | 10 ///////////////////////////////////////////////////////////////////////////// |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 /** | 214 /** |
215 * Handler for Page's visible property change event. | 215 * Handler for Page's visible property change event. |
216 * @private | 216 * @private |
217 * @param {Event} e Property change event. | 217 * @param {Event} e Property change event. |
218 */ | 218 */ |
219 handleVisibleChange_: function(e) { | 219 handleVisibleChange_: function(e) { |
220 if (!this.initalized_ && this.visible) { | 220 if (!this.initalized_ && this.visible) { |
221 this.initalized_ = true; | 221 this.initalized_ = true; |
222 OptionsPage.showTab($('personal-certs-nav-tab')); | 222 OptionsPage.showTab($('personal-certs-nav-tab')); |
223 chrome.send('populateCertificateManager'); | 223 chrome.send('populateCertificateManager'); |
| 224 if (this.hash && this.hash.search('user-cert:') == 1) { |
| 225 chrome.send('importPersonalCertificate', |
| 226 [false, decodeURIComponent(this.hash.slice(11))]); |
| 227 } |
224 } | 228 } |
225 } | 229 } |
226 }; | 230 }; |
227 | 231 |
228 // CertificateManagerHandler callbacks. | 232 // CertificateManagerHandler callbacks. |
229 CertificateManager.onPopulateTree = function(args) { | 233 CertificateManager.onPopulateTree = function(args) { |
230 $(args[0]).populate(args[1]); | 234 $(args[0]).populate(args[1]); |
231 }; | 235 }; |
232 | 236 |
233 CertificateManager.exportPersonalAskPassword = function(args) { | 237 CertificateManager.exportPersonalAskPassword = function(args) { |
(...skipping 14 matching lines...) Expand all Loading... |
248 $('serverCertsTab-import').disabled = false; | 252 $('serverCertsTab-import').disabled = false; |
249 $('caCertsTab-import').disabled = false; | 253 $('caCertsTab-import').disabled = false; |
250 }; | 254 }; |
251 | 255 |
252 // Export | 256 // Export |
253 return { | 257 return { |
254 CertificateManagerTab: CertificateManagerTab, | 258 CertificateManagerTab: CertificateManagerTab, |
255 CertificateManager: CertificateManager | 259 CertificateManager: CertificateManager |
256 }; | 260 }; |
257 }); | 261 }); |
OLD | NEW |