| 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 /* Code which is embedded inside of the webview. See below for details. | 6 /* Code which is embedded inside of the webview. See below for details. |
| 7 /** @const */ var INJECTED_WEBVIEW_SCRIPT = String.raw` | 7 /** @const */ var INJECTED_WEBVIEW_SCRIPT = String.raw` |
| 8 (function() { | 8 (function() { |
| 9 <include src="../keyboard/keyboard_utils.js"> | 9 <include src="../keyboard/keyboard_utils.js"> |
| 10 keyboard.initializeKeyboardFlow(true); | 10 keyboard.initializeKeyboardFlow(true); |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 showAttributePromptStep: function(annotatedAssetId, annotatedLocation) { | 249 showAttributePromptStep: function(annotatedAssetId, annotatedLocation) { |
| 250 $('oauth-enroll-asset-id').value = annotatedAssetId; | 250 $('oauth-enroll-asset-id').value = annotatedAssetId; |
| 251 $('oauth-enroll-location').value = annotatedLocation; | 251 $('oauth-enroll-location').value = annotatedLocation; |
| 252 this.showStep(STEP_ATTRIBUTE_PROMPT); | 252 this.showStep(STEP_ATTRIBUTE_PROMPT); |
| 253 }, | 253 }, |
| 254 | 254 |
| 255 /** | 255 /** |
| 256 * Shows a success card for attestation-based enrollment that shows | 256 * Shows a success card for attestation-based enrollment that shows |
| 257 * which domain the device was enrolled into. | 257 * which domain the device was enrolled into. |
| 258 */ | 258 */ |
| 259 showAttestationBasedEnrollmentSuccess: function(enterpriseDomain) { | 259 showAttestationBasedEnrollmentSuccess: function(device, enterpriseDomain) { |
| 260 $('oauth-enroll-abe-success-card').innerHTML = | 260 $('oauth-enroll-abe-success-card').innerHTML = loadTimeData.getStringF( |
| 261 loadTimeData.getStringF('oauthEnrollAbeSuccess', enterpriseDomain); | 261 'oauthEnrollAbeSuccess', device, enterpriseDomain); |
| 262 this.showStep(STEP_ABE_SUCCESS); | 262 this.showStep(STEP_ABE_SUCCESS); |
| 263 }, | 263 }, |
| 264 | 264 |
| 265 /** | 265 /** |
| 266 * Cancels the current authentication and drops the user back to the next | 266 * Cancels the current authentication and drops the user back to the next |
| 267 * screen (either the next authentication or the login screen). | 267 * screen (either the next authentication or the login screen). |
| 268 */ | 268 */ |
| 269 cancel: function() { | 269 cancel: function() { |
| 270 if (this.isCancelDisabled) | 270 if (this.isCancelDisabled) |
| 271 return; | 271 return; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 this.lastBackMessageValue_; | 370 this.lastBackMessageValue_; |
| 371 this.navigation_.refreshVisible = this.isAtTheBeginning() && | 371 this.navigation_.refreshVisible = this.isAtTheBeginning() && |
| 372 !this.isManualEnrollment_; | 372 !this.isManualEnrollment_; |
| 373 this.navigation_.closeVisible = (this.currentStep_ == STEP_SIGNIN || | 373 this.navigation_.closeVisible = (this.currentStep_ == STEP_SIGNIN || |
| 374 this.currentStep_ == STEP_ERROR) && | 374 this.currentStep_ == STEP_ERROR) && |
| 375 !this.navigation_.refreshVisible; | 375 !this.navigation_.refreshVisible; |
| 376 $('login-header-bar').updateUI_(); | 376 $('login-header-bar').updateUI_(); |
| 377 } | 377 } |
| 378 }; | 378 }; |
| 379 }); | 379 }); |
| OLD | NEW |