Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_controller_impl.h

Issue 772253003: Create an autofill Suggestion class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review 2 Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 bool SuggestionTextForSection(DialogSection section, 462 bool SuggestionTextForSection(DialogSection section,
463 base::string16* vertically_compact, 463 base::string16* vertically_compact,
464 base::string16* horizontally_compact); 464 base::string16* horizontally_compact);
465 base::string16 RequiredActionTextForSection(DialogSection section) const; 465 base::string16 RequiredActionTextForSection(DialogSection section) const;
466 gfx::Image SuggestionIconForSection(DialogSection section); 466 gfx::Image SuggestionIconForSection(DialogSection section);
467 base::string16 ExtraSuggestionTextForSection(DialogSection section) const; 467 base::string16 ExtraSuggestionTextForSection(DialogSection section) const;
468 gfx::Image ExtraSuggestionIconForSection(DialogSection section); 468 gfx::Image ExtraSuggestionIconForSection(DialogSection section);
469 469
470 // Suggests address completions using the downloaded i18n validation rules. 470 // Suggests address completions using the downloaded i18n validation rules.
471 // Stores the suggestions in |i18n_validator_suggestions_|. 471 // Stores the suggestions in |i18n_validator_suggestions_|.
472 void GetI18nValidatorSuggestions(DialogSection section, 472 void GetI18nValidatorSuggestions(
473 ServerFieldType type, 473 DialogSection section,
474 std::vector<base::string16>* popup_values, 474 ServerFieldType type,
475 std::vector<base::string16>* popup_labels, 475 std::vector<autofill::Suggestion>* popup_suggestions);
476 std::vector<base::string16>* popup_icons);
477 476
478 // Like RequestedFieldsForSection, but returns a pointer. 477 // Like RequestedFieldsForSection, but returns a pointer.
479 DetailInputs* MutableRequestedFieldsForSection(DialogSection section); 478 DetailInputs* MutableRequestedFieldsForSection(DialogSection section);
480 479
481 // Returns a pointer to the language code that should be used for formatting 480 // Returns a pointer to the language code that should be used for formatting
482 // the address in |section| for display. Returns NULL for a non-address 481 // the address in |section| for display. Returns NULL for a non-address
483 // |section|. 482 // |section|.
484 std::string* MutableAddressLanguageCodeForSection(DialogSection section); 483 std::string* MutableAddressLanguageCodeForSection(DialogSection section);
485 484
486 // Returns the language code that should be used for formatting the address in 485 // Returns the language code that should be used for formatting the address in
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 737
739 // Whether |form_structure_| has asked for any details that would indicate 738 // Whether |form_structure_| has asked for any details that would indicate
740 // we should show a shipping section. 739 // we should show a shipping section.
741 bool cares_about_shipping_; 740 bool cares_about_shipping_;
742 741
743 // Site-provided transaction amount and currency. No attempt to validate this 742 // Site-provided transaction amount and currency. No attempt to validate this
744 // input; it's passed directly to Wallet. 743 // input; it's passed directly to Wallet.
745 base::string16 transaction_amount_; 744 base::string16 transaction_amount_;
746 base::string16 transaction_currency_; 745 base::string16 transaction_currency_;
747 746
748 // The GUIDs for the currently showing unverified profiles popup. 747 // The IDs for the currently showing unverified profiles popup. This will
749 std::vector<PersonalDataManager::GUIDPair> popup_guids_; 748 // be the first section in the list. The rest of the items will be the
749 // i18n_validator_suggestions_.
750 std::vector<autofill::SuggestionBackendID> popup_suggestion_ids_;
750 751
751 // The autofill suggestions based on downloaded i18n validation rules. 752 // The autofill suggestions based on downloaded i18n validation rules.
752 std::vector< ::i18n::addressinput::AddressData> i18n_validator_suggestions_; 753 std::vector< ::i18n::addressinput::AddressData> i18n_validator_suggestions_;
753 754
754 // The controller for the currently showing popup (which helps users when 755 // The controller for the currently showing popup (which helps users when
755 // they're manually filling the dialog). 756 // they're manually filling the dialog).
756 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_; 757 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_;
757 758
758 // The type of the visible Autofill popup input (or UNKNOWN_TYPE if none). 759 // The type of the visible Autofill popup input (or UNKNOWN_TYPE if none).
759 ServerFieldType popup_input_type_; 760 ServerFieldType popup_input_type_;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 base::string16 submitted_cardholder_name_; 848 base::string16 submitted_cardholder_name_;
848 849
849 base::WeakPtrFactory<AutofillDialogControllerImpl> weak_ptr_factory_; 850 base::WeakPtrFactory<AutofillDialogControllerImpl> weak_ptr_factory_;
850 851
851 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); 852 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl);
852 }; 853 };
853 854
854 } // namespace autofill 855 } // namespace autofill
855 856
856 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ 857 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698