| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 decorate: function() { | 104 decorate: function() { |
| 105 this.isWebviewSignin = loadTimeData.getValue('isWebviewSignin'); | 105 this.isWebviewSignin = loadTimeData.getValue('isWebviewSignin'); |
| 106 if (this.isWebviewSignin) { | 106 if (this.isWebviewSignin) { |
| 107 // Replace iframe with webview. | 107 // Replace iframe with webview. |
| 108 var webview = this.ownerDocument.createElement('webview'); | 108 var webview = this.ownerDocument.createElement('webview'); |
| 109 webview.id = 'signin-frame'; | 109 webview.id = 'signin-frame'; |
| 110 webview.name = 'signin-frame'; | 110 webview.name = 'signin-frame'; |
| 111 webview.hidden = true; | 111 webview.hidden = true; |
| 112 $('signin-frame').parentNode.replaceChild(webview, $('signin-frame')); | 112 $('signin-frame').parentNode.replaceChild(webview, $('signin-frame')); |
| 113 this.gaiaAuthHost_ = new cr.login.GaiaAuthHost(webview); | 113 this.gaiaAuthHost_ = new cr.login.GaiaAuthHost(webview); |
| 114 cr.login.SamlHandler.setSamlInjectedJs( |
| 115 loadTimeData.getString('samlInjectedJS')); |
| 114 } else { | 116 } else { |
| 115 this.gaiaAuthHost_ = new cr.login.GaiaAuthHost($('signin-frame')); | 117 this.gaiaAuthHost_ = new cr.login.GaiaAuthHost($('signin-frame')); |
| 116 } | 118 } |
| 117 this.gaiaAuthHost_.addEventListener( | 119 this.gaiaAuthHost_.addEventListener( |
| 118 'ready', this.onAuthReady_.bind(this)); | 120 'ready', this.onAuthReady_.bind(this)); |
| 119 this.gaiaAuthHost_.confirmPasswordCallback = | 121 this.gaiaAuthHost_.confirmPasswordCallback = |
| 120 this.onAuthConfirmPassword_.bind(this); | 122 this.onAuthConfirmPassword_.bind(this); |
| 121 this.gaiaAuthHost_.noPasswordCallback = | 123 this.gaiaAuthHost_.noPasswordCallback = |
| 122 this.onAuthNoPassword_.bind(this); | 124 this.onAuthNoPassword_.bind(this); |
| 123 this.gaiaAuthHost_.insecureContentBlockedCallback = | 125 this.gaiaAuthHost_.insecureContentBlockedCallback = |
| (...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 * For more info see C++ class 'WebUILoginView' which calls this method. | 713 * For more info see C++ class 'WebUILoginView' which calls this method. |
| 712 * @param {number} error Error code. | 714 * @param {number} error Error code. |
| 713 * @param {string} url The URL that failed to load. | 715 * @param {string} url The URL that failed to load. |
| 714 */ | 716 */ |
| 715 onFrameError: function(error, url) { | 717 onFrameError: function(error, url) { |
| 716 this.error_ = error; | 718 this.error_ = error; |
| 717 chrome.send('frameLoadingCompleted', [this.error_]); | 719 chrome.send('frameLoadingCompleted', [this.error_]); |
| 718 }, | 720 }, |
| 719 }; | 721 }; |
| 720 }); | 722 }); |
| OLD | NEW |