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"></include> | 9 <include src="../../gaia_auth_host/gaia_auth_host.js"></include> |
10 | 10 |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 this.email = credentials.email; | 415 this.email = credentials.email; |
416 chrome.send('authenticateUser', | 416 chrome.send('authenticateUser', |
417 [credentials.email, credentials.password]); | 417 [credentials.email, credentials.password]); |
418 } else if (credentials.authCode) { | 418 } else if (credentials.authCode) { |
419 chrome.send('completeAuthentication', | 419 chrome.send('completeAuthentication', |
420 [credentials.email, | 420 [credentials.email, |
421 credentials.password, | 421 credentials.password, |
422 credentials.authCode]); | 422 credentials.authCode]); |
423 } else { | 423 } else { |
424 chrome.send('completeLogin', | 424 chrome.send('completeLogin', |
425 [credentials.email, | 425 [credentials.email, credentials.password]); |
426 credentials.password, | |
427 credentials.usingSAML]); | |
428 } | 426 } |
429 | 427 |
430 this.loading = true; | 428 this.loading = true; |
431 // Now that we're in logged in state header should be hidden. | 429 // Now that we're in logged in state header should be hidden. |
432 Oobe.getInstance().headerHidden = true; | 430 Oobe.getInstance().headerHidden = true; |
433 // Clear any error messages that were shown before login. | 431 // Clear any error messages that were shown before login. |
434 Oobe.clearErrors(); | 432 Oobe.clearErrors(); |
435 }, | 433 }, |
436 | 434 |
437 /** | 435 /** |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 * Handler for iframe's error notification coming from the outside. | 545 * Handler for iframe's error notification coming from the outside. |
548 * For more info see C++ class 'SnifferObserver' which calls this method. | 546 * For more info see C++ class 'SnifferObserver' which calls this method. |
549 * @param {number} error Error code. | 547 * @param {number} error Error code. |
550 */ | 548 */ |
551 onFrameError: function(error) { | 549 onFrameError: function(error) { |
552 this.error_ = error; | 550 this.error_ = error; |
553 chrome.send('frameLoadingCompleted', [this.error_]); | 551 chrome.send('frameLoadingCompleted', [this.error_]); |
554 }, | 552 }, |
555 }; | 553 }; |
556 }); | 554 }); |
OLD | NEW |