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

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

Issue 2905733002: [WebPayments] Disabling done button when form invalid (Closed)
Patch Set: upload 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/editor_view_controller.h
diff --git a/chrome/browser/ui/views/payments/editor_view_controller.h b/chrome/browser/ui/views/payments/editor_view_controller.h
index 216b45cb3880a3c0cfbdc62a6014ed59339b4719..81110c057fab367205aaf4d1799b09eea4c11164 100644
--- a/chrome/browser/ui/views/payments/editor_view_controller.h
+++ b/chrome/browser/ui/views/payments/editor_view_controller.h
@@ -129,6 +129,7 @@ class EditorViewController : public PaymentRequestSheetController,
autofill::ServerFieldType type) = 0;
// Validates the data entered and attempts to save; returns true on success.
virtual bool ValidateModelAndSave() = 0;
+
// Creates a ValidationDelegate which knows how to validate for a given
// |field| definition.
virtual std::unique_ptr<ValidationDelegate> CreateValidationDelegate(
@@ -136,6 +137,11 @@ class EditorViewController : public PaymentRequestSheetController,
virtual std::unique_ptr<ui::ComboboxModel> GetComboboxModelForType(
const autofill::ServerFieldType& type) = 0;
+ // Returns true if all fields are valid. Relies on cached validity values,
Mathieu 2017/05/29 16:45:36 no cache?
tmartino 2017/05/29 21:06:58 Done
+ // which are computed once for all fields at init-time, and subsequently
+ // upon user interactions on a per-field basis.
+ bool ValidateModel();
+
// PaymentRequestSheetController;
std::unique_ptr<views::Button> CreatePrimaryButton() override;
void FillContentView(views::View* content_view) override;

Powered by Google App Engine
This is Rietveld 408576698