Chromium Code Reviews| 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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 586 params.doSamlRedirect = | 586 params.doSamlRedirect = |
| 587 (this.screenMode_ == ScreenMode.SAML_INTERSTITIAL); | 587 (this.screenMode_ == ScreenMode.SAML_INTERSTITIAL); |
| 588 | 588 |
| 589 this.gaiaAuthParams_ = params; | 589 this.gaiaAuthParams_ = params; |
| 590 switch (this.screenMode_) { | 590 switch (this.screenMode_) { |
| 591 case ScreenMode.DEFAULT: | 591 case ScreenMode.DEFAULT: |
| 592 this.loadGaiaAuthHost_(false /* doSamlRedirect */); | 592 this.loadGaiaAuthHost_(false /* doSamlRedirect */); |
| 593 break; | 593 break; |
| 594 | 594 |
| 595 case ScreenMode.OFFLINE: | 595 case ScreenMode.OFFLINE: |
| 596 this.gaiaAuthHost_.resetStates(); | |
|
emaxx
2016/05/23 15:00:49
This (plus the new line 601) resolves the issue th
| |
| 596 this.loadOffline(params); | 597 this.loadOffline(params); |
| 597 break; | 598 break; |
| 598 | 599 |
| 599 case ScreenMode.SAML_INTERSTITIAL: | 600 case ScreenMode.SAML_INTERSTITIAL: |
| 601 this.gaiaAuthHost_.resetStates(); | |
| 600 $('saml-interstitial').domain = data.enterpriseDomain; | 602 $('saml-interstitial').domain = data.enterpriseDomain; |
| 601 if (this.loading) | 603 if (this.loading) |
| 602 this.loading = false; | 604 this.loading = false; |
| 603 // This event is for the browser tests. | 605 // This event is for the browser tests. |
| 604 $('saml-interstitial').fire('samlInterstitialPageReady'); | 606 $('saml-interstitial').fire('samlInterstitialPageReady'); |
| 605 break; | 607 break; |
| 606 } | 608 } |
| 607 this.updateControlsState(); | 609 this.updateControlsState(); |
| 608 chrome.send('authExtensionLoaded'); | 610 chrome.send('authExtensionLoaded'); |
| 609 }, | 611 }, |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 916 }, | 918 }, |
| 917 | 919 |
| 918 /** | 920 /** |
| 919 * Clears input fields and switches to input mode. | 921 * Clears input fields and switches to input mode. |
| 920 * @param {boolean} takeFocus True to take focus. | 922 * @param {boolean} takeFocus True to take focus. |
| 921 * @param {boolean} forceOnline Whether online sign-in should be forced. | 923 * @param {boolean} forceOnline Whether online sign-in should be forced. |
| 922 * If |forceOnline| is false previously used sign-in type will be used. | 924 * If |forceOnline| is false previously used sign-in type will be used. |
| 923 */ | 925 */ |
| 924 reset: function(takeFocus, forceOnline) { | 926 reset: function(takeFocus, forceOnline) { |
| 925 // Reload and show the sign-in UI if needed. | 927 // Reload and show the sign-in UI if needed. |
| 926 this.gaiaAuthHost_.resetStates_(); | 928 this.gaiaAuthHost_.resetStates(); |
| 927 if (takeFocus) { | 929 if (takeFocus) { |
| 928 if (!forceOnline && this.isOffline()) { | 930 if (!forceOnline && this.isOffline()) { |
| 929 // Show 'Cancel' button to allow user to return to the main screen | 931 // Show 'Cancel' button to allow user to return to the main screen |
| 930 // (e.g. this makes sense when connection is back). | 932 // (e.g. this makes sense when connection is back). |
| 931 Oobe.getInstance().headerHidden = false; | 933 Oobe.getInstance().headerHidden = false; |
| 932 $('login-header-bar').signinUIState = SIGNIN_UI_STATE.GAIA_SIGNIN; | 934 $('login-header-bar').signinUIState = SIGNIN_UI_STATE.GAIA_SIGNIN; |
| 933 // Do nothing, since offline version is reloaded after an error comes. | 935 // Do nothing, since offline version is reloaded after an error comes. |
| 934 } else { | 936 } else { |
| 935 Oobe.showSigninUI(); | 937 Oobe.showSigninUI(); |
| 936 } | 938 } |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1040 this.classList.toggle('whitelist-error', show); | 1042 this.classList.toggle('whitelist-error', show); |
| 1041 this.loading = !show; | 1043 this.loading = !show; |
| 1042 | 1044 |
| 1043 if (!show) | 1045 if (!show) |
| 1044 Oobe.showSigninUI(); | 1046 Oobe.showSigninUI(); |
| 1045 | 1047 |
| 1046 this.updateControlsState(); | 1048 this.updateControlsState(); |
| 1047 } | 1049 } |
| 1048 }; | 1050 }; |
| 1049 }); | 1051 }); |
| OLD | NEW |