Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Side by Side Diff: chrome/browser/resources/chromeos/login/header_bar.js

Issue 14139003: Chrome OS multi-profiles backend and UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move IsMultiProfilesEnabled() out of cros Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/login/display_manager.js ('k') | chrome/browser/ui/ash/chrome_shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698