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_SHIPPING_ADDRESS_EDITOR_VIEW_CONTROLLER
_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_SHIPPING_ADDRESS_EDITOR_VIEW_CONTROLLER
_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_SHIPPING_ADDRESS_EDITOR_VIEW_CONTROLLER
_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_SHIPPING_ADDRESS_EDITOR_VIEW_CONTROLLER
_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 bool GetSheetId(DialogViewID* sheet_id) override; | 64 bool GetSheetId(DialogViewID* sheet_id) override; |
65 | 65 |
66 class ShippingAddressValidationDelegate : public ValidationDelegate { | 66 class ShippingAddressValidationDelegate : public ValidationDelegate { |
67 public: | 67 public: |
68 ShippingAddressValidationDelegate( | 68 ShippingAddressValidationDelegate( |
69 ShippingAddressEditorViewController* parent, | 69 ShippingAddressEditorViewController* parent, |
70 const EditorField& field); | 70 const EditorField& field); |
71 ~ShippingAddressValidationDelegate() override; | 71 ~ShippingAddressValidationDelegate() override; |
72 | 72 |
73 // ValidationDelegate: | 73 // ValidationDelegate: |
74 bool ValidateTextfield(views::Textfield* textfield) override; | 74 bool IsValidTextfield(views::Textfield* textfield) override; |
75 bool ValidateCombobox(views::Combobox* combobox) override; | 75 bool IsValidCombobox(views::Combobox* combobox) override; |
| 76 bool TextfieldValueChanged(views::Textfield* textfield) override; |
| 77 bool ComboboxValueChanged(views::Combobox* combobox) override; |
76 void ComboboxModelChanged(views::Combobox* combobox) override; | 78 void ComboboxModelChanged(views::Combobox* combobox) override; |
77 | 79 |
78 private: | 80 private: |
79 bool ValidateValue(const base::string16& value); | 81 bool ValidateValue(const base::string16& value, |
| 82 base::string16* error_message); |
80 | 83 |
81 EditorField field_; | 84 EditorField field_; |
82 | 85 |
83 // Raw pointer back to the owner of this class, therefore will not be null. | 86 // Raw pointer back to the owner of this class, therefore will not be null. |
84 ShippingAddressEditorViewController* controller_; | 87 ShippingAddressEditorViewController* controller_; |
85 | 88 |
86 DISALLOW_COPY_AND_ASSIGN(ShippingAddressValidationDelegate); | 89 DISALLOW_COPY_AND_ASSIGN(ShippingAddressValidationDelegate); |
87 }; | 90 }; |
88 friend class ShippingAddressValidationDelegate; | 91 friend class ShippingAddressValidationDelegate; |
89 | 92 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 | 145 |
143 // Failed to fetch the region data in time. | 146 // Failed to fetch the region data in time. |
144 void RegionDataLoadTimedOut(); | 147 void RegionDataLoadTimedOut(); |
145 | 148 |
146 DISALLOW_COPY_AND_ASSIGN(ShippingAddressEditorViewController); | 149 DISALLOW_COPY_AND_ASSIGN(ShippingAddressEditorViewController); |
147 }; | 150 }; |
148 | 151 |
149 } // namespace payments | 152 } // namespace payments |
150 | 153 |
151 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_SHIPPING_ADDRESS_EDITOR_VIEW_CONTROL
LER_H_ | 154 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_SHIPPING_ADDRESS_EDITOR_VIEW_CONTROL
LER_H_ |
OLD | NEW |