| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 virtual ValidityMessages InputsAreValid( | 139 virtual ValidityMessages InputsAreValid( |
| 140 DialogSection section, const FieldValueMap& inputs) OVERRIDE; | 140 DialogSection section, const FieldValueMap& inputs) OVERRIDE; |
| 141 virtual void UserEditedOrActivatedInput(DialogSection section, | 141 virtual void UserEditedOrActivatedInput(DialogSection section, |
| 142 ServerFieldType type, | 142 ServerFieldType type, |
| 143 gfx::NativeView parent_view, | 143 gfx::NativeView parent_view, |
| 144 const gfx::Rect& content_bounds, | 144 const gfx::Rect& content_bounds, |
| 145 const string16& field_contents, | 145 const string16& field_contents, |
| 146 bool was_edit) OVERRIDE; | 146 bool was_edit) OVERRIDE; |
| 147 virtual bool HandleKeyPressEventInInput( | 147 virtual bool HandleKeyPressEventInInput( |
| 148 const content::NativeWebKeyboardEvent& event) OVERRIDE; | 148 const content::NativeWebKeyboardEvent& event) OVERRIDE; |
| 149 virtual void ComboboxItemSelected(ServerFieldType type, int index) OVERRIDE; |
| 149 virtual void FocusMoved() OVERRIDE; | 150 virtual void FocusMoved() OVERRIDE; |
| 150 virtual bool ShouldShowErrorBubble() const OVERRIDE; | 151 virtual bool ShouldShowErrorBubble() const OVERRIDE; |
| 151 virtual void ViewClosed() OVERRIDE; | 152 virtual void ViewClosed() OVERRIDE; |
| 152 virtual std::vector<DialogNotification> CurrentNotifications() OVERRIDE; | 153 virtual std::vector<DialogNotification> CurrentNotifications() OVERRIDE; |
| 153 virtual void LinkClicked(const GURL& url) OVERRIDE; | 154 virtual void LinkClicked(const GURL& url) OVERRIDE; |
| 154 virtual void SignInLinkClicked() OVERRIDE; | 155 virtual void SignInLinkClicked() OVERRIDE; |
| 155 virtual void NotificationCheckboxStateChanged(DialogNotification::Type type, | 156 virtual void NotificationCheckboxStateChanged(DialogNotification::Type type, |
| 156 bool checked) OVERRIDE; | 157 bool checked) OVERRIDE; |
| 157 virtual void LegalDocumentLinkClicked(const gfx::Range& range) OVERRIDE; | 158 virtual void LegalDocumentLinkClicked(const gfx::Range& range) OVERRIDE; |
| 158 virtual bool OnCancel() OVERRIDE; | 159 virtual bool OnCancel() OVERRIDE; |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 ServerFieldType type, | 448 ServerFieldType type, |
| 448 const string16& field_contents, | 449 const string16& field_contents, |
| 449 const DetailInputs& inputs, | 450 const DetailInputs& inputs, |
| 450 std::vector<string16>* popup_values, | 451 std::vector<string16>* popup_values, |
| 451 std::vector<string16>* popup_labels, | 452 std::vector<string16>* popup_labels, |
| 452 std::vector<string16>* popup_icons); | 453 std::vector<string16>* popup_icons); |
| 453 | 454 |
| 454 // Like RequestedFieldsForSection, but returns a pointer. | 455 // Like RequestedFieldsForSection, but returns a pointer. |
| 455 DetailInputs* MutableRequestedFieldsForSection(DialogSection section); | 456 DetailInputs* MutableRequestedFieldsForSection(DialogSection section); |
| 456 | 457 |
| 458 // Gets the country code (e.g. "US") that should be used for |section|. |
| 459 std::string GetCountryCodeForSection(DialogSection section) const; |
| 460 |
| 461 // Sets the country code that should be used for |section|. Also rebuilds this |
| 462 // section's inputs and updates the view. |
| 463 void SetCountryCodeForSection(DialogSection section, |
| 464 const std::string& country_code); |
| 465 |
| 457 // Hides |popup_controller_|'s popup view, if it exists. | 466 // Hides |popup_controller_|'s popup view, if it exists. |
| 458 void HidePopup(); | 467 void HidePopup(); |
| 459 | 468 |
| 460 // Set whether the currently editing |section| was originally based on | 469 // Set whether the currently editing |section| was originally based on |
| 461 // existing Wallet or Autofill data. | 470 // existing Wallet or Autofill data. |
| 462 void SetEditingExistingData(DialogSection section, bool editing); | 471 void SetEditingExistingData(DialogSection section, bool editing); |
| 463 | 472 |
| 464 // Whether the user has chosen to enter all new data in at least one section. | 473 // Whether the user has chosen to enter all new data in at least one section. |
| 465 bool IsManuallyEditingAnySection() const; | 474 bool IsManuallyEditingAnySection() const; |
| 466 | 475 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 SuggestionsMenuModel suggested_cc_billing_; | 672 SuggestionsMenuModel suggested_cc_billing_; |
| 664 SuggestionsMenuModel suggested_shipping_; | 673 SuggestionsMenuModel suggested_shipping_; |
| 665 | 674 |
| 666 // |DialogSection|s that are in edit mode that are based on existing data. | 675 // |DialogSection|s that are in edit mode that are based on existing data. |
| 667 std::set<DialogSection> section_editing_state_; | 676 std::set<DialogSection> section_editing_state_; |
| 668 | 677 |
| 669 // Whether |form_structure_| has asked for any details that would indicate | 678 // Whether |form_structure_| has asked for any details that would indicate |
| 670 // we should show a shipping section. | 679 // we should show a shipping section. |
| 671 bool cares_about_shipping_; | 680 bool cares_about_shipping_; |
| 672 | 681 |
| 682 // Country codes to use when creating/filling billing or shipping inputs. |
| 683 std::string billing_country_code_; |
| 684 std::string shipping_country_code_; |
| 685 |
| 673 // The GUIDs for the currently showing unverified profiles popup. | 686 // The GUIDs for the currently showing unverified profiles popup. |
| 674 std::vector<PersonalDataManager::GUIDPair> popup_guids_; | 687 std::vector<PersonalDataManager::GUIDPair> popup_guids_; |
| 675 | 688 |
| 676 // The controller for the currently showing popup (which helps users when | 689 // The controller for the currently showing popup (which helps users when |
| 677 // they're manually filling the dialog). | 690 // they're manually filling the dialog). |
| 678 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_; | 691 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_; |
| 679 | 692 |
| 680 // The input for which |popup_controller_| is currently showing a popup | 693 // The input for which |popup_controller_| is currently showing a popup |
| 681 // (if any). | 694 // (if any). |
| 682 const DetailInput* input_showing_popup_; | 695 const DetailInput* input_showing_popup_; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 | 776 |
| 764 // A username string we display in the card scrambling/generated overlay. | 777 // A username string we display in the card scrambling/generated overlay. |
| 765 base::string16 submitted_cardholder_name_; | 778 base::string16 submitted_cardholder_name_; |
| 766 | 779 |
| 767 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); | 780 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); |
| 768 }; | 781 }; |
| 769 | 782 |
| 770 } // namespace autofill | 783 } // namespace autofill |
| 771 | 784 |
| 772 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 785 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
| OLD | NEW |