OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_CONTACT_INFO_EDITOR_VIEW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_CONTACT_INFO_EDITOR_VIEW_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_CONTACT_INFO_EDITOR_VIEW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_CONTACT_INFO_EDITOR_VIEW_CONTROLLER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 base::OnceCallback<void(const autofill::AutofillProfile&)> on_added_; | 65 base::OnceCallback<void(const autofill::AutofillProfile&)> on_added_; |
66 | 66 |
67 class ContactInfoValidationDelegate : public ValidationDelegate { | 67 class ContactInfoValidationDelegate : public ValidationDelegate { |
68 public: | 68 public: |
69 ContactInfoValidationDelegate(const EditorField& field, | 69 ContactInfoValidationDelegate(const EditorField& field, |
70 const std::string& locale, | 70 const std::string& locale, |
71 EditorViewController* controller); | 71 EditorViewController* controller); |
72 ~ContactInfoValidationDelegate() override; | 72 ~ContactInfoValidationDelegate() override; |
73 | 73 |
74 // ValidationDelegate: | 74 // ValidationDelegate: |
75 bool ValidateTextfield(views::Textfield* textfield) override; | 75 bool IsValidTextfield(views::Textfield* textfield) override; |
76 bool ValidateCombobox(views::Combobox* combobox) override; | 76 bool IsValidCombobox(views::Combobox* combobox) override; |
| 77 bool TextfieldValueChanged(views::Textfield* textfield) override; |
| 78 bool ComboboxValueChanged(views::Combobox* combobox) override; |
77 void ComboboxModelChanged(views::Combobox* combobox) override {} | 79 void ComboboxModelChanged(views::Combobox* combobox) override {} |
78 | 80 |
79 private: | 81 private: |
| 82 bool ValidateTextfield(views::Textfield* textfield, |
| 83 base::string16* error_message); |
| 84 |
80 EditorField field_; | 85 EditorField field_; |
81 // Outlives this class. Never null. | 86 // Outlives this class. Never null. |
82 EditorViewController* controller_; | 87 EditorViewController* controller_; |
83 const std::string& locale_; | 88 const std::string& locale_; |
84 }; | 89 }; |
85 }; | 90 }; |
86 | 91 |
87 } // namespace payments | 92 } // namespace payments |
88 | 93 |
89 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_CONTACT_INFO_EDITOR_VIEW_CONTROLLER_
H_ | 94 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_CONTACT_INFO_EDITOR_VIEW_CONTROLLER_
H_ |
OLD | NEW |