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_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_H_ |
6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_H_ | 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 const std::vector<string16>& autofill_values, | 56 const std::vector<string16>& autofill_values, |
57 const std::vector<string16>& autofill_labels, | 57 const std::vector<string16>& autofill_labels, |
58 const std::vector<string16>& autofill_icons, | 58 const std::vector<string16>& autofill_icons, |
59 const std::vector<int>& autofill_unique_ids); | 59 const std::vector<int>& autofill_unique_ids); |
60 | 60 |
61 // Show password suggestions in the popup. | 61 // Show password suggestions in the popup. |
62 void OnShowPasswordSuggestions(const std::vector<string16>& suggestions, | 62 void OnShowPasswordSuggestions(const std::vector<string16>& suggestions, |
63 const webkit::forms::FormField& field, | 63 const webkit::forms::FormField& field, |
64 const gfx::Rect& bounds); | 64 const gfx::Rect& bounds); |
65 | 65 |
| 66 // Set the data list value associated with the current field. |
| 67 void SetCurrentDataListValues(const std::vector<string16>& values, |
| 68 const std::vector<string16>& labels, |
| 69 const std::vector<string16>& icons, |
| 70 const std::vector<int>& unique_ids); |
| 71 |
66 // Remove the given Autocomplete entry from the DB. | 72 // Remove the given Autocomplete entry from the DB. |
67 virtual void RemoveAutocompleteEntry(const string16& value); | 73 virtual void RemoveAutocompleteEntry(const string16& value); |
68 | 74 |
69 // Remove the given Autofill profile or credit credit. | 75 // Remove the given Autofill profile or credit credit. |
70 virtual void RemoveAutofillProfileOrCreditCard(int unique_id); | 76 virtual void RemoveAutofillProfileOrCreditCard(int unique_id); |
71 | 77 |
72 // Inform the delegate that the text field editing has ended, this is | 78 // Inform the delegate that the text field editing has ended, this is |
73 // used to help record the metrics of when a new popup is shown. | 79 // used to help record the metrics of when a new popup is shown. |
74 void DidEndTextFieldEditing(); | 80 void DidEndTextFieldEditing(); |
75 | 81 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 webkit::forms::FormData autofill_query_form_; | 155 webkit::forms::FormData autofill_query_form_; |
150 webkit::forms::FormField autofill_query_field_; | 156 webkit::forms::FormField autofill_query_field_; |
151 | 157 |
152 // Should we display a warning if Autofill is disabled? | 158 // Should we display a warning if Autofill is disabled? |
153 bool display_warning_if_disabled_; | 159 bool display_warning_if_disabled_; |
154 | 160 |
155 // Have we already shown Autofill suggestions for the field the user is | 161 // Have we already shown Autofill suggestions for the field the user is |
156 // currently editing? Used to keep track of state for metrics logging. | 162 // currently editing? Used to keep track of state for metrics logging. |
157 bool has_shown_autofill_popup_for_current_edit_; | 163 bool has_shown_autofill_popup_for_current_edit_; |
158 | 164 |
| 165 // Used to indicate if a popup is currently being shown or not. |
| 166 bool popup_visible_; |
| 167 |
| 168 // The current data list values. |
| 169 std::vector<string16> data_list_values_; |
| 170 std::vector<string16> data_list_labels_; |
| 171 std::vector<string16> data_list_icons_; |
| 172 std::vector<int> data_list_unique_ids_; |
| 173 |
159 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate); | 174 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate); |
160 }; | 175 }; |
161 | 176 |
162 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_H_ | 177 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_EXTERNAL_DELEGATE_H_ |
OLD | NEW |