Chromium Code Reviews| Index: chrome/browser/ui/views/payments/shipping_address_editor_view_controller.h |
| diff --git a/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.h b/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.h |
| index 61d2ee7fce73c81c7baf4e5d0c124a5b9763509b..cae3e188d0c75a78d29ebd7eea973466da8e8f6c 100644 |
| --- a/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.h |
| +++ b/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.h |
| @@ -53,11 +53,13 @@ class ShippingAddressEditorViewController : public EditorViewController { |
| // ValidationDelegate: |
| bool ValidateTextfield(views::Textfield* textfield) override; |
| bool ValidateCombobox(views::Combobox* combobox) override; |
| + void ComboboxModelChanged(views::Combobox* combobox) override; |
| private: |
| bool ValidateValue(const base::string16& value); |
| EditorField field_; |
| + |
| // Raw pointer back to the owner of this class, therefore will not be null. |
| ShippingAddressEditorViewController* controller_; |
| @@ -77,11 +79,18 @@ class ShippingAddressEditorViewController : public EditorViewController { |
| // The list of country codes as ordered in the country combobox model. |
| std::vector<std::string> country_codes_; |
| + // Identifies whether we tried and failed to load region data. |
| + bool failed_to_load_region_data_{false}; |
| + |
| // Updates |editor_fields_| based on the current country. |
| void UpdateEditorFields(); |
| - // Called by the validation delegate when the country combobox changed. |
| - void OnCountryChanged(views::Combobox* combobox); |
| + // Called when data changes need to force a view update. |
| + void OnDataChanged(); |
| + |
| + // When a combobox model has changed, a view update might be needed, e.g., if |
| + // there is no data in the combox and it must be converted to a text field. |
|
Mathieu
2017/04/05 00:25:14
nit: combobox
MAD
2017/04/07 18:50:40
Done.
|
| + void OnComboboxModelChanged(views::Combobox* combobox); |
| DISALLOW_COPY_AND_ASSIGN(ShippingAddressEditorViewController); |
| }; |