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

Unified Diff: chrome/browser/ui/views/payments/validation_delegate.h

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/validation_delegate.h
diff --git a/chrome/browser/ui/views/payments/validation_delegate.h b/chrome/browser/ui/views/payments/validation_delegate.h
index 4065398a85785949bab0b93d3800c264d016804a..84c9b93239c03ad3b19ddf16fae8b28c1e716829 100644
--- a/chrome/browser/ui/views/payments/validation_delegate.h
+++ b/chrome/browser/ui/views/payments/validation_delegate.h
@@ -16,10 +16,13 @@ class ValidationDelegate {
public:
virtual ~ValidationDelegate() {}
- // Only the delegate knows how to validate the textfield.
- virtual bool ValidateTextfield(views::Textfield* textfield) = 0;
+ // Only the delegate knows how to validate the textfield. Only display an
+ // error in the UI when |display_error| is true.
+ virtual bool ValidateTextfield(views::Textfield* textfield,
anthonyvd 2017/05/12 14:19:44 I think we should separate the validation logic fr
MAD 2017/05/18 16:01:46 As discussed... OK?
anthonyvd 2017/05/18 18:12:24 Yeah, I like this way better :) Thanks!
+ bool display_error) = 0;
- virtual bool ValidateCombobox(views::Combobox* combobox) = 0;
+ virtual bool ValidateCombobox(views::Combobox* combobox,
+ bool display_error) = 0;
virtual void ComboboxModelChanged(views::Combobox* combobox) = 0;
};

Powered by Google App Engine
This is Rietveld 408576698