Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1255)

Unified Diff: chrome/browser/resources/chromeos/login/screen_confirm_password.js

Issue 137803008: cros: Update SAML flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: split gaia.css Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/login/screen_confirm_password.js
diff --git a/chrome/browser/resources/chromeos/login/screen_confirm_password.js b/chrome/browser/resources/chromeos/login/screen_confirm_password.js
index ecc134a5686678b00c86392fb77f1af950d6a415..2ca191ff29654d5fca5fed16279f5fbff1d10345 100644
--- a/chrome/browser/resources/chromeos/login/screen_confirm_password.js
+++ b/chrome/browser/resources/chromeos/login/screen_confirm_password.js
@@ -22,29 +22,20 @@ login.createScreen('ConfirmPasswordScreen', 'confirm-password', function() {
decorate: function() {
$('confirm-password-input').addEventListener(
'keydown', this.onPasswordFieldKeyDown_.bind(this));
- },
-
- /**
- * Screen controls in bottom strip.
- * @type {Array.<HTMLButtonElement>} Buttons to be put in the bottom strip.
- */
- get buttons() {
- var buttons = [];
-
- var confirmButton = this.ownerDocument.createElement('button');
- confirmButton.textContent =
- loadTimeData.getString('confirmPasswordConfirmButton');
- confirmButton.addEventListener('click',
- this.onConfirmPassword_.bind(this));
- buttons.push(confirmButton);
-
- return buttons;
+ $('confirm-password-confirm-button').addEventListener(
+ 'click', this.onConfirmPassword_.bind(this));
},
get defaultControl() {
return $('confirm-password-input');
},
+ /** @override */
+ onBeforeShow: function(data) {
+ $('login-header-bar').signinUIState =
+ SIGNIN_UI_STATE.SAML_PASSWORD_CONFIRM;
+ },
+
/**
* Handle 'keydown' event on password input field.
*/
@@ -62,11 +53,13 @@ login.createScreen('ConfirmPasswordScreen', 'confirm-password', function() {
/**
* Shows the confirm password screen.
+ * @param {number} attemptCount Number of attempts tried, starting at 0.
* @param {function(string)} callback The callback to be invoked when the
* screen is dismissed.
*/
- show: function(callback) {
+ show: function(attemptCount, callback) {
this.callback_ = callback;
+ this.classList.toggle('error', attemptCount > 0);
$('confirm-password-input').value = '';
Oobe.showScreen({id: SCREEN_CONFIRM_PASSWORD});

Powered by Google App Engine
This is Rietveld 408576698