| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 * @param {boolean} show True to show loading UI. | 187 * @param {boolean} show True to show loading UI. |
| 188 * @private | 188 * @private |
| 189 */ | 189 */ |
| 190 showLoadingUI_: function(show) { | 190 showLoadingUI_: function(show) { |
| 191 $('gaia-loading').hidden = !show; | 191 $('gaia-loading').hidden = !show; |
| 192 $('signin-frame').hidden = show; | 192 $('signin-frame').hidden = show; |
| 193 $('signin-right').hidden = show; | 193 $('signin-right').hidden = show; |
| 194 $('enterprise-info-container').hidden = show; | 194 $('enterprise-info-container').hidden = show; |
| 195 $('gaia-signin-divider').hidden = show; | 195 $('gaia-signin-divider').hidden = show; |
| 196 this.classList.toggle('loading', show); | 196 this.classList.toggle('loading', show); |
| 197 if (!show) |
| 198 this.classList.remove('auth-completed'); |
| 197 }, | 199 }, |
| 198 | 200 |
| 199 /** | 201 /** |
| 200 * Handler for Gaia loading suspiciously long timeout. | 202 * Handler for Gaia loading suspiciously long timeout. |
| 201 * @private | 203 * @private |
| 202 */ | 204 */ |
| 203 onLoadingSuspiciouslyLong_: function() { | 205 onLoadingSuspiciouslyLong_: function() { |
| 204 if (this != Oobe.getInstance().currentScreen) | 206 if (this != Oobe.getInstance().currentScreen) |
| 205 return; | 207 return; |
| 206 chrome.send('showLoadingTimeoutError'); | 208 chrome.send('showLoadingTimeoutError'); |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 } | 609 } |
| 608 } else { | 610 } else { |
| 609 chrome.send('completeLogin', | 611 chrome.send('completeLogin', |
| 610 [credentials.gaiaId, | 612 [credentials.gaiaId, |
| 611 credentials.email, | 613 credentials.email, |
| 612 credentials.password, | 614 credentials.password, |
| 613 credentials.usingSAML]); | 615 credentials.usingSAML]); |
| 614 } | 616 } |
| 615 | 617 |
| 616 this.loading = true; | 618 this.loading = true; |
| 619 this.classList.add('auth-completed'); |
| 617 // Now that we're in logged in state header should be hidden. | 620 // Now that we're in logged in state header should be hidden. |
| 618 Oobe.getInstance().headerHidden = true; | 621 Oobe.getInstance().headerHidden = true; |
| 619 // Clear any error messages that were shown before login. | 622 // Clear any error messages that were shown before login. |
| 620 Oobe.clearErrors(); | 623 Oobe.clearErrors(); |
| 621 }, | 624 }, |
| 622 | 625 |
| 623 /** | 626 /** |
| 624 * Invoked when onAuthCompleted message received. | 627 * Invoked when onAuthCompleted message received. |
| 625 * @param {!Object} e Payload of the received HTML5 message. | 628 * @param {!Object} e Payload of the received HTML5 message. |
| 626 * @private | 629 * @private |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 * Handler for webview error handling. | 768 * Handler for webview error handling. |
| 766 * @param {!Object} data Additional information about error event like: | 769 * @param {!Object} data Additional information about error event like: |
| 767 * {string} error Error code such as "ERR_INTERNET_DISCONNECTED". | 770 * {string} error Error code such as "ERR_INTERNET_DISCONNECTED". |
| 768 * {string} url The URL that failed to load. | 771 * {string} url The URL that failed to load. |
| 769 */ | 772 */ |
| 770 onWebviewError: function(data) { | 773 onWebviewError: function(data) { |
| 771 chrome.send('webviewLoadAborted', [data.error]); | 774 chrome.send('webviewLoadAborted', [data.error]); |
| 772 }, | 775 }, |
| 773 }; | 776 }; |
| 774 }); | 777 }); |
| OLD | NEW |