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

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

Issue 2881643002: Focus first invalid field of payment request editor (Closed)
Patch Set: Last final nit :-) 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
« no previous file with comments | « chrome/browser/ui/views/payments/validating_textfield_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1b80408b942e0ad435d3e0e85c6a96519ff7a530 100644
--- a/chrome/browser/ui/views/payments/validation_delegate.h
+++ b/chrome/browser/ui/views/payments/validation_delegate.h
@@ -16,10 +16,17 @@ 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 input fields.
+ virtual bool IsValidTextfield(views::Textfield* textfield) = 0;
+ virtual bool IsValidCombobox(views::Combobox* combobox) = 0;
- virtual bool ValidateCombobox(views::Combobox* combobox) = 0;
+ // Notifications to let delegate react to input field changes and also let
+ // caller know if the new values are valid.
+ virtual bool TextfieldValueChanged(views::Textfield* textfield) = 0;
+ virtual bool ComboboxValueChanged(views::Combobox* combobox) = 0;
+
+ // Lets the delegate know that the model of the combobox has changed, e.g.,
+ // when it gets filled asynchronously as for the state field.
virtual void ComboboxModelChanged(views::Combobox* combobox) = 0;
};
« no previous file with comments | « chrome/browser/ui/views/payments/validating_textfield_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698