| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_ATTRIBUTE_PROMPT = 'attribute-prompt'; | 8 /** @const */ var STEP_ATTRIBUTE_PROMPT = 'attribute-prompt'; |
| 9 /** @const */ var STEP_ERROR = 'error'; | 9 /** @const */ var STEP_ERROR = 'error'; |
| 10 /** @const */ var STEP_SUCCESS = 'success'; | 10 /** @const */ var STEP_SUCCESS = 'success'; |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 | 170 |
| 171 return buttons; | 171 return buttons; |
| 172 }, | 172 }, |
| 173 | 173 |
| 174 /** | 174 /** |
| 175 * Event handler that is invoked just before the frame is shown. | 175 * Event handler that is invoked just before the frame is shown. |
| 176 * @param {Object} data Screen init payload, contains the signin frame | 176 * @param {Object} data Screen init payload, contains the signin frame |
| 177 * URL. | 177 * URL. |
| 178 */ | 178 */ |
| 179 onBeforeShow: function(data) { | 179 onBeforeShow: function(data) { |
| 180 $('inner-container').classList.add('new-gaia-flow'); |
| 180 var gaiaParams = {}; | 181 var gaiaParams = {}; |
| 181 gaiaParams.gaiaUrl = data.gaiaUrl; | 182 gaiaParams.gaiaUrl = data.gaiaUrl; |
| 182 gaiaParams.gaiaPath = 'embedded/setup/chromeos'; | 183 gaiaParams.gaiaPath = 'embedded/setup/chromeos'; |
| 183 gaiaParams.isNewGaiaFlowChromeOS = true; | 184 gaiaParams.isNewGaiaFlowChromeOS = true; |
| 184 gaiaParams.needPassword = false; | 185 gaiaParams.needPassword = false; |
| 185 if (data.management_domain) { | 186 if (data.management_domain) { |
| 186 gaiaParams.enterpriseDomain = data.management_domain; | 187 gaiaParams.enterpriseDomain = data.management_domain; |
| 187 gaiaParams.emailDomain = data.management_domain; | 188 gaiaParams.emailDomain = data.management_domain; |
| 188 } | 189 } |
| 189 gaiaParams.flow = 'enterprise'; | 190 gaiaParams.flow = 'enterprise'; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 * Uploads the device attributes to server. This goes to C++ side through | 285 * Uploads the device attributes to server. This goes to C++ side through |
| 285 * |chrome| and launches the device attribute update negotiation. | 286 * |chrome| and launches the device attribute update negotiation. |
| 286 */ | 287 */ |
| 287 onAttributesSubmitted: function() { | 288 onAttributesSubmitted: function() { |
| 288 chrome.send('oauthEnrollAttributes', | 289 chrome.send('oauthEnrollAttributes', |
| 289 [$('oauth-enroll-asset-id').value, | 290 [$('oauth-enroll-asset-id').value, |
| 290 $('oauth-enroll-location').value]); | 291 $('oauth-enroll-location').value]); |
| 291 } | 292 } |
| 292 }; | 293 }; |
| 293 }); | 294 }); |
| OLD | NEW |