| 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', |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 }, | 138 }, |
| 139 readOnly: true, | 139 readOnly: true, |
| 140 }, | 140 }, |
| 141 | 141 |
| 142 /** @private */ | 142 /** @private */ |
| 143 showEasyUnlockTurnOffDialog_: { | 143 showEasyUnlockTurnOffDialog_: { |
| 144 type: Boolean, | 144 type: Boolean, |
| 145 value: false, | 145 value: false, |
| 146 }, | 146 }, |
| 147 // </if> | 147 // </if> |
| 148 |
| 149 /** @private {?Map<string, string>} */ |
| 150 focusConfig_: Object, |
| 151 }, |
| 152 |
| 153 /** @override */ |
| 154 ready: function() { |
| 155 this.focusConfig_ = new Map(); |
| 156 this.focusConfig_.set( |
| 157 settings.Route.SYNC.path, '#sync-status .subpage-arrow'); |
| 158 // <if expr="not chromeos"> |
| 159 this.focusConfig_.set( |
| 160 settings.Route.MANAGE_PROFILE.path, |
| 161 '#picture-subpage-trigger .subpage-arrow'); |
| 162 // </if> |
| 163 // <if expr="chromeos"> |
| 164 this.focusConfig_.set( |
| 165 settings.Route.CHANGE_PICTURE.path, |
| 166 '#picture-subpage-trigger .subpage-arrow'); |
| 167 this.focusConfig_.set( |
| 168 settings.Route.LOCK_SCREEN.path, '#lockScreenSubpageTrigger'); |
| 169 this.focusConfig_.set( |
| 170 settings.Route.ACCOUNTS.path, |
| 171 '#manage-other-people-subpage-trigger .subpage-arrow'); |
| 172 // </if> |
| 148 }, | 173 }, |
| 149 | 174 |
| 150 /** @override */ | 175 /** @override */ |
| 151 attached: function() { | 176 attached: function() { |
| 152 var profileInfoProxy = settings.ProfileInfoBrowserProxyImpl.getInstance(); | 177 var profileInfoProxy = settings.ProfileInfoBrowserProxyImpl.getInstance(); |
| 153 profileInfoProxy.getProfileInfo().then(this.handleProfileInfo_.bind(this)); | 178 profileInfoProxy.getProfileInfo().then(this.handleProfileInfo_.bind(this)); |
| 154 this.addWebUIListener('profile-info-changed', | 179 this.addWebUIListener('profile-info-changed', |
| 155 this.handleProfileInfo_.bind(this)); | 180 this.handleProfileInfo_.bind(this)); |
| 156 | 181 |
| 157 profileInfoProxy.getProfileManagesSupervisedUsers().then( | 182 profileInfoProxy.getProfileManagesSupervisedUsers().then( |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 | 542 |
| 518 /** | 543 /** |
| 519 * @param {!settings.SyncStatus} syncStatus | 544 * @param {!settings.SyncStatus} syncStatus |
| 520 * @return {boolean} Whether to show the "Sign in to Chrome" button. | 545 * @return {boolean} Whether to show the "Sign in to Chrome" button. |
| 521 * @private | 546 * @private |
| 522 */ | 547 */ |
| 523 showSignin_: function(syncStatus) { | 548 showSignin_: function(syncStatus) { |
| 524 return !!syncStatus.signinAllowed && !syncStatus.signedIn; | 549 return !!syncStatus.signinAllowed && !syncStatus.signedIn; |
| 525 }, | 550 }, |
| 526 }); | 551 }); |
| OLD | NEW |