| 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 44cb5af4372dc3d0afb75e139fe3e28cf8c48a53..c7d87de3dec5488245409006494ea7f0a0303283 100644
|
| --- a/chrome/browser/ui/views/payments/validating_textfield.h
|
| +++ b/chrome/browser/ui/views/payments/validating_textfield.h
|
| @@ -6,26 +6,14 @@
|
| #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_VALIDATING_TEXTFIELD_H_
|
|
|
| #include "base/macros.h"
|
| +#include "chrome/browser/ui/views/payments/validation_delegate.h"
|
| #include "ui/views/controls/textfield/textfield.h"
|
|
|
| namespace payments {
|
|
|
| class ValidatingTextfield : public views::Textfield {
|
| public:
|
| - class Delegate {
|
| - public:
|
| - Delegate() {}
|
| - virtual ~Delegate() {}
|
| -
|
| - // Only the delegate knows how to validate the textfield.
|
| - virtual bool ValidateTextfield(views::Textfield* textfield) = 0;
|
| -
|
| - private:
|
| - DISALLOW_COPY_AND_ASSIGN(Delegate);
|
| - };
|
| -
|
| - explicit ValidatingTextfield(
|
| - std::unique_ptr<ValidatingTextfield::Delegate> delegate);
|
| + explicit ValidatingTextfield(std::unique_ptr<ValidationDelegate> delegate);
|
| ~ValidatingTextfield() override;
|
|
|
| // Textfield:
|
| @@ -36,11 +24,12 @@ class ValidatingTextfield : public views::Textfield {
|
| void OnContentsChanged();
|
|
|
| private:
|
| - // Will call to the Delegate to validate the contents of the textfield.
|
| + // Will call to the ValidationDelegate to validate the contents of the
|
| + // textfield.
|
| void Validate();
|
|
|
| - std::unique_ptr<ValidatingTextfield::Delegate> delegate_;
|
| - bool was_validated_ = false;
|
| + std::unique_ptr<ValidationDelegate> delegate_;
|
| + bool was_blurred_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ValidatingTextfield);
|
| };
|
|
|