OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CLIENT_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 namespace autofill { | 27 namespace autofill { |
28 | 28 |
29 class AutofillMetrics; | 29 class AutofillMetrics; |
30 class AutofillPopupDelegate; | 30 class AutofillPopupDelegate; |
31 class AutofillWebDataService; | 31 class AutofillWebDataService; |
32 class CreditCard; | 32 class CreditCard; |
33 class FormStructure; | 33 class FormStructure; |
34 class PersonalDataManager; | 34 class PersonalDataManager; |
35 struct FormData; | 35 struct FormData; |
| 36 struct Suggestion; |
36 | 37 |
37 // A client interface that needs to be supplied to the Autofill component by the | 38 // A client interface that needs to be supplied to the Autofill component by the |
38 // embedder. | 39 // embedder. |
39 // | 40 // |
40 // Each client instance is associated with a given context within which an | 41 // Each client instance is associated with a given context within which an |
41 // AutofillManager is used (e.g. a single tab), so when we say "for the client" | 42 // AutofillManager is used (e.g. a single tab), so when we say "for the client" |
42 // below, we mean "in the execution context the client is associated with" (e.g. | 43 // below, we mean "in the execution context the client is associated with" (e.g. |
43 // for the tab the AutofillManager is attached to). | 44 // for the tab the AutofillManager is attached to). |
44 class AutofillClient { | 45 class AutofillClient { |
45 public: | 46 public: |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 const FormData& form, | 100 const FormData& form, |
100 const GURL& source_url, | 101 const GURL& source_url, |
101 const ResultCallback& callback) = 0; | 102 const ResultCallback& callback) = 0; |
102 | 103 |
103 // Shows an Autofill popup with the given |values|, |labels|, |icons|, and | 104 // Shows an Autofill popup with the given |values|, |labels|, |icons|, and |
104 // |identifiers| for the element at |element_bounds|. |delegate| will be | 105 // |identifiers| for the element at |element_bounds|. |delegate| will be |
105 // notified of popup events. | 106 // notified of popup events. |
106 virtual void ShowAutofillPopup( | 107 virtual void ShowAutofillPopup( |
107 const gfx::RectF& element_bounds, | 108 const gfx::RectF& element_bounds, |
108 base::i18n::TextDirection text_direction, | 109 base::i18n::TextDirection text_direction, |
109 const std::vector<base::string16>& values, | 110 const std::vector<Suggestion>& suggestions, |
110 const std::vector<base::string16>& labels, | |
111 const std::vector<base::string16>& icons, | |
112 const std::vector<int>& identifiers, | |
113 base::WeakPtr<AutofillPopupDelegate> delegate) = 0; | 111 base::WeakPtr<AutofillPopupDelegate> delegate) = 0; |
114 | 112 |
115 // Update the data list values shown by the Autofill popup, if visible. | 113 // Update the data list values shown by the Autofill popup, if visible. |
116 virtual void UpdateAutofillPopupDataListValues( | 114 virtual void UpdateAutofillPopupDataListValues( |
117 const std::vector<base::string16>& values, | 115 const std::vector<base::string16>& values, |
118 const std::vector<base::string16>& labels) = 0; | 116 const std::vector<base::string16>& labels) = 0; |
119 | 117 |
120 // Hide the Autofill popup if one is currently showing. | 118 // Hide the Autofill popup if one is currently showing. |
121 virtual void HideAutofillPopup() = 0; | 119 virtual void HideAutofillPopup() = 0; |
122 | 120 |
(...skipping 11 matching lines...) Expand all Loading... |
134 const base::string16& autofilled_value, | 132 const base::string16& autofilled_value, |
135 const base::string16& profile_full_name) = 0; | 133 const base::string16& profile_full_name) = 0; |
136 | 134 |
137 // Informs the client that a user gesture has been observed. | 135 // Informs the client that a user gesture has been observed. |
138 virtual void OnFirstUserGestureObserved() = 0; | 136 virtual void OnFirstUserGestureObserved() = 0; |
139 }; | 137 }; |
140 | 138 |
141 } // namespace autofill | 139 } // namespace autofill |
142 | 140 |
143 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ | 141 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_CLIENT_H_ |
OLD | NEW |