| 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 cr.define('login', function() { | 9 cr.define('login', function() { |
| 10 // Gaia loading time after which portal check should be fired. | 10 // Gaia loading time after which portal check should be fired. |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 } | 287 } |
| 288 | 288 |
| 289 var msg = e.data; | 289 var msg = e.data; |
| 290 console.log('GaiaSigninScreen.onMessage_: method=' + msg.method); | 290 console.log('GaiaSigninScreen.onMessage_: method=' + msg.method); |
| 291 | 291 |
| 292 if (msg.method == 'completeLogin') { | 292 if (msg.method == 'completeLogin') { |
| 293 chrome.send('completeLogin', [msg.email, msg.password]); | 293 chrome.send('completeLogin', [msg.email, msg.password]); |
| 294 this.loading = true; | 294 this.loading = true; |
| 295 // Now that we're in logged in state header should be hidden. | 295 // Now that we're in logged in state header should be hidden. |
| 296 Oobe.getInstance().headerHidden = true; | 296 Oobe.getInstance().headerHidden = true; |
| 297 // Clear any error messages that were shown before login. |
| 298 Oobe.clearErrors(); |
| 297 } else if (msg.method == 'loginUILoaded') { | 299 } else if (msg.method == 'loginUILoaded') { |
| 298 this.loading = false; | 300 this.loading = false; |
| 299 $('error-message').update(); | 301 $('error-message').update(); |
| 300 this.clearLoadingTimer_(); | 302 this.clearLoadingTimer_(); |
| 301 // Show deferred error bubble. | 303 // Show deferred error bubble. |
| 302 if (this.errorBubble_) { | 304 if (this.errorBubble_) { |
| 303 this.showErrorBubble(this.errorBubble_[0], this.errorBubble_[1]); | 305 this.showErrorBubble(this.errorBubble_[0], this.errorBubble_[1]); |
| 304 this.errorBubble_ = undefined; | 306 this.errorBubble_ = undefined; |
| 305 } | 307 } |
| 306 this.clearRetry_(); | 308 this.clearRetry_(); |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 * @param {Object} data New extension parameters bag. | 446 * @param {Object} data New extension parameters bag. |
| 445 */ | 447 */ |
| 446 GaiaSigninScreen.updateAuthExtension = function(data) { | 448 GaiaSigninScreen.updateAuthExtension = function(data) { |
| 447 $('gaia-signin').updateAuthExtension_(data); | 449 $('gaia-signin').updateAuthExtension_(data); |
| 448 }; | 450 }; |
| 449 | 451 |
| 450 return { | 452 return { |
| 451 GaiaSigninScreen: GaiaSigninScreen | 453 GaiaSigninScreen: GaiaSigninScreen |
| 452 }; | 454 }; |
| 453 }); | 455 }); |
| OLD | NEW |