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 login.createScreen('OAuthEnrollmentScreen', 'oauth-enrollment', function() { | 5 login.createScreen('OAuthEnrollmentScreen', 'oauth-enrollment', function() { |
6 /** @const */ var STEP_SIGNIN = 'signin'; | 6 /** @const */ var STEP_SIGNIN = 'signin'; |
7 /** @const */ var STEP_WORKING = 'working'; | 7 /** @const */ var STEP_WORKING = 'working'; |
8 /** @const */ var STEP_ERROR = 'error'; | 8 /** @const */ var STEP_ERROR = 'error'; |
9 /** @const */ var STEP_SUCCESS = 'success'; | 9 /** @const */ var STEP_SUCCESS = 'success'; |
10 | 10 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 }, | 125 }, |
126 | 126 |
127 /** | 127 /** |
128 * Event handler that is invoked just before the frame is shown. | 128 * Event handler that is invoked just before the frame is shown. |
129 * @param {Object} data Screen init payload, contains the signin frame | 129 * @param {Object} data Screen init payload, contains the signin frame |
130 * URL. | 130 * URL. |
131 */ | 131 */ |
132 onBeforeShow: function(data) { | 132 onBeforeShow: function(data) { |
133 var url = data.signin_url; | 133 var url = data.signin_url; |
134 url += '?gaiaUrl=' + encodeURIComponent(data.gaiaUrl); | 134 url += '?gaiaUrl=' + encodeURIComponent(data.gaiaUrl); |
| 135 url += '&needPassword=0'; |
135 this.signInUrl_ = url; | 136 this.signInUrl_ = url; |
136 var modes = ['manual', 'forced', 'recovery']; | 137 var modes = ['manual', 'forced', 'recovery']; |
137 for (var i = 0; i < modes.length; ++i) { | 138 for (var i = 0; i < modes.length; ++i) { |
138 this.classList.toggle('mode-' + modes[i], | 139 this.classList.toggle('mode-' + modes[i], |
139 data.enrollment_mode == modes[i]); | 140 data.enrollment_mode == modes[i]); |
140 } | 141 } |
141 this.managementDomain_ = data.management_domain; | 142 this.managementDomain_ = data.management_domain; |
142 $('oauth-enroll-signin-frame').contentWindow.location.href = | 143 $('oauth-enroll-signin-frame').contentWindow.location.href = |
143 this.signInUrl_; | 144 this.signInUrl_; |
144 this.updateLocalizedContent(); | 145 this.updateLocalizedContent(); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 | 250 |
250 if (msg.method == 'missingGaiaInfo') { | 251 if (msg.method == 'missingGaiaInfo') { |
251 this.showError( | 252 this.showError( |
252 loadTimeData.getString('fatalEnrollmentError'), | 253 loadTimeData.getString('fatalEnrollmentError'), |
253 false); | 254 false); |
254 } | 255 } |
255 } | 256 } |
256 }; | 257 }; |
257 }); | 258 }); |
258 | 259 |
OLD | NEW |