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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 } | 273 } |
274 | 274 |
275 var msg = e.data; | 275 var msg = e.data; |
276 console.log('GaiaSigninScreen.onMessage_: method=' + msg.method); | 276 console.log('GaiaSigninScreen.onMessage_: method=' + msg.method); |
277 | 277 |
278 if (msg.method == 'completeLogin') { | 278 if (msg.method == 'completeLogin') { |
279 chrome.send('completeLogin', [msg.email, msg.password]); | 279 chrome.send('completeLogin', [msg.email, msg.password]); |
280 this.loading = true; | 280 this.loading = true; |
281 // Now that we're in logged in state header should be hidden. | 281 // Now that we're in logged in state header should be hidden. |
282 Oobe.getInstance().headerHidden = true; | 282 Oobe.getInstance().headerHidden = true; |
| 283 // Clear any error messages that were shown before login. |
| 284 Oobe.clearErrors(); |
283 } else if (msg.method == 'loginUILoaded') { | 285 } else if (msg.method == 'loginUILoaded') { |
284 this.loading = false; | 286 this.loading = false; |
285 $('error-message').update(); | 287 $('error-message').update(); |
286 this.clearLoadingTimer_(); | 288 this.clearLoadingTimer_(); |
287 // Show deferred error bubble. | 289 // Show deferred error bubble. |
288 if (this.errorBubble_) { | 290 if (this.errorBubble_) { |
289 this.showErrorBubble(this.errorBubble_[0], this.errorBubble_[1]); | 291 this.showErrorBubble(this.errorBubble_[0], this.errorBubble_[1]); |
290 this.errorBubble_ = undefined; | 292 this.errorBubble_ = undefined; |
291 } | 293 } |
292 this.clearRetry_(); | 294 this.clearRetry_(); |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 * @param {Object} data New extension parameters bag. | 432 * @param {Object} data New extension parameters bag. |
431 */ | 433 */ |
432 GaiaSigninScreen.updateAuthExtension = function(data) { | 434 GaiaSigninScreen.updateAuthExtension = function(data) { |
433 $('gaia-signin').updateAuthExtension_(data); | 435 $('gaia-signin').updateAuthExtension_(data); |
434 }; | 436 }; |
435 | 437 |
436 return { | 438 return { |
437 GaiaSigninScreen: GaiaSigninScreen | 439 GaiaSigninScreen: GaiaSigninScreen |
438 }; | 440 }; |
439 }); | 441 }); |
OLD | NEW |