OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 ServerFieldType type, | 442 ServerFieldType type, |
443 const base::string16& field_contents, | 443 const base::string16& field_contents, |
444 const DetailInputs& inputs, | 444 const DetailInputs& inputs, |
445 std::vector<base::string16>* popup_values, | 445 std::vector<base::string16>* popup_values, |
446 std::vector<base::string16>* popup_labels, | 446 std::vector<base::string16>* popup_labels, |
447 std::vector<base::string16>* popup_icons); | 447 std::vector<base::string16>* popup_icons); |
448 | 448 |
449 // Like RequestedFieldsForSection, but returns a pointer. | 449 // Like RequestedFieldsForSection, but returns a pointer. |
450 DetailInputs* MutableRequestedFieldsForSection(DialogSection section); | 450 DetailInputs* MutableRequestedFieldsForSection(DialogSection section); |
451 | 451 |
| 452 // Whether |model| is a combobox for a country. |
| 453 bool IsCountryComboboxModel(const ui::ComboboxModel* model) const; |
| 454 |
| 455 // Called when user switches countries. |
| 456 void OnCountryComboboxModelChanged(const CountryComboboxModel& model); |
| 457 |
| 458 // Returns the country code (e.g. "US") for |section|. |
| 459 std::string CountryCodeForSection(DialogSection section); |
| 460 |
452 // Hides |popup_controller_|'s popup view, if it exists. | 461 // Hides |popup_controller_|'s popup view, if it exists. |
453 void HidePopup(); | 462 void HidePopup(); |
454 | 463 |
455 // Set whether the currently editing |section| was originally based on | 464 // Set whether the currently editing |section| was originally based on |
456 // existing Wallet or Autofill data. | 465 // existing Wallet or Autofill data. |
457 void SetEditingExistingData(DialogSection section, bool editing); | 466 void SetEditingExistingData(DialogSection section, bool editing); |
458 | 467 |
459 // Whether the user has chosen to enter all new data in at least one section. | 468 // Whether the user has chosen to enter all new data in at least one section. |
460 bool IsManuallyEditingAnySection() const; | 469 bool IsManuallyEditingAnySection() const; |
461 | 470 |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 // The fields for billing and shipping which the page has actually requested. | 651 // The fields for billing and shipping which the page has actually requested. |
643 DetailInputs requested_cc_fields_; | 652 DetailInputs requested_cc_fields_; |
644 DetailInputs requested_billing_fields_; | 653 DetailInputs requested_billing_fields_; |
645 DetailInputs requested_cc_billing_fields_; | 654 DetailInputs requested_cc_billing_fields_; |
646 DetailInputs requested_shipping_fields_; | 655 DetailInputs requested_shipping_fields_; |
647 | 656 |
648 // Models for the credit card expiration inputs. | 657 // Models for the credit card expiration inputs. |
649 MonthComboboxModel cc_exp_month_combobox_model_; | 658 MonthComboboxModel cc_exp_month_combobox_model_; |
650 YearComboboxModel cc_exp_year_combobox_model_; | 659 YearComboboxModel cc_exp_year_combobox_model_; |
651 | 660 |
652 // Model for the country input. | 661 // Models for country input. |
653 CountryComboboxModel country_combobox_model_; | 662 CountryComboboxModel billing_country_combobox_model_; |
| 663 CountryComboboxModel shipping_country_combobox_model_; |
654 | 664 |
655 // Models for the suggestion views. | 665 // Models for the suggestion views. |
656 SuggestionsMenuModel suggested_cc_; | 666 SuggestionsMenuModel suggested_cc_; |
657 SuggestionsMenuModel suggested_billing_; | 667 SuggestionsMenuModel suggested_billing_; |
658 SuggestionsMenuModel suggested_cc_billing_; | 668 SuggestionsMenuModel suggested_cc_billing_; |
659 SuggestionsMenuModel suggested_shipping_; | 669 SuggestionsMenuModel suggested_shipping_; |
660 | 670 |
661 // |DialogSection|s that are in edit mode that are based on existing data. | 671 // |DialogSection|s that are in edit mode that are based on existing data. |
662 std::set<DialogSection> section_editing_state_; | 672 std::set<DialogSection> section_editing_state_; |
663 | 673 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 | 767 |
758 // A username string we display in the card scrambling/generated overlay. | 768 // A username string we display in the card scrambling/generated overlay. |
759 base::string16 submitted_cardholder_name_; | 769 base::string16 submitted_cardholder_name_; |
760 | 770 |
761 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); | 771 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); |
762 }; | 772 }; |
763 | 773 |
764 } // namespace autofill | 774 } // namespace autofill |
765 | 775 |
766 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 776 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
OLD | NEW |