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 271b46f44749e286617778dc1ba62c42ca86b1f8..4e11ceb3cd316713009a78c2116f658388c74e84 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 |
| @@ -60,11 +60,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_; |
| @@ -88,11 +90,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}; |
|
please use gerrit instead
2017/04/11 21:05:35
This should be initialized in the constructor like
MAD
2017/04/12 02:46:07
Acknowledged.
|
| + |
| // 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 combobox and it must be converted to a text field. |
| + void OnComboboxModelChanged(views::Combobox* combobox); |
| DISALLOW_COPY_AND_ASSIGN(ShippingAddressEditorViewController); |
| }; |