| 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 /** | 5 /** |
| 6 * @fileoverview Login UI header bar implementation. | 6 * @fileoverview Login UI header bar implementation. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 cr.define('login', function() { | 9 cr.define('login', function() { |
| 10 /** | 10 /** |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 * @private | 172 * @private |
| 173 */ | 173 */ |
| 174 updateUI_: function() { | 174 updateUI_: function() { |
| 175 var gaiaIsActive = (this.signinUIState_ == SIGNIN_UI_STATE.GAIA_SIGNIN); | 175 var gaiaIsActive = (this.signinUIState_ == SIGNIN_UI_STATE.GAIA_SIGNIN); |
| 176 var accountPickerIsActive = | 176 var accountPickerIsActive = |
| 177 (this.signinUIState_ == SIGNIN_UI_STATE.ACCOUNT_PICKER); | 177 (this.signinUIState_ == SIGNIN_UI_STATE.ACCOUNT_PICKER); |
| 178 var managedUserCreationDialogIsActive = | 178 var managedUserCreationDialogIsActive = |
| 179 (this.signinUIState_ == SIGNIN_UI_STATE.MANAGED_USER_CREATION_FLOW); | 179 (this.signinUIState_ == SIGNIN_UI_STATE.MANAGED_USER_CREATION_FLOW); |
| 180 var wrongHWIDWarningIsActive = | 180 var wrongHWIDWarningIsActive = |
| 181 (this.signinUIState_ == SIGNIN_UI_STATE.WRONG_HWID_WARNING); | 181 (this.signinUIState_ == SIGNIN_UI_STATE.WRONG_HWID_WARNING); |
| 182 var isMultiProfilesUI = Oobe.getInstance().isSignInToAddScreen(); |
| 182 | 183 |
| 183 $('add-user-button').hidden = !accountPickerIsActive; | 184 $('add-user-button').hidden = !accountPickerIsActive || isMultiProfilesUI; |
| 184 $('cancel-add-user-button').hidden = accountPickerIsActive || | 185 $('cancel-add-user-button').hidden = accountPickerIsActive || |
| 185 !this.allowCancel_ || | 186 !this.allowCancel_ || |
| 186 wrongHWIDWarningIsActive; | 187 wrongHWIDWarningIsActive || |
| 188 isMultiProfilesUI; |
| 187 $('guest-user-header-bar-item').hidden = gaiaIsActive || | 189 $('guest-user-header-bar-item').hidden = gaiaIsActive || |
| 188 managedUserCreationDialogIsActive || | 190 managedUserCreationDialogIsActive || |
| 189 !this.showGuest_ || | 191 !this.showGuest_ || |
| 190 wrongHWIDWarningIsActive; | 192 wrongHWIDWarningIsActive || |
| 193 isMultiProfilesUI; |
| 191 $('add-user-header-bar-item').hidden = | 194 $('add-user-header-bar-item').hidden = |
| 192 $('add-user-button').hidden && $('cancel-add-user-button').hidden; | 195 $('add-user-button').hidden && $('cancel-add-user-button').hidden; |
| 193 $('apps-header-bar-item').hidden = !this.hasApps_ || | 196 $('apps-header-bar-item').hidden = !this.hasApps_ || |
| 194 (!gaiaIsActive && !accountPickerIsActive); | 197 (!gaiaIsActive && !accountPickerIsActive); |
| 195 | 198 |
| 196 if (!$('apps-header-bar-item').hidden) | 199 if (!$('apps-header-bar-item').hidden) |
| 197 $('show-apps-button').didShow(); | 200 $('show-apps-button').didShow(); |
| 198 }, | 201 }, |
| 199 | 202 |
| 200 /** | 203 /** |
| (...skipping 19 matching lines...) Expand all Loading... |
| 220 this.classList.remove('login-header-bar-animate-fast'); | 223 this.classList.remove('login-header-bar-animate-fast'); |
| 221 this.classList.add('login-header-bar-animate-slow'); | 224 this.classList.add('login-header-bar-animate-slow'); |
| 222 this.classList.remove('login-header-bar-hidden'); | 225 this.classList.remove('login-header-bar-hidden'); |
| 223 }, | 226 }, |
| 224 }; | 227 }; |
| 225 | 228 |
| 226 return { | 229 return { |
| 227 HeaderBar: HeaderBar | 230 HeaderBar: HeaderBar |
| 228 }; | 231 }; |
| 229 }); | 232 }); |
| OLD | NEW |