| 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 <include src="../../gaia_auth_host/gaia_auth_host.js"> | 9 <include src="../../gaia_auth_host/gaia_auth_host.js"> |
| 10 | 10 |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 | 504 |
| 505 /** | 505 /** |
| 506 * Invoked when auth is completed successfully. | 506 * Invoked when auth is completed successfully. |
| 507 * @param {!Object} credentials Credentials of the completed authentication. | 507 * @param {!Object} credentials Credentials of the completed authentication. |
| 508 * @private | 508 * @private |
| 509 */ | 509 */ |
| 510 onAuthCompleted_: function(credentials) { | 510 onAuthCompleted_: function(credentials) { |
| 511 if (credentials.useOffline) { | 511 if (credentials.useOffline) { |
| 512 this.email = credentials.email; | 512 this.email = credentials.email; |
| 513 chrome.send('authenticateUser', | 513 chrome.send('authenticateUser', |
| 514 [credentials.email, credentials.password]); | 514 [credentials.gaiaId, |
| 515 credentials.email, |
| 516 credentials.password]); |
| 515 } else if (credentials.authCode) { | 517 } else if (credentials.authCode) { |
| 516 chrome.send('completeAuthentication', | 518 chrome.send('completeAuthentication', |
| 517 [credentials.email, | 519 [credentials.gaiaId, |
| 520 credentials.email, |
| 518 credentials.password, | 521 credentials.password, |
| 519 credentials.authCode]); | 522 credentials.authCode]); |
| 520 } else { | 523 } else { |
| 521 chrome.send('completeLogin', | 524 chrome.send('completeLogin', |
| 522 [credentials.email, | 525 [credentials.gaiaId, |
| 526 credentials.email, |
| 523 credentials.password, | 527 credentials.password, |
| 524 credentials.usingSAML]); | 528 credentials.usingSAML]); |
| 525 } | 529 } |
| 526 | 530 |
| 527 this.loading = true; | 531 this.loading = true; |
| 528 // Now that we're in logged in state header should be hidden. | 532 // Now that we're in logged in state header should be hidden. |
| 529 Oobe.getInstance().headerHidden = true; | 533 Oobe.getInstance().headerHidden = true; |
| 530 // Clear any error messages that were shown before login. | 534 // Clear any error messages that were shown before login. |
| 531 Oobe.clearErrors(); | 535 Oobe.clearErrors(); |
| 532 }, | 536 }, |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 * For more info see C++ class 'WebUILoginView' which calls this method. | 652 * For more info see C++ class 'WebUILoginView' which calls this method. |
| 649 * @param {number} error Error code. | 653 * @param {number} error Error code. |
| 650 * @param {string} url The URL that failed to load. | 654 * @param {string} url The URL that failed to load. |
| 651 */ | 655 */ |
| 652 onFrameError: function(error, url) { | 656 onFrameError: function(error, url) { |
| 653 this.error_ = error; | 657 this.error_ = error; |
| 654 chrome.send('frameLoadingCompleted', [this.error_]); | 658 chrome.send('frameLoadingCompleted', [this.error_]); |
| 655 }, | 659 }, |
| 656 }; | 660 }; |
| 657 }); | 661 }); |
| OLD | NEW |