| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 | 10 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 var frame = $('signin-frame'); | 90 var frame = $('signin-frame'); |
| 91 frame.addEventListener('load', function(e) { | 91 frame.addEventListener('load', function(e) { |
| 92 console.log('Frame loaded: ' + data.startUrl); | 92 console.log('Frame loaded: ' + data.startUrl); |
| 93 }); | 93 }); |
| 94 | 94 |
| 95 var params = []; | 95 var params = []; |
| 96 if (data.hl) | 96 if (data.hl) |
| 97 params.push('hl=' + encodeURIComponent(data.hl)); | 97 params.push('hl=' + encodeURIComponent(data.hl)); |
| 98 if (data.email) | 98 if (data.email) |
| 99 params.push('email=' + encodeURIComponent(data.email)); | 99 params.push('email=' + encodeURIComponent(data.email)); |
| 100 if (data.test_email) |
| 101 params.push('test_email=' + encodeURIComponent(data.test_email)); |
| 102 if (data.test_password) |
| 103 params.push('test_password=' + encodeURIComponent(data.test_password)); |
| 100 | 104 |
| 101 var url = data.startUrl; | 105 var url = data.startUrl; |
| 102 if (params.length) | 106 if (params.length) |
| 103 url += '?' + params.join('&'); | 107 url += '?' + params.join('&'); |
| 104 | 108 |
| 105 frame.contentWindow.location.href = url; | 109 frame.contentWindow.location.href = url; |
| 106 this.extension_url_ = url; | 110 this.extension_url_ = url; |
| 107 | 111 |
| 108 $('createAccount').hidden = !data.createAccount; | 112 $('createAccount').hidden = !data.createAccount; |
| 109 $('guestSignin').hidden = !data.guestSignin; | 113 $('guestSignin').hidden = !data.guestSignin; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // Reload and show the sign-in UI if needed. | 148 // Reload and show the sign-in UI if needed. |
| 145 if (takeFocus) | 149 if (takeFocus) |
| 146 Oobe.showSigninUI(); | 150 Oobe.showSigninUI(); |
| 147 } | 151 } |
| 148 }; | 152 }; |
| 149 | 153 |
| 150 return { | 154 return { |
| 151 GaiaSigninScreen: GaiaSigninScreen | 155 GaiaSigninScreen: GaiaSigninScreen |
| 152 }; | 156 }; |
| 153 }); | 157 }); |
| OLD | NEW |