| 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 28 matching lines...) Expand all Loading... |
| 39 this.handleCancelAddUserClick_); | 39 this.handleCancelAddUserClick_); |
| 40 $('guest-user-header-bar-item').addEventListener('click', | 40 $('guest-user-header-bar-item').addEventListener('click', |
| 41 this.handleGuestClick_); | 41 this.handleGuestClick_); |
| 42 $('guest-user-button').addEventListener('click', | 42 $('guest-user-button').addEventListener('click', |
| 43 this.handleGuestClick_); | 43 this.handleGuestClick_); |
| 44 $('sign-out-user-button').addEventListener('click', | 44 $('sign-out-user-button').addEventListener('click', |
| 45 this.handleSignoutClick_); | 45 this.handleSignoutClick_); |
| 46 $('cancel-multiple-sign-in-button').addEventListener('click', | 46 $('cancel-multiple-sign-in-button').addEventListener('click', |
| 47 this.handleCancelMultipleSignInClick_); | 47 this.handleCancelMultipleSignInClick_); |
| 48 if (Oobe.getInstance().displayType == DISPLAY_TYPE.LOGIN || | 48 if (Oobe.getInstance().displayType == DISPLAY_TYPE.LOGIN || |
| 49 Oobe.getInstance().displayType == DISPLAY_TYPE.OOBE) | 49 Oobe.getInstance().displayType == DISPLAY_TYPE.OOBE) { |
| 50 login.AppsMenuButton.decorate($('show-apps-button')); | 50 if (Oobe.getInstance().newKioskUI) |
| 51 chrome.send('initializeKioskApps'); |
| 52 else |
| 53 login.AppsMenuButton.decorate($('show-apps-button')); |
| 54 } |
| 51 this.updateUI_(); | 55 this.updateUI_(); |
| 52 }, | 56 }, |
| 53 | 57 |
| 54 /** | 58 /** |
| 55 * Tab index value for all button elements. | 59 * Tab index value for all button elements. |
| 56 * | 60 * |
| 57 * @type {number} | 61 * @type {number} |
| 58 */ | 62 */ |
| 59 set buttonsTabIndex(tabIndex) { | 63 set buttonsTabIndex(tabIndex) { |
| 60 var buttons = this.getElementsByTagName('button'); | 64 var buttons = this.getElementsByTagName('button'); |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 isSamlPasswordConfirm || | 227 isSamlPasswordConfirm || |
| 224 isMultiProfilesUI; | 228 isMultiProfilesUI; |
| 225 $('sign-out-user-item').hidden = !isLockScreen; | 229 $('sign-out-user-item').hidden = !isLockScreen; |
| 226 | 230 |
| 227 $('add-user-header-bar-item').hidden = | 231 $('add-user-header-bar-item').hidden = |
| 228 $('add-user-button').hidden && $('cancel-add-user-button').hidden; | 232 $('add-user-button').hidden && $('cancel-add-user-button').hidden; |
| 229 $('apps-header-bar-item').hidden = !this.hasApps_ || | 233 $('apps-header-bar-item').hidden = !this.hasApps_ || |
| 230 (!gaiaIsActive && !accountPickerIsActive); | 234 (!gaiaIsActive && !accountPickerIsActive); |
| 231 $('cancel-multiple-sign-in-item').hidden = !isMultiProfilesUI; | 235 $('cancel-multiple-sign-in-item').hidden = !isMultiProfilesUI; |
| 232 | 236 |
| 233 if (!$('apps-header-bar-item').hidden) | 237 if (!Oobe.getInstance().newKioskUI) { |
| 234 $('show-apps-button').didShow(); | 238 if (!$('apps-header-bar-item').hidden) |
| 239 $('show-apps-button').didShow(); |
| 240 } |
| 235 }, | 241 }, |
| 236 | 242 |
| 237 /** | 243 /** |
| 238 * Animates Header bar to hide from the screen. | 244 * Animates Header bar to hide from the screen. |
| 239 * | 245 * |
| 240 * @param {function()} callback will be called once animation is finished. | 246 * @param {function()} callback will be called once animation is finished. |
| 241 */ | 247 */ |
| 242 animateOut: function(callback) { | 248 animateOut: function(callback) { |
| 243 var launcher = this; | 249 var launcher = this; |
| 244 launcher.addEventListener( | 250 launcher.addEventListener( |
| (...skipping 30 matching lines...) Expand all Loading... |
| 275 * Convenience wrapper of animateIn. | 281 * Convenience wrapper of animateIn. |
| 276 */ | 282 */ |
| 277 HeaderBar.animateIn = function() { | 283 HeaderBar.animateIn = function() { |
| 278 $('login-header-bar').animateIn(); | 284 $('login-header-bar').animateIn(); |
| 279 } | 285 } |
| 280 | 286 |
| 281 return { | 287 return { |
| 282 HeaderBar: HeaderBar | 288 HeaderBar: HeaderBar |
| 283 }; | 289 }; |
| 284 }); | 290 }); |
| OLD | NEW |