| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 93 |
| 94 // Called when a credit card is scanned using device camera. | 94 // Called when a credit card is scanned using device camera. |
| 95 void OnCreditCardScanned(const CreditCard& card); | 95 void OnCreditCardScanned(const CreditCard& card); |
| 96 | 96 |
| 97 // Fills the form with the Autofill data corresponding to |unique_id|. | 97 // Fills the form with the Autofill data corresponding to |unique_id|. |
| 98 // If |is_preview| is true then this is just a preview to show the user what | 98 // If |is_preview| is true then this is just a preview to show the user what |
| 99 // would be selected and if |is_preview| is false then the user has selected | 99 // would be selected and if |is_preview| is false then the user has selected |
| 100 // this data. | 100 // this data. |
| 101 void FillAutofillFormData(int unique_id, bool is_preview); | 101 void FillAutofillFormData(int unique_id, bool is_preview); |
| 102 | 102 |
| 103 // Handle applying any Autofill warnings to the Autofill popup. | 103 // Will remove Autofill warnings from |suggestions| if there are also |
| 104 void ApplyAutofillWarnings(std::vector<Suggestion>* suggestions); | 104 // autocomplete entries in the vector. Note: at this point, it is assumed that |
| 105 // if there are Autofill warnings, they will be at the head of the vector and |
| 106 // any entry that is not an Autofill warning is considered an Autocomplete |
| 107 // entry. |
| 108 void PossiblyRemoveAutofillWarnings(std::vector<Suggestion>* suggestions); |
| 105 | 109 |
| 106 // Handle applying any Autofill option listings to the Autofill popup. | 110 // Handle applying any Autofill option listings to the Autofill popup. |
| 107 // This function should only get called when there is at least one | 111 // This function should only get called when there is at least one |
| 108 // multi-field suggestion in the list of suggestions. | 112 // multi-field suggestion in the list of suggestions. |
| 109 void ApplyAutofillOptions(std::vector<Suggestion>* suggestions); | 113 void ApplyAutofillOptions(std::vector<Suggestion>* suggestions); |
| 110 | 114 |
| 111 // Insert the data list values at the start of the given list, including | 115 // Insert the data list values at the start of the given list, including |
| 112 // any required separators. Will also go through |suggestions| and remove | 116 // any required separators. Will also go through |suggestions| and remove |
| 113 // duplicate autocomplete (not Autofill) suggestions, keeping their datalist | 117 // duplicate autocomplete (not Autofill) suggestions, keeping their datalist |
| 114 // version. | 118 // version. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 std::vector<base::string16> data_list_labels_; | 157 std::vector<base::string16> data_list_labels_; |
| 154 | 158 |
| 155 base::WeakPtrFactory<AutofillExternalDelegate> weak_ptr_factory_; | 159 base::WeakPtrFactory<AutofillExternalDelegate> weak_ptr_factory_; |
| 156 | 160 |
| 157 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate); | 161 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate); |
| 158 }; | 162 }; |
| 159 | 163 |
| 160 } // namespace autofill | 164 } // namespace autofill |
| 161 | 165 |
| 162 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ | 166 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ |
| OLD | NEW |