| 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 |
| 7 * 'settings-people-page' is the settings page containing sign-in settings. | 7 * 'settings-people-page' is the settings page containing sign-in settings. |
| 8 */ | 8 */ |
| 9 Polymer({ | 9 Polymer({ |
| 10 is: 'settings-people-page', | 10 is: 'settings-people-page', |
| 11 | 11 |
| 12 behaviors: [ | 12 behaviors: [ |
| 13 I18nBehavior, |
| 13 WebUIListenerBehavior, | 14 WebUIListenerBehavior, |
| 15 <if expr="chromeos"> |
| 16 LockStateBehavior, |
| 17 </if> |
| 14 ], | 18 ], |
| 15 | 19 |
| 16 properties: { | 20 properties: { |
| 17 /** | 21 /** |
| 18 * The current active route. | 22 * The current active route. |
| 19 */ | 23 */ |
| 20 currentRoute: { | 24 currentRoute: { |
| 21 type: Object, | 25 type: Object, |
| 22 notify: true, | 26 notify: true, |
| 23 }, | 27 }, |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 if (this.easyUnlockAllowed_) { | 140 if (this.easyUnlockAllowed_) { |
| 137 this.addWebUIListener( | 141 this.addWebUIListener( |
| 138 'easy-unlock-enabled-status', | 142 'easy-unlock-enabled-status', |
| 139 this.handleEasyUnlockEnabledStatusChanged_.bind(this)); | 143 this.handleEasyUnlockEnabledStatusChanged_.bind(this)); |
| 140 this.easyUnlockBrowserProxy_.getEnabledStatus().then( | 144 this.easyUnlockBrowserProxy_.getEnabledStatus().then( |
| 141 this.handleEasyUnlockEnabledStatusChanged_.bind(this)); | 145 this.handleEasyUnlockEnabledStatusChanged_.bind(this)); |
| 142 } | 146 } |
| 143 </if> | 147 </if> |
| 144 }, | 148 }, |
| 145 | 149 |
| 150 <if expr="chromeos"> |
| 151 /** @private */ |
| 152 getPasswordState_: function(hasPin, enableScreenLock) { |
| 153 if (!enableScreenLock) |
| 154 return this.i18n('lockScreenNone'); |
| 155 if (hasPin) |
| 156 return this.i18n('lockScreenPinOrPassword'); |
| 157 return this.i18n('lockScreenPasswordOnly'); |
| 158 }, |
| 159 </if> |
| 160 |
| 146 /** | 161 /** |
| 147 * Handler for when the profile's icon and name is updated. | 162 * Handler for when the profile's icon and name is updated. |
| 148 * @private | 163 * @private |
| 149 * @param {!settings.ProfileInfo} info | 164 * @param {!settings.ProfileInfo} info |
| 150 */ | 165 */ |
| 151 handleProfileInfo_: function(info) { | 166 handleProfileInfo_: function(info) { |
| 152 this.profileName_ = info.name; | 167 this.profileName_ = info.name; |
| 153 this.profileIconUrl_ = info.iconUrl; | 168 this.profileIconUrl_ = info.iconUrl; |
| 154 }, | 169 }, |
| 155 | 170 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 assert(this.syncStatus.syncSystemEnabled); | 248 assert(this.syncStatus.syncSystemEnabled); |
| 234 | 249 |
| 235 if (this.syncStatus.managed) | 250 if (this.syncStatus.managed) |
| 236 return; | 251 return; |
| 237 | 252 |
| 238 settings.navigateTo(settings.Route.SYNC); | 253 settings.navigateTo(settings.Route.SYNC); |
| 239 }, | 254 }, |
| 240 | 255 |
| 241 <if expr="chromeos"> | 256 <if expr="chromeos"> |
| 242 /** @private */ | 257 /** @private */ |
| 243 onQuickUnlockTap_: function() { | 258 onConfigureLockTap_: function() { |
| 244 settings.navigateTo(settings.Route.QUICK_UNLOCK_AUTHENTICATE); | 259 settings.navigateTo(settings.Route.LOCK_SCREEN); |
| 245 }, | 260 }, |
| 246 | 261 |
| 247 /** @private */ | 262 /** @private */ |
| 248 onEasyUnlockSetupTap_: function() { | 263 onEasyUnlockSetupTap_: function() { |
| 249 this.easyUnlockBrowserProxy_.startTurnOnFlow(); | 264 this.easyUnlockBrowserProxy_.startTurnOnFlow(); |
| 250 }, | 265 }, |
| 251 | 266 |
| 252 /** @private */ | 267 /** @private */ |
| 253 onEasyUnlockTurnOffTap_: function() { | 268 onEasyUnlockTurnOffTap_: function() { |
| 254 this.$$('#easyUnlockTurnOffDialog').open(); | 269 this.$$('#easyUnlockTurnOffDialog').open(); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 if (!syncStatus) | 333 if (!syncStatus) |
| 319 return ''; | 334 return ''; |
| 320 if (syncStatus.hasError) | 335 if (syncStatus.hasError) |
| 321 return 'settings:sync-problem'; | 336 return 'settings:sync-problem'; |
| 322 if (syncStatus.managed) | 337 if (syncStatus.managed) |
| 323 return 'settings:sync-disabled'; | 338 return 'settings:sync-disabled'; |
| 324 | 339 |
| 325 return 'settings:done'; | 340 return 'settings:done'; |
| 326 }, | 341 }, |
| 327 }); | 342 }); |
| OLD | NEW |