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

Unified Diff: chrome/browser/ui/views/payments/contact_info_editor_view_controller.cc

Issue 2881643002: Focus first invalid field of payment request editor (Closed)
Patch Set: Rebase Created 3 years, 7 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/ui/views/payments/contact_info_editor_view_controller.cc
diff --git a/chrome/browser/ui/views/payments/contact_info_editor_view_controller.cc b/chrome/browser/ui/views/payments/contact_info_editor_view_controller.cc
index 926ef216db69fc47b04cfd01ad18692a7c7193df..737b0ed1c334030e7cb07e4e6f8ac9c06e48758a 100644
--- a/chrome/browser/ui/views/payments/contact_info_editor_view_controller.cc
+++ b/chrome/browser/ui/views/payments/contact_info_editor_view_controller.cc
@@ -143,7 +143,7 @@ ContactInfoEditorViewController::ContactInfoValidationDelegate::
~ContactInfoValidationDelegate() {}
bool ContactInfoEditorViewController::ContactInfoValidationDelegate::
- ValidateTextfield(views::Textfield* textfield) {
+ ValidateTextfield(views::Textfield* textfield, bool display_error) {
bool is_valid = true;
base::string16 error_message;
@@ -187,12 +187,13 @@ bool ContactInfoEditorViewController::ContactInfoValidationDelegate::
}
}
- controller_->DisplayErrorMessageForField(field_, error_message);
+ if (display_error)
+ controller_->DisplayErrorMessageForField(field_, error_message);
return is_valid;
}
bool ContactInfoEditorViewController::ContactInfoValidationDelegate::
- ValidateCombobox(views::Combobox* combobox) {
+ ValidateCombobox(views::Combobox* combobox, bool display_error) {
// This UI doesn't contain any comboboxes.
NOTREACHED();
return true;

Powered by Google App Engine
This is Rietveld 408576698