Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 /** | 5 /** |
| 6 * @fileoverview | 6 * @fileoverview 'settings-certificate-manager-page' is the settings page |
| 7 * 'settings-certificate-manager-page' is the settings page containing SSL | 7 * containing SSL certificate settings. |
| 8 * certificate settings. | |
| 9 * | |
| 10 * Example: | |
| 11 * | |
| 12 * <iron-animated-pages> | |
| 13 * <settings-certificate-manager-page prefs="{{prefs}}"> | |
| 14 * </settings-certificate-manager-page> | |
| 15 * ... other pages ... | |
| 16 * </iron-animated-pages> | |
| 17 */ | 8 */ |
| 18 Polymer({ | 9 Polymer({ |
| 19 is: 'settings-certificate-manager-page', | 10 is: 'settings-certificate-manager-page', |
| 11 | |
| 12 behaviors: [WebUIListenerBehavior], | |
| 13 | |
| 14 properties: { | |
| 15 /** @type {number} */ | |
| 16 selected: { | |
| 17 type: Number, | |
| 18 value: 0, | |
| 19 }, | |
| 20 | |
| 21 /** @type {!Array<!Certificate>} */ | |
| 22 personalCerts: { | |
| 23 type: Array, | |
| 24 value: function() { return []; }, | |
| 25 }, | |
| 26 | |
| 27 /** @type {!Array<!Certificate>} */ | |
| 28 serverCerts: { | |
| 29 type: Array, | |
| 30 value: function() { return []; }, | |
| 31 }, | |
| 32 | |
| 33 /** @type {!Array<!Certificate>} */ | |
| 34 caCerts: { | |
| 35 type: Array, | |
| 36 value: function() { return []; }, | |
| 37 }, | |
| 38 | |
| 39 /** @type {!Array<!Certificate>} */ | |
| 40 otherCerts: { | |
| 41 type: Array, | |
| 42 value: function() { return []; }, | |
| 43 }, | |
| 44 }, | |
| 45 | |
| 46 /** @private {!settings.CertificatesManagerBrowserProxy} */ | |
| 47 browserProxy_: null, | |
|
Dan Beam
2016/03/22 02:08:28
nit: if you only use this once, it may be cheaper/
dpapad
2016/03/22 18:07:02
Done.
| |
| 48 | |
| 49 /** @override */ | |
| 50 created: function() { | |
| 51 this.browserProxy_ = settings.CertificatesBrowserProxyImpl.getInstance(); | |
| 52 }, | |
| 53 | |
| 54 /** @override */ | |
| 55 attached: function() { | |
| 56 this.addWebUIListener('certificates-changed', this.set.bind(this)); | |
| 57 this.browserProxy_.refreshCertificates(); | |
| 58 }, | |
| 59 | |
| 60 /** | |
| 61 * @param {number} selectedIndex | |
| 62 * @param {number} tabIndex | |
| 63 * @return {boolean} Whether to show tab at |tabIndex|. | |
| 64 * @private | |
| 65 */ | |
| 66 isTabSelected_: function(selectedIndex, tabIndex) { | |
| 67 return selectedIndex == tabIndex; | |
| 68 }, | |
| 20 }); | 69 }); |
| OLD | NEW |