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 animation guard timer. Started when GAIA page is loaded | 10 // GAIA animation guard timer. Started when GAIA page is loaded |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 $('login-header-bar').signinUIState = SIGNIN_UI_STATE.HIDDEN; | 550 $('login-header-bar').signinUIState = SIGNIN_UI_STATE.HIDDEN; |
551 $('offline-gaia').switchToEmailCard(false /* animated */); | 551 $('offline-gaia').switchToEmailCard(false /* animated */); |
552 }, | 552 }, |
553 | 553 |
554 /** | 554 /** |
555 * Loads the authentication extension into the iframe. | 555 * Loads the authentication extension into the iframe. |
556 * @param {Object} data Extension parameters bag. | 556 * @param {Object} data Extension parameters bag. |
557 * @private | 557 * @private |
558 */ | 558 */ |
559 loadAuthExtension: function(data) { | 559 loadAuthExtension: function(data) { |
| 560 // Redirect the webview to the blank page in order to stop the SAML IdP |
| 561 // page from working in a background (see crbug.com/613245). |
| 562 if (this.screenMode_ == ScreenMode.DEFAULT && |
| 563 data.screenMode != ScreenMode.DEFAULT) { |
| 564 this.gaiaAuthHost_.resetWebview(); |
| 565 } |
| 566 |
560 this.screenMode = data.screenMode; | 567 this.screenMode = data.screenMode; |
561 this.email = ''; | 568 this.email = ''; |
562 this.authCompleted_ = false; | 569 this.authCompleted_ = false; |
563 this.lastBackMessageValue_ = false; | 570 this.lastBackMessageValue_ = false; |
564 | 571 |
565 $('login-header-bar').showCreateSupervisedButton = | 572 $('login-header-bar').showCreateSupervisedButton = |
566 data.supervisedUsersCanCreate; | 573 data.supervisedUsersCanCreate; |
567 $('login-header-bar').showGuestButton = data.guestSignin; | 574 $('login-header-bar').showGuestButton = data.guestSignin; |
568 | 575 |
569 // Reset SAML | 576 // Reset SAML |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
916 }, | 923 }, |
917 | 924 |
918 /** | 925 /** |
919 * Clears input fields and switches to input mode. | 926 * Clears input fields and switches to input mode. |
920 * @param {boolean} takeFocus True to take focus. | 927 * @param {boolean} takeFocus True to take focus. |
921 * @param {boolean} forceOnline Whether online sign-in should be forced. | 928 * @param {boolean} forceOnline Whether online sign-in should be forced. |
922 * If |forceOnline| is false previously used sign-in type will be used. | 929 * If |forceOnline| is false previously used sign-in type will be used. |
923 */ | 930 */ |
924 reset: function(takeFocus, forceOnline) { | 931 reset: function(takeFocus, forceOnline) { |
925 // Reload and show the sign-in UI if needed. | 932 // Reload and show the sign-in UI if needed. |
926 this.gaiaAuthHost_.resetStates_(); | 933 this.gaiaAuthHost_.resetStates(); |
927 if (takeFocus) { | 934 if (takeFocus) { |
928 if (!forceOnline && this.isOffline()) { | 935 if (!forceOnline && this.isOffline()) { |
929 // Show 'Cancel' button to allow user to return to the main screen | 936 // Show 'Cancel' button to allow user to return to the main screen |
930 // (e.g. this makes sense when connection is back). | 937 // (e.g. this makes sense when connection is back). |
931 Oobe.getInstance().headerHidden = false; | 938 Oobe.getInstance().headerHidden = false; |
932 $('login-header-bar').signinUIState = SIGNIN_UI_STATE.GAIA_SIGNIN; | 939 $('login-header-bar').signinUIState = SIGNIN_UI_STATE.GAIA_SIGNIN; |
933 // Do nothing, since offline version is reloaded after an error comes. | 940 // Do nothing, since offline version is reloaded after an error comes. |
934 } else { | 941 } else { |
935 Oobe.showSigninUI(); | 942 Oobe.showSigninUI(); |
936 } | 943 } |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1040 this.classList.toggle('whitelist-error', show); | 1047 this.classList.toggle('whitelist-error', show); |
1041 this.loading = !show; | 1048 this.loading = !show; |
1042 | 1049 |
1043 if (!show) | 1050 if (!show) |
1044 Oobe.showSigninUI(); | 1051 Oobe.showSigninUI(); |
1045 | 1052 |
1046 this.updateControlsState(); | 1053 this.updateControlsState(); |
1047 } | 1054 } |
1048 }; | 1055 }; |
1049 }); | 1056 }); |
OLD | NEW |