| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 }; | 165 }; |
| 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 * @extends {cr.ui.pageManager.Page} | 173 * @extends {cr.ui.pageManager.Page} |
| 174 */ | 174 */ |
| 175 function CertificateManager(model) { | 175 function CertificateManager() { |
| 176 Page.call(this, 'certificates', | 176 Page.call(this, 'certificates', |
| 177 loadTimeData.getString('certificateManagerPageTabTitle'), | 177 loadTimeData.getString('certificateManagerPageTabTitle'), |
| 178 'certificateManagerPage'); | 178 'certificateManagerPage'); |
| 179 } | 179 } |
| 180 | 180 |
| 181 cr.addSingletonGetter(CertificateManager); | 181 cr.addSingletonGetter(CertificateManager); |
| 182 | 182 |
| 183 CertificateManager.prototype = { | 183 CertificateManager.prototype = { |
| 184 __proto__: Page.prototype, | 184 __proto__: Page.prototype, |
| 185 | 185 |
| 186 /** @private {boolean} */ |
| 187 isKiosk_: false, |
| 188 |
| 189 /** @param {boolean} isKiosk */ |
| 190 setIsKiosk: function(isKiosk) { |
| 191 this.isKiosk_ = isKiosk; |
| 192 }, |
| 193 |
| 186 /** @override */ | 194 /** @override */ |
| 187 initializePage: function(isKiosk) { | 195 initializePage: function() { |
| 188 Page.prototype.initializePage.call(this); | 196 Page.prototype.initializePage.call(this); |
| 189 | 197 |
| 190 this.personalTab = new CertificateManagerTab('personalCertsTab', | 198 this.personalTab = new CertificateManagerTab('personalCertsTab', |
| 191 !!isKiosk); | 199 this.isKiosk_); |
| 192 this.serverTab = new CertificateManagerTab('serverCertsTab', !!isKiosk); | 200 this.serverTab = new CertificateManagerTab('serverCertsTab', |
| 193 this.caTab = new CertificateManagerTab('caCertsTab', !!isKiosk); | 201 this.isKiosk_); |
| 194 this.otherTab = new CertificateManagerTab('otherCertsTab', !!isKiosk); | 202 this.caTab = new CertificateManagerTab('caCertsTab', this.isKiosk_); |
| 203 this.otherTab = new CertificateManagerTab('otherCertsTab', this.isKiosk_); |
| 195 | 204 |
| 196 this.addEventListener('visibleChange', this.handleVisibleChange_); | 205 this.addEventListener('visibleChange', this.handleVisibleChange_); |
| 197 | 206 |
| 198 $('certificate-confirm').onclick = function() { | 207 $('certificate-confirm').onclick = function() { |
| 199 PageManager.closeOverlay(); | 208 PageManager.closeOverlay(); |
| 200 }; | 209 }; |
| 201 }, | 210 }, |
| 202 | 211 |
| 203 initalized_: false, | 212 initalized_: false, |
| 204 | 213 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 $('serverCertsTab-import').disabled = false; | 248 $('serverCertsTab-import').disabled = false; |
| 240 $('caCertsTab-import').disabled = false; | 249 $('caCertsTab-import').disabled = false; |
| 241 }; | 250 }; |
| 242 | 251 |
| 243 // Export | 252 // Export |
| 244 return { | 253 return { |
| 245 CertificateManagerTab: CertificateManagerTab, | 254 CertificateManagerTab: CertificateManagerTab, |
| 246 CertificateManager: CertificateManager | 255 CertificateManager: CertificateManager |
| 247 }; | 256 }; |
| 248 }); | 257 }); |
| OLD | NEW |