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) { | 292 if (data.gaiaEndpoint) { |
293 data.useEmbedded = false; | 293 data.useEmbedded = false; |
294 params.gaiaPath = 'ChromeOsEmbeddedSetup'; | 294 params.gaiaPath = data.gaiaEndpoint; |
295 } | 295 } |
296 | 296 |
297 if (data.useEmbedded) | 297 if (data.useEmbedded) |
298 params.gaiaPath = 'EmbeddedSignIn'; | 298 params.gaiaPath = 'EmbeddedSignIn'; |
299 | 299 |
300 if (data.forceReload || | 300 if (data.forceReload || |
301 JSON.stringify(this.gaiaAuthParams_) != JSON.stringify(params)) { | 301 JSON.stringify(this.gaiaAuthParams_) != JSON.stringify(params)) { |
302 this.error_ = 0; | 302 this.error_ = 0; |
303 | 303 |
304 var authMode = cr.login.GaiaAuthHost.AuthMode.DEFAULT; | 304 var authMode = cr.login.GaiaAuthHost.AuthMode.DEFAULT; |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 * For more info see C++ class 'WebUILoginView' which calls this method. | 675 * For more info see C++ class 'WebUILoginView' which calls this method. |
676 * @param {number} error Error code. | 676 * @param {number} error Error code. |
677 * @param {string} url The URL that failed to load. | 677 * @param {string} url The URL that failed to load. |
678 */ | 678 */ |
679 onFrameError: function(error, url) { | 679 onFrameError: function(error, url) { |
680 this.error_ = error; | 680 this.error_ = error; |
681 chrome.send('frameLoadingCompleted', [this.error_]); | 681 chrome.send('frameLoadingCompleted', [this.error_]); |
682 }, | 682 }, |
683 }; | 683 }; |
684 }); | 684 }); |
OLD | NEW |