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 Oobe signin screen implementation. | 6 * @fileoverview Oobe signin screen implementation. |
7 */ | 7 */ |
8 | 8 |
9 login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { | 9 login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { |
10 // Gaia loading time after which error message must be displayed and | 10 // Gaia loading time after which error message must be displayed and |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 } | 416 } |
417 | 417 |
418 if (data.localizedStrings) | 418 if (data.localizedStrings) |
419 params.localizedStrings = data.localizedStrings; | 419 params.localizedStrings = data.localizedStrings; |
420 | 420 |
421 if (this.isNewGaiaFlow) { | 421 if (this.isNewGaiaFlow) { |
422 $('inner-container').classList.add('new-gaia-flow'); | 422 $('inner-container').classList.add('new-gaia-flow'); |
423 $('progress-dots').hidden = true; | 423 $('progress-dots').hidden = true; |
424 params.chromeType = data.chromeType; | 424 params.chromeType = data.chromeType; |
425 params.isNewGaiaFlowChromeOS = true; | 425 params.isNewGaiaFlowChromeOS = true; |
426 $('login-header-bar').showGuestButton = true; | |
427 } | 426 } |
428 | 427 |
429 if (data.gaiaEndpoint) | 428 if (data.gaiaEndpoint) |
430 params.gaiaPath = data.gaiaEndpoint; | 429 params.gaiaPath = data.gaiaEndpoint; |
431 | 430 |
432 $('login-header-bar').newGaiaFlow = this.isNewGaiaFlow; | 431 $('login-header-bar').newGaiaFlow = this.isNewGaiaFlow; |
433 | 432 |
434 // Screen size could have been changed because of 'new-gaia-flow' or | 433 // Screen size could have been changed because of 'new-gaia-flow' or |
435 // 'full-width' classes. | 434 // 'full-width' classes. |
436 if (Oobe.getInstance().currentScreen === this) | 435 if (Oobe.getInstance().currentScreen === this) |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 reasonLabel.textContent = | 472 reasonLabel.textContent = |
474 loadTimeData.getString('signinScreenPasswordChanged'); | 473 loadTimeData.getString('signinScreenPasswordChanged'); |
475 reasonLabel.hidden = false; | 474 reasonLabel.hidden = false; |
476 } else { | 475 } else { |
477 reasonLabel.hidden = true; | 476 reasonLabel.hidden = true; |
478 } | 477 } |
479 | 478 |
480 if (this.isNewGaiaFlow) { | 479 if (this.isNewGaiaFlow) { |
481 $('login-header-bar').showCreateSupervisedButton = | 480 $('login-header-bar').showCreateSupervisedButton = |
482 data.supervisedUsersCanCreate; | 481 data.supervisedUsersCanCreate; |
| 482 $('login-header-bar').showGuestButton = data.guestSignin; |
483 } else { | 483 } else { |
484 $('createAccount').hidden = !data.createAccount; | 484 $('createAccount').hidden = !data.createAccount; |
485 $('guestSignin').hidden = !data.guestSignin; | 485 $('guestSignin').hidden = !data.guestSignin; |
486 $('createSupervisedUserPane').hidden = !data.supervisedUsersEnabled; | 486 $('createSupervisedUserPane').hidden = !data.supervisedUsersEnabled; |
487 | 487 |
488 $('createSupervisedUserLinkPlaceholder').hidden = | 488 $('createSupervisedUserLinkPlaceholder').hidden = |
489 !data.supervisedUsersCanCreate; | 489 !data.supervisedUsersCanCreate; |
490 $('createSupervisedUserNoManagerText').hidden = | 490 $('createSupervisedUserNoManagerText').hidden = |
491 data.supervisedUsersCanCreate; | 491 data.supervisedUsersCanCreate; |
492 $('createSupervisedUserNoManagerText').textContent = | 492 $('createSupervisedUserNoManagerText').textContent = |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
967 */ | 967 */ |
968 updateDeviceId: function(data) { | 968 updateDeviceId: function(data) { |
969 if (!this.isNewGaiaFlow) | 969 if (!this.isNewGaiaFlow) |
970 return; | 970 return; |
971 | 971 |
972 if (data && data.deviceId) | 972 if (data && data.deviceId) |
973 this.gaiaAuthHost_.updateDeviceId(data.deviceId); | 973 this.gaiaAuthHost_.updateDeviceId(data.deviceId); |
974 }, | 974 }, |
975 }; | 975 }; |
976 }); | 976 }); |
OLD | NEW |