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

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

Issue 1031833005: Renaming MinuteMaid to NewGaiaFlow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
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 /**
11 * Creates a header bar element. 11 * Creates a header bar element.
12 * 12 *
13 * @constructor 13 * @constructor
14 * @extends {HTMLDivElement} 14 * @extends {HTMLDivElement}
15 */ 15 */
16 var HeaderBar = cr.ui.define('div'); 16 var HeaderBar = cr.ui.define('div');
17 17
18 HeaderBar.prototype = { 18 HeaderBar.prototype = {
19 __proto__: HTMLDivElement.prototype, 19 __proto__: HTMLDivElement.prototype,
20 20
21 // Whether guest button should be shown when header bar is in normal mode. 21 // Whether guest button should be shown when header bar is in normal mode.
22 showGuest_: false, 22 showGuest_: false,
23 23
24 // Whehter MinuteMaid flow is active. 24 // Whether new Gaia flow MinuteMaid flow is active.
Nikita (slow) 2015/03/24 14:33:11 nit: remove MM
25 isMinuteMaid_: false, 25 isNewGaiaFlow_: false,
26 26
27 // Whether the reboot button should be shown the when header bar is in 27 // Whether the reboot button should be shown the when header bar is in
28 // normal mode. 28 // normal mode.
29 showReboot_: false, 29 showReboot_: false,
30 30
31 // Whether the shutdown button should be shown when the header bar is in 31 // Whether the shutdown button should be shown when the header bar is in
32 // normal mode. 32 // normal mode.
33 showShutdown_: true, 33 showShutdown_: true,
34 34
35 // Whether the create supervised user button should be shown when the header 35 // Whether the create supervised user button should be shown when the header
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 /** 234 /**
235 * If true then "Browse as Guest" button is shown. 235 * If true then "Browse as Guest" button is shown.
236 * 236 *
237 * @type {boolean} 237 * @type {boolean}
238 */ 238 */
239 set showGuestButton(value) { 239 set showGuestButton(value) {
240 this.showGuest_ = value; 240 this.showGuest_ = value;
241 this.updateUI_(); 241 this.updateUI_();
242 }, 242 },
243 243
244 set minuteMaid(value) { 244 set newGaiaFlow(value) {
245 this.isMinuteMaid_ = value; 245 this.isNewGaiaFlow_ = value;
246 this.updateUI_(); 246 this.updateUI_();
247 }, 247 },
248 248
249 set showCreateSupervisedButton(value) { 249 set showCreateSupervisedButton(value) {
250 this.showCreateSupervised_ = value; 250 this.showCreateSupervised_ = value;
251 this.updateUI_(); 251 this.updateUI_();
252 }, 252 },
253 253
254 /** 254 /**
255 * If true the "Restart" button is shown. 255 * If true the "Restart" button is shown.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 (this.signinUIState_ == SIGNIN_UI_STATE.SAML_PASSWORD_CONFIRM); 323 (this.signinUIState_ == SIGNIN_UI_STATE.SAML_PASSWORD_CONFIRM);
324 var isEnrollingConsumerManagement = (this.signinUIState_ == 324 var isEnrollingConsumerManagement = (this.signinUIState_ ==
325 SIGNIN_UI_STATE.CONSUMER_MANAGEMENT_ENROLLMENT); 325 SIGNIN_UI_STATE.CONSUMER_MANAGEMENT_ENROLLMENT);
326 var isMultiProfilesUI = 326 var isMultiProfilesUI =
327 (Oobe.getInstance().displayType == DISPLAY_TYPE.USER_ADDING); 327 (Oobe.getInstance().displayType == DISPLAY_TYPE.USER_ADDING);
328 var isLockScreen = 328 var isLockScreen =
329 (Oobe.getInstance().displayType == DISPLAY_TYPE.LOCK); 329 (Oobe.getInstance().displayType == DISPLAY_TYPE.LOCK);
330 330
331 $('add-user-button').hidden = 331 $('add-user-button').hidden =
332 !accountPickerIsActive || isMultiProfilesUI || isLockScreen; 332 !accountPickerIsActive || isMultiProfilesUI || isLockScreen;
333 $('more-settings-header-bar-item').hidden = !this.isMinuteMaid_ || 333 $('more-settings-header-bar-item').hidden = !this.isNewGaiaFlow_ ||
334 !this.showCreateSupervised_ || 334 !this.showCreateSupervised_ ||
335 !accountPickerIsActive; 335 !accountPickerIsActive;
336 $('cancel-add-user-button').hidden = 336 $('cancel-add-user-button').hidden =
337 (gaiaIsActive && this.isMinuteMaid_) || 337 (gaiaIsActive && this.isNewGaiaFlow_) ||
338 accountPickerIsActive || 338 accountPickerIsActive ||
339 !this.allowCancel_ || 339 !this.allowCancel_ ||
340 wrongHWIDWarningIsActive || 340 wrongHWIDWarningIsActive ||
341 isMultiProfilesUI; 341 isMultiProfilesUI;
342 $('guest-user-header-bar-item').hidden = 342 $('guest-user-header-bar-item').hidden =
343 (gaiaIsActive && !this.isMinuteMaid_) || 343 (gaiaIsActive && !this.isNewGaiaFlow_) ||
344 supervisedUserCreationDialogIsActive || 344 supervisedUserCreationDialogIsActive ||
345 !this.showGuest_ || 345 !this.showGuest_ ||
346 wrongHWIDWarningIsActive || 346 wrongHWIDWarningIsActive ||
347 isSamlPasswordConfirm || 347 isSamlPasswordConfirm ||
348 isMultiProfilesUI; 348 isMultiProfilesUI;
349 $('restart-header-bar-item').hidden = !this.showReboot_; 349 $('restart-header-bar-item').hidden = !this.showReboot_;
350 $('shutdown-header-bar-item').hidden = !this.showShutdown_; 350 $('shutdown-header-bar-item').hidden = !this.showShutdown_;
351 $('sign-out-user-item').hidden = !isLockScreen; 351 $('sign-out-user-item').hidden = !isLockScreen;
352 352
353 $('add-user-header-bar-item').hidden = 353 $('add-user-header-bar-item').hidden =
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 * Convenience wrapper of animateIn. 426 * Convenience wrapper of animateIn.
427 */ 427 */
428 HeaderBar.animateIn = function(fast, callback) { 428 HeaderBar.animateIn = function(fast, callback) {
429 $('login-header-bar').animateIn(fast, callback); 429 $('login-header-bar').animateIn(fast, callback);
430 }; 430 };
431 431
432 return { 432 return {
433 HeaderBar: HeaderBar 433 HeaderBar: HeaderBar
434 }; 434 };
435 }); 435 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698