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

Unified Diff: chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc

Issue 889043003: Card unmasking prompt - mark cvc input as invalid as appropriate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc
diff --git a/chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc b/chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc
index e004ae39cac496d567f64d2cc2af15e1b3aa2fb6..7de5fb4b896537640212abb0721c87117d09fcbc 100644
--- a/chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc
+++ b/chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc
@@ -7,6 +7,7 @@
#include "chrome/browser/ui/autofill/autofill_dialog_models.h"
#include "chrome/browser/ui/autofill/card_unmask_prompt_controller.h"
#include "chrome/browser/ui/autofill/card_unmask_prompt_view.h"
+#include "chrome/browser/ui/views/autofill/decorated_textfield.h"
#include "chrome/grit/generated_resources.h"
#include "components/constrained_window/constrained_window_views.h"
#include "grit/theme_resources.h"
@@ -16,7 +17,6 @@
#include "ui/views/controls/combobox/combobox_listener.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/label.h"
-#include "ui/views/controls/textfield/textfield.h"
#include "ui/views/controls/textfield/textfield_controller.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/widget/widget.h"
@@ -72,6 +72,7 @@ class CardUnmaskPromptViews : public CardUnmaskPromptView,
base::TimeDelta::FromSeconds(1));
} else {
SetInputsEnabled(true);
+ cvc_input_->SetInvalid(true);
message_label_->SetText(base::ASCIIToUTF16("Verification error."));
GetDialogClientView()->UpdateDialogButtons();
}
@@ -200,10 +201,10 @@ class CardUnmaskPromptViews : public CardUnmaskPromptView,
input_row->AddChildView(year_input_);
}
- cvc_input_ = new views::Textfield();
- cvc_input_->set_controller(this);
- cvc_input_->set_placeholder_text(
- l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_PLACEHOLDER_CVC));
+ cvc_input_ = new DecoratedTextfield(
+ base::string16(),
+ l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_PLACEHOLDER_CVC),
+ this);
cvc_input_->set_default_width_in_chars(10);
input_row->AddChildView(cvc_input_);
@@ -223,7 +224,7 @@ class CardUnmaskPromptViews : public CardUnmaskPromptView,
CardUnmaskPromptController* controller_;
- views::Textfield* cvc_input_;
+ DecoratedTextfield* cvc_input_;
// These will be null when expiration date is not required.
views::Combobox* month_input_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698