| 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 login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { | 9 login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { |
| 10 // Gaia loading time after which error message must be displayed and | 10 // Gaia loading time after which error message must be displayed and |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 var params = {}; | 282 var params = {}; |
| 283 for (var i in cr.login.GaiaAuthHost.SUPPORTED_PARAMS) { | 283 for (var i in cr.login.GaiaAuthHost.SUPPORTED_PARAMS) { |
| 284 var name = cr.login.GaiaAuthHost.SUPPORTED_PARAMS[i]; | 284 var name = cr.login.GaiaAuthHost.SUPPORTED_PARAMS[i]; |
| 285 if (data[name]) | 285 if (data[name]) |
| 286 params[name] = data[name]; | 286 params[name] = data[name]; |
| 287 } | 287 } |
| 288 | 288 |
| 289 if (data.localizedStrings) | 289 if (data.localizedStrings) |
| 290 params.localizedStrings = data.localizedStrings; | 290 params.localizedStrings = data.localizedStrings; |
| 291 | 291 |
| 292 if (this.isWebviewSignin) { |
| 293 data.useEmbedded = false; |
| 294 params.gaiaPath = 'ChromeOsEmbeddedSetup'; |
| 295 } |
| 296 |
| 292 if (data.useEmbedded) | 297 if (data.useEmbedded) |
| 293 params.gaiaPath = 'EmbeddedSignIn'; | 298 params.gaiaPath = 'EmbeddedSignIn'; |
| 294 | 299 |
| 295 if (data.forceReload || | 300 if (data.forceReload || |
| 296 JSON.stringify(this.gaiaAuthParams_) != JSON.stringify(params)) { | 301 JSON.stringify(this.gaiaAuthParams_) != JSON.stringify(params)) { |
| 297 this.error_ = 0; | 302 this.error_ = 0; |
| 298 | 303 |
| 299 var authMode = cr.login.GaiaAuthHost.AuthMode.DEFAULT; | 304 var authMode = cr.login.GaiaAuthHost.AuthMode.DEFAULT; |
| 300 if (data.useOffline) | 305 if (data.useOffline) |
| 301 authMode = cr.login.GaiaAuthHost.AuthMode.OFFLINE; | 306 authMode = cr.login.GaiaAuthHost.AuthMode.OFFLINE; |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 * For more info see C++ class 'WebUILoginView' which calls this method. | 675 * For more info see C++ class 'WebUILoginView' which calls this method. |
| 671 * @param {number} error Error code. | 676 * @param {number} error Error code. |
| 672 * @param {string} url The URL that failed to load. | 677 * @param {string} url The URL that failed to load. |
| 673 */ | 678 */ |
| 674 onFrameError: function(error, url) { | 679 onFrameError: function(error, url) { |
| 675 this.error_ = error; | 680 this.error_ = error; |
| 676 chrome.send('frameLoadingCompleted', [this.error_]); | 681 chrome.send('frameLoadingCompleted', [this.error_]); |
| 677 }, | 682 }, |
| 678 }; | 683 }; |
| 679 }); | 684 }); |
| OLD | NEW |