OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 login.createScreen('OAuthEnrollmentScreen', 'oauth-enrollment', function() { | 5 login.createScreen('OAuthEnrollmentScreen', 'oauth-enrollment', function() { |
6 /** @const */ var STEP_SIGNIN = 'signin'; | 6 /** @const */ var STEP_SIGNIN = 'signin'; |
7 /** @const */ var STEP_WORKING = 'working'; | 7 /** @const */ var STEP_WORKING = 'working'; |
8 /** @const */ var STEP_ERROR = 'error'; | 8 /** @const */ var STEP_ERROR = 'error'; |
9 /** @const */ var STEP_SUCCESS = 'success'; | 9 /** @const */ var STEP_SUCCESS = 'success'; |
10 | 10 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 this.authenticator_.addEventListener('authFlowChange', | 72 this.authenticator_.addEventListener('authFlowChange', |
73 (function(e) { | 73 (function(e) { |
74 var isSAML = this.authenticator_.authFlow == | 74 var isSAML = this.authenticator_.authFlow == |
75 cr.login.Authenticator.AuthFlow.SAML; | 75 cr.login.Authenticator.AuthFlow.SAML; |
76 if (isSAML) { | 76 if (isSAML) { |
77 $('oauth-saml-notice-message').textContent = | 77 $('oauth-saml-notice-message').textContent = |
78 loadTimeData.getStringF('samlNotice', | 78 loadTimeData.getStringF('samlNotice', |
79 this.authenticator_.authDomain); | 79 this.authenticator_.authDomain); |
80 } | 80 } |
81 this.classList.toggle('saml', isSAML); | 81 this.classList.toggle('saml', isSAML); |
| 82 if (Oobe.getInstance().currentScreen === this) |
| 83 Oobe.getInstance().updateScreenSize(this); |
82 }).bind(this)); | 84 }).bind(this)); |
83 | 85 |
84 this.authenticator_.addEventListener('backButton', | 86 this.authenticator_.addEventListener('backButton', |
85 (function(e) { | 87 (function(e) { |
86 $('oauth-enroll-back-button').hidden = !e.detail; | 88 $('oauth-enroll-back-button').hidden = !e.detail; |
87 }).bind(this)); | 89 }).bind(this)); |
88 | 90 |
89 this.authenticator_.insecureContentBlockedCallback = | 91 this.authenticator_.insecureContentBlockedCallback = |
90 (function(url) { | 92 (function(url) { |
91 this.showError( | 93 this.showError( |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 * Retries the enrollment process after an error occurred in a previous | 228 * Retries the enrollment process after an error occurred in a previous |
227 * attempt. This goes to the C++ side through |chrome| first to clean up the | 229 * attempt. This goes to the C++ side through |chrome| first to clean up the |
228 * profile, so that the next attempt is performed with a clean state. | 230 * profile, so that the next attempt is performed with a clean state. |
229 */ | 231 */ |
230 doRetry_: function() { | 232 doRetry_: function() { |
231 chrome.send('oauthEnrollRetry'); | 233 chrome.send('oauthEnrollRetry'); |
232 } | 234 } |
233 }; | 235 }; |
234 }); | 236 }); |
235 | 237 |
OLD | NEW |