| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 virtual ValidityMessages InputsAreValid( | 140 virtual ValidityMessages InputsAreValid( |
| 141 DialogSection section, const FieldValueMap& inputs) OVERRIDE; | 141 DialogSection section, const FieldValueMap& inputs) OVERRIDE; |
| 142 virtual void UserEditedOrActivatedInput(DialogSection section, | 142 virtual void UserEditedOrActivatedInput(DialogSection section, |
| 143 ServerFieldType type, | 143 ServerFieldType type, |
| 144 gfx::NativeView parent_view, | 144 gfx::NativeView parent_view, |
| 145 const gfx::Rect& content_bounds, | 145 const gfx::Rect& content_bounds, |
| 146 const base::string16& field_contents, | 146 const base::string16& field_contents, |
| 147 bool was_edit) OVERRIDE; | 147 bool was_edit) OVERRIDE; |
| 148 virtual bool HandleKeyPressEventInInput( | 148 virtual bool HandleKeyPressEventInInput( |
| 149 const content::NativeWebKeyboardEvent& event) OVERRIDE; | 149 const content::NativeWebKeyboardEvent& event) OVERRIDE; |
| 150 virtual void ComboboxItemSelected(ServerFieldType type, int index) OVERRIDE; |
| 150 virtual void FocusMoved() OVERRIDE; | 151 virtual void FocusMoved() OVERRIDE; |
| 151 virtual bool ShouldShowErrorBubble() const OVERRIDE; | 152 virtual bool ShouldShowErrorBubble() const OVERRIDE; |
| 152 virtual void ViewClosed() OVERRIDE; | 153 virtual void ViewClosed() OVERRIDE; |
| 153 virtual std::vector<DialogNotification> CurrentNotifications() OVERRIDE; | 154 virtual std::vector<DialogNotification> CurrentNotifications() OVERRIDE; |
| 154 virtual void LinkClicked(const GURL& url) OVERRIDE; | 155 virtual void LinkClicked(const GURL& url) OVERRIDE; |
| 155 virtual void SignInLinkClicked() OVERRIDE; | 156 virtual void SignInLinkClicked() OVERRIDE; |
| 156 virtual void NotificationCheckboxStateChanged(DialogNotification::Type type, | 157 virtual void NotificationCheckboxStateChanged(DialogNotification::Type type, |
| 157 bool checked) OVERRIDE; | 158 bool checked) OVERRIDE; |
| 158 virtual void LegalDocumentLinkClicked(const gfx::Range& range) OVERRIDE; | 159 virtual void LegalDocumentLinkClicked(const gfx::Range& range) OVERRIDE; |
| 159 virtual bool OnCancel() OVERRIDE; | 160 virtual bool OnCancel() OVERRIDE; |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 ServerFieldType type, | 443 ServerFieldType type, |
| 443 const base::string16& field_contents, | 444 const base::string16& field_contents, |
| 444 const DetailInputs& inputs, | 445 const DetailInputs& inputs, |
| 445 std::vector<base::string16>* popup_values, | 446 std::vector<base::string16>* popup_values, |
| 446 std::vector<base::string16>* popup_labels, | 447 std::vector<base::string16>* popup_labels, |
| 447 std::vector<base::string16>* popup_icons); | 448 std::vector<base::string16>* popup_icons); |
| 448 | 449 |
| 449 // Like RequestedFieldsForSection, but returns a pointer. | 450 // Like RequestedFieldsForSection, but returns a pointer. |
| 450 DetailInputs* MutableRequestedFieldsForSection(DialogSection section); | 451 DetailInputs* MutableRequestedFieldsForSection(DialogSection section); |
| 451 | 452 |
| 453 // Whether |model| is a combobox for a country. |
| 454 bool IsCountryComboboxModel(const ui::ComboboxModel* model) const; |
| 455 |
| 456 // Called when user switches countries. |
| 457 void OnCountryComboboxModelChanged(const CountryComboboxModel& model); |
| 458 |
| 459 // Returns the country code (e.g. "US") for |section|. |
| 460 std::string CountryCodeForSection(DialogSection section); |
| 461 |
| 452 // Hides |popup_controller_|'s popup view, if it exists. | 462 // Hides |popup_controller_|'s popup view, if it exists. |
| 453 void HidePopup(); | 463 void HidePopup(); |
| 454 | 464 |
| 455 // Set whether the currently editing |section| was originally based on | 465 // Set whether the currently editing |section| was originally based on |
| 456 // existing Wallet or Autofill data. | 466 // existing Wallet or Autofill data. |
| 457 void SetEditingExistingData(DialogSection section, bool editing); | 467 void SetEditingExistingData(DialogSection section, bool editing); |
| 458 | 468 |
| 459 // Whether the user has chosen to enter all new data in at least one section. | 469 // Whether the user has chosen to enter all new data in at least one section. |
| 460 bool IsManuallyEditingAnySection() const; | 470 bool IsManuallyEditingAnySection() const; |
| 461 | 471 |
| (...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. | 652 // The fields for billing and shipping which the page has actually requested. |
| 643 DetailInputs requested_cc_fields_; | 653 DetailInputs requested_cc_fields_; |
| 644 DetailInputs requested_billing_fields_; | 654 DetailInputs requested_billing_fields_; |
| 645 DetailInputs requested_cc_billing_fields_; | 655 DetailInputs requested_cc_billing_fields_; |
| 646 DetailInputs requested_shipping_fields_; | 656 DetailInputs requested_shipping_fields_; |
| 647 | 657 |
| 648 // Models for the credit card expiration inputs. | 658 // Models for the credit card expiration inputs. |
| 649 MonthComboboxModel cc_exp_month_combobox_model_; | 659 MonthComboboxModel cc_exp_month_combobox_model_; |
| 650 YearComboboxModel cc_exp_year_combobox_model_; | 660 YearComboboxModel cc_exp_year_combobox_model_; |
| 651 | 661 |
| 652 // Model for the country input. | 662 // Models for country input. |
| 653 CountryComboboxModel country_combobox_model_; | 663 CountryComboboxModel billing_country_combobox_model_; |
| 664 CountryComboboxModel shipping_country_combobox_model_; |
| 654 | 665 |
| 655 // Models for the suggestion views. | 666 // Models for the suggestion views. |
| 656 SuggestionsMenuModel suggested_cc_; | 667 SuggestionsMenuModel suggested_cc_; |
| 657 SuggestionsMenuModel suggested_billing_; | 668 SuggestionsMenuModel suggested_billing_; |
| 658 SuggestionsMenuModel suggested_cc_billing_; | 669 SuggestionsMenuModel suggested_cc_billing_; |
| 659 SuggestionsMenuModel suggested_shipping_; | 670 SuggestionsMenuModel suggested_shipping_; |
| 660 | 671 |
| 661 // |DialogSection|s that are in edit mode that are based on existing data. | 672 // |DialogSection|s that are in edit mode that are based on existing data. |
| 662 std::set<DialogSection> section_editing_state_; | 673 std::set<DialogSection> section_editing_state_; |
| 663 | 674 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 757 | 768 |
| 758 // A username string we display in the card scrambling/generated overlay. | 769 // A username string we display in the card scrambling/generated overlay. |
| 759 base::string16 submitted_cardholder_name_; | 770 base::string16 submitted_cardholder_name_; |
| 760 | 771 |
| 761 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); | 772 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); |
| 762 }; | 773 }; |
| 763 | 774 |
| 764 } // namespace autofill | 775 } // namespace autofill |
| 765 | 776 |
| 766 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 777 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
| OLD | NEW |