cr.define('login', function() {
/**
* Creates a header bar element.
+ *
* @constructor
* @extends {HTMLDivElement}
*/
$('cancel-multiple-sign-in-button').addEventListener('click',
this.handleCancelMultipleSignInClick_);
if (Oobe.getInstance().displayType == DISPLAY_TYPE.LOGIN ||
- Oobe.getInstance().displayType == DISPLAY_TYPE.OOBE)
- login.AppsMenuButton.decorate($('show-apps-button'));
+ Oobe.getInstance().displayType == DISPLAY_TYPE.OOBE) {
+ if (Oobe.getInstance().newKioskUI)
+ chrome.send('initializeKioskApps');
+ else
+ login.AppsMenuButton.decorate($('show-apps-button'));
+ }
+ this.updateUI_();
},
/**
* Tab index value for all button elements.
+ *
* @type {number}
*/
set buttonsTabIndex(tabIndex) {
/**
* Disables the header bar and all of its elements.
+ *
* @type {boolean}
*/
set disabled(value) {
/**
* Add user button click handler.
+ *
* @private
*/
handleAddUserClick_: function(e) {
/**
* Cancel add user button click handler.
+ *
* @private
*/
handleCancelAddUserClick_: function(e) {
/**
* Guest button click handler.
+ *
* @private
*/
handleGuestClick_: function(e) {
/**
* Sign out button click handler.
+ *
* @private
*/
handleSignoutClick_: function(e) {
/**
* Shutdown button click handler.
+ *
* @private
*/
handleShutdownClick_: function(e) {
/**
* Cancel user adding button handler.
+ *
* @private
*/
handleCancelMultipleSignInClick_: function(e) {
/**
* If true then "Browse as Guest" button is shown.
+ *
* @type {boolean}
*/
set showGuestButton(value) {
},
/**
- * Update current header bar UI.
- * @type {number} state Current state of the sign-in screen
- * (see SIGNIN_UI_STATE).
+ * Current header bar UI / sign in state.
+ *
+ * @type {number} state Current state of the sign-in screen (see
+ * SIGNIN_UI_STATE).
*/
+ get signinUIState() {
+ return this.signinUIState_;
+ },
set signinUIState(state) {
this.signinUIState_ = state;
this.updateUI_();
/**
* Whether the Cancel button is enabled during Gaia sign-in.
+ *
* @type {boolean}
*/
set allowCancel(value) {
/**
* Update whether there are kiosk apps.
+ *
* @type {boolean}
*/
set hasApps(value) {
/**
* Updates visibility state of action buttons.
+ *
* @private
*/
updateUI_: function() {
(this.signinUIState_ == SIGNIN_UI_STATE.MANAGED_USER_CREATION_FLOW);
var wrongHWIDWarningIsActive =
(this.signinUIState_ == SIGNIN_UI_STATE.WRONG_HWID_WARNING);
+ var isSamlPasswordConfirm =
+ (this.signinUIState_ == SIGNIN_UI_STATE.SAML_PASSWORD_CONFIRM);
var isMultiProfilesUI =
(Oobe.getInstance().displayType == DISPLAY_TYPE.USER_ADDING);
+ var isLockScreen =
+ (Oobe.getInstance().displayType == DISPLAY_TYPE.LOCK);
- $('add-user-button').hidden = !accountPickerIsActive || isMultiProfilesUI;
+ $('add-user-button').hidden =
+ !accountPickerIsActive || isMultiProfilesUI || isLockScreen;
$('cancel-add-user-button').hidden = accountPickerIsActive ||
!this.allowCancel_ ||
wrongHWIDWarningIsActive ||
managedUserCreationDialogIsActive ||
!this.showGuest_ ||
wrongHWIDWarningIsActive ||
+ isSamlPasswordConfirm ||
isMultiProfilesUI;
+ $('sign-out-user-item').hidden = !isLockScreen;
+
$('add-user-header-bar-item').hidden =
$('add-user-button').hidden && $('cancel-add-user-button').hidden;
$('apps-header-bar-item').hidden = !this.hasApps_ ||
(!gaiaIsActive && !accountPickerIsActive);
$('cancel-multiple-sign-in-item').hidden = !isMultiProfilesUI;
- if (!$('apps-header-bar-item').hidden)
- $('show-apps-button').didShow();
+ if (!Oobe.getInstance().newKioskUI) {
+ if (!$('apps-header-bar-item').hidden)
+ $('show-apps-button').didShow();
+ }
},
/**
* Animates Header bar to hide from the screen.
+ *
* @param {function()} callback will be called once animation is finished.
*/
animateOut: function(callback) {