Chromium Code Reviews| Index: chrome/browser/resources/chromeos/login/screen_gaia_signin.js |
| diff --git a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js |
| index 9e1bfef194313d66ad2abe023e6124410bcd3ffb..bdc8e336a911d8956a60f7170c08d2a0d6e89733 100644 |
| --- a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js |
| +++ b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js |
| @@ -27,7 +27,8 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { |
| 'onWebviewError', |
| 'onFrameError', |
| 'updateCancelButtonState', |
| - 'showWhitelistCheckFailedError' |
| + 'showWhitelistCheckFailedError', |
| + 'updateDeviceId', |
| ], |
| /** |
| @@ -131,6 +132,8 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { |
| 'backButton', this.onBackButton_.bind(this)); |
| this.gaiaAuthHost_.addEventListener( |
| 'showView', this.onShowView_.bind(this)); |
| + this.gaiaAuthHost_.addEventListener('attemptLogin', |
| + this.onAttemptLogin_.bind(this)); |
| this.gaiaAuthHost_.confirmPasswordCallback = |
| this.onAuthConfirmPassword_.bind(this); |
| this.gaiaAuthHost_.noPasswordCallback = |
| @@ -547,6 +550,14 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { |
| }, |
| /** |
| + * Invoked when the auth host emits 'attemptLogin' event. |
|
Nikita (slow)
2015/04/22 16:51:52
nit: Add information about parameter.
Alexander Alekseev
2015/04/22 17:58:07
Done.
|
| + * @private |
| + */ |
| + onAttemptLogin_: function(e) { |
| + chrome.send('attemptLogin', [e.detail]); |
| + }, |
| + |
| + /** |
| * Invoked when the user has successfully authenticated via SAML, the |
| * principals API was not used and the auth host needs the user to confirm |
| * the scraped password. |
| @@ -856,5 +867,17 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { |
| if (!show) |
| Oobe.showSigninUI(); |
| }, |
| + |
| + /** |
| + * Inform Gaia of new deviceId. |
| + * @param {data} Object like {'deviceId': 'test-device-id'} |
| + */ |
| + updateDeviceId: function(data) { |
| + if (!this.isNewGaiaFlow) |
| + return; |
| + |
| + if (data && data.deviceId) |
| + this.gaiaAuthHost_.updateDeviceId(data.deviceId); |
| + }, |
| }; |
| }); |