| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 * @param {!Event} e The change event object. | 135 * @param {!Event} e The change event object. |
| 136 */ | 136 */ |
| 137 handleCertificatesTreeChange_: function(e) { | 137 handleCertificatesTreeChange_: function(e) { |
| 138 var data = null; | 138 var data = null; |
| 139 if (this.tree.selectedItem) { | 139 if (this.tree.selectedItem) { |
| 140 data = this.tree.selectedItem.data; | 140 data = this.tree.selectedItem.data; |
| 141 } | 141 } |
| 142 | 142 |
| 143 this.updateButtonState(data); | 143 this.updateButtonState(data); |
| 144 }, | 144 }, |
| 145 | 145 }; |
| 146 } | |
| 147 | 146 |
| 148 // TODO(xiyuan): Use notification from backend instead of polling. | 147 // TODO(xiyuan): Use notification from backend instead of polling. |
| 149 // TPM token check polling timer. | 148 // TPM token check polling timer. |
| 150 var tpmPollingTimer; | 149 var tpmPollingTimer; |
| 151 | 150 |
| 152 // Initiate tpm token check if needed. | 151 // Initiate tpm token check if needed. |
| 153 function checkTpmToken() { | 152 function checkTpmToken() { |
| 154 var importAndBindButton = $('personalCertsTab-import-and-bind'); | 153 var importAndBindButton = $('personalCertsTab-import-and-bind'); |
| 155 | 154 |
| 156 if (importAndBindButton && importAndBindButton.disabled) | 155 if (importAndBindButton && importAndBindButton.disabled) |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 tpmPollingTimer = window.setTimeout(checkTpmToken, 5000); | 245 tpmPollingTimer = window.setTimeout(checkTpmToken, 5000); |
| 247 } | 246 } |
| 248 }; | 247 }; |
| 249 | 248 |
| 250 // Export | 249 // Export |
| 251 return { | 250 return { |
| 252 CertificateManagerTab: CertificateManagerTab, | 251 CertificateManagerTab: CertificateManagerTab, |
| 253 CertificateManager: CertificateManager | 252 CertificateManager: CertificateManager |
| 254 }; | 253 }; |
| 255 }); | 254 }); |
| OLD | NEW |