| 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 (function() { | 5 (function() { |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Names of the radio buttons which allow the user to choose their encryption | 8 * Names of the radio buttons which allow the user to choose their encryption |
| 9 * mechanism. | 9 * mechanism. |
| 10 * @enum {string} | 10 * @enum {string} |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 /** | 66 /** |
| 67 * The current sync preferences, supplied by SyncBrowserProxy. | 67 * The current sync preferences, supplied by SyncBrowserProxy. |
| 68 * @type {settings.SyncPrefs|undefined} | 68 * @type {settings.SyncPrefs|undefined} |
| 69 */ | 69 */ |
| 70 syncPrefs: { | 70 syncPrefs: { |
| 71 type: Object, | 71 type: Object, |
| 72 }, | 72 }, |
| 73 | 73 |
| 74 /** | 74 /** |
| 75 * Caches the individually selected synced data types. This is used to | |
| 76 * be able to restore the selections after checking and unchecking Sync All. | |
| 77 * @private | |
| 78 */ | |
| 79 cachedSyncPrefs_: { | |
| 80 type: Object, | |
| 81 }, | |
| 82 | |
| 83 /** | |
| 84 * Whether the "create passphrase" inputs should be shown. These inputs | 75 * Whether the "create passphrase" inputs should be shown. These inputs |
| 85 * give the user the opportunity to use a custom passphrase instead of | 76 * give the user the opportunity to use a custom passphrase instead of |
| 86 * authenticating with their Google credentials. | 77 * authenticating with their Google credentials. |
| 87 * @private | 78 * @private |
| 88 */ | 79 */ |
| 89 creatingNewPassphrase_: { | 80 creatingNewPassphrase_: { |
| 90 type: Boolean, | 81 type: Boolean, |
| 91 value: false, | 82 value: false, |
| 92 }, | 83 }, |
| 93 | 84 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 110 }, | 101 }, |
| 111 | 102 |
| 112 /** | 103 /** |
| 113 * The existing passphrase input field value. | 104 * The existing passphrase input field value. |
| 114 * @private | 105 * @private |
| 115 */ | 106 */ |
| 116 existingPassphrase_: { | 107 existingPassphrase_: { |
| 117 type: String, | 108 type: String, |
| 118 value: '', | 109 value: '', |
| 119 }, | 110 }, |
| 111 }, |
| 120 | 112 |
| 121 /** @private {!settings.SyncBrowserProxy} */ | 113 /** @private {?settings.SyncBrowserProxy} */ |
| 122 browserProxy_: { | 114 browserProxy_: null, |
| 123 type: Object, | |
| 124 value: function() { | |
| 125 return settings.SyncBrowserProxyImpl.getInstance(); | |
| 126 }, | |
| 127 }, | |
| 128 | 115 |
| 129 /** | 116 /** |
| 130 * The unload callback is needed because the sign-in flow needs to know | 117 * The unload callback is needed because the sign-in flow needs to know |
| 131 * if the user has closed the tab with the sync settings. This property is | 118 * if the user has closed the tab with the sync settings. This property is |
| 132 * non-null if the user is currently navigated on the sync settings route. | 119 * non-null if the user is currently navigated on the sync settings route. |
| 133 * @private {Function} | 120 * @private {?Function} |
| 134 */ | 121 */ |
| 135 unloadCallback_: { | 122 unloadCallback_: null, |
| 136 type: Object, | 123 |
| 137 value: null, | 124 /** |
| 138 }, | 125 * Caches the individually selected synced data types. This is used to |
| 126 * be able to restore the selections after checking and unchecking Sync All. |
| 127 * @private {?Object} |
| 128 */ |
| 129 cachedSyncPrefs_: null, |
| 130 |
| 131 /** @override */ |
| 132 created: function() { |
| 133 this.browserProxy_ = settings.SyncBrowserProxyImpl.getInstance(); |
| 139 }, | 134 }, |
| 140 | 135 |
| 141 /** @override */ | 136 /** @override */ |
| 142 attached: function() { | 137 attached: function() { |
| 143 this.addWebUIListener('page-status-changed', | 138 this.addWebUIListener('page-status-changed', |
| 144 this.handlePageStatusChanged_.bind(this)); | 139 this.handlePageStatusChanged_.bind(this)); |
| 145 this.addWebUIListener('sync-prefs-changed', | 140 this.addWebUIListener('sync-prefs-changed', |
| 146 this.handleSyncPrefsChanged_.bind(this)); | 141 this.handleSyncPrefsChanged_.bind(this)); |
| 147 | 142 |
| 148 if (settings.getCurrentRoute() == settings.Route.SYNC) | 143 if (settings.getCurrentRoute() == settings.Route.SYNC) |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 onLearnMoreTap_: function(event) { | 432 onLearnMoreTap_: function(event) { |
| 438 if (event.target.tagName == 'A') { | 433 if (event.target.tagName == 'A') { |
| 439 // Stop the propagation of events, so that clicking on links inside | 434 // Stop the propagation of events, so that clicking on links inside |
| 440 // checkboxes or radio buttons won't change the value. | 435 // checkboxes or radio buttons won't change the value. |
| 441 event.stopPropagation(); | 436 event.stopPropagation(); |
| 442 } | 437 } |
| 443 } | 438 } |
| 444 }); | 439 }); |
| 445 | 440 |
| 446 })(); | 441 })(); |
| OLD | NEW |