Chromium Code Reviews| 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 307 var msg = e.data; | 307 var msg = e.data; |
| 308 console.log('GaiaSigninScreen.onMessage_: method=' + msg.method); | 308 console.log('GaiaSigninScreen.onMessage_: method=' + msg.method); |
| 309 | 309 |
| 310 if (msg.method == 'completeLogin') { | 310 if (msg.method == 'completeLogin') { |
| 311 chrome.send('completeLogin', [msg.email, msg.password]); | 311 chrome.send('completeLogin', [msg.email, msg.password]); |
| 312 this.loading = true; | 312 this.loading = true; |
| 313 // Now that we're in logged in state header should be hidden. | 313 // Now that we're in logged in state header should be hidden. |
| 314 Oobe.getInstance().headerHidden = true; | 314 Oobe.getInstance().headerHidden = true; |
| 315 // Clear any error messages that were shown before login. | 315 // Clear any error messages that were shown before login. |
| 316 Oobe.clearErrors(); | 316 Oobe.clearErrors(); |
| 317 } else if (msg.method == 'completeAuthentication') { | |
| 318 chrome.send('completeAuthentication', [msg.email, msg.authCode]); | |
|
xiyuan
2013/03/20 20:08:29
nit: 2-space indent from previous line.
zel
2013/03/20 21:03:38
Done.
| |
| 319 this.loading = true; | |
| 320 // Now that we're in logged in state header should be hidden. | |
| 321 Oobe.getInstance().headerHidden = true; | |
| 322 // Clear any error messages that were shown before login. | |
| 323 Oobe.clearErrors(); | |
| 317 } else if (msg.method == 'loginUILoaded') { | 324 } else if (msg.method == 'loginUILoaded') { |
| 318 this.loading = false; | 325 this.loading = false; |
| 319 chrome.send('loginScreenUpdate'); | 326 chrome.send('loginScreenUpdate'); |
| 320 this.clearLoadingTimer_(); | 327 this.clearLoadingTimer_(); |
| 321 // Show deferred error bubble. | 328 // Show deferred error bubble. |
| 322 if (this.errorBubble_) { | 329 if (this.errorBubble_) { |
| 323 this.showErrorBubble(this.errorBubble_[0], this.errorBubble_[1]); | 330 this.showErrorBubble(this.errorBubble_[0], this.errorBubble_[1]); |
| 324 this.errorBubble_ = undefined; | 331 this.errorBubble_ = undefined; |
| 325 } | 332 } |
| 326 chrome.send('loginWebuiReady'); | 333 chrome.send('loginWebuiReady'); |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 479 // Check current network state if currentScreen is a Gaia signin. | 486 // Check current network state if currentScreen is a Gaia signin. |
| 480 var currentScreen = Oobe.getInstance().currentScreen; | 487 var currentScreen = Oobe.getInstance().currentScreen; |
| 481 if (currentScreen.id == SCREEN_GAIA_SIGNIN) | 488 if (currentScreen.id == SCREEN_GAIA_SIGNIN) |
| 482 chrome.send('showGaiaFrameError', [error]); | 489 chrome.send('showGaiaFrameError', [error]); |
| 483 }; | 490 }; |
| 484 | 491 |
| 485 return { | 492 return { |
| 486 GaiaSigninScreen: GaiaSigninScreen | 493 GaiaSigninScreen: GaiaSigninScreen |
| 487 }; | 494 }; |
| 488 }); | 495 }); |
| OLD | NEW |