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

Unified Diff: chrome/browser/ui/views/payments/validating_textfield.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/validating_textfield.h
diff --git a/chrome/browser/ui/views/payments/validating_textfield.h b/chrome/browser/ui/views/payments/validating_textfield.h
index ee0e1cf673277b814c636fc7390c6547c71b3f8e..12b047247da6a4d4bc4d76259b4074eb37ce5945 100644
--- a/chrome/browser/ui/views/payments/validating_textfield.h
+++ b/chrome/browser/ui/views/payments/validating_textfield.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_VALIDATING_TEXTFIELD_H_
#define CHROME_BROWSER_UI_VIEWS_PAYMENTS_VALIDATING_TEXTFIELD_H_
+#include <memory>
+
#include "base/macros.h"
#include "chrome/browser/ui/views/payments/validation_delegate.h"
#include "ui/views/controls/textfield/textfield.h"
@@ -26,11 +28,11 @@ class ValidatingTextfield : public views::Textfield {
// Called when the textfield contents is changed. May do validation.
void OnContentsChanged();
- private:
// Will call to the ValidationDelegate to validate the contents of the
// textfield.
- void Validate();
+ void Validate(bool display_error);
+ private:
std::unique_ptr<ValidationDelegate> delegate_;
bool was_blurred_ = false;
bool being_removed_ = false;

Powered by Google App Engine
This is Rietveld 408576698