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_CONTENT_RENDERER_AUTOFILL_AGENT_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ |
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ | 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 | 98 |
99 void OnFormDataFilled(int query_id, const FormData& form); | 99 void OnFormDataFilled(int query_id, const FormData& form); |
100 void OnFieldTypePredictionsAvailable( | 100 void OnFieldTypePredictionsAvailable( |
101 const std::vector<FormDataPredictions>& forms); | 101 const std::vector<FormDataPredictions>& forms); |
102 | 102 |
103 // For external Autofill selection. | 103 // For external Autofill selection. |
104 void OnSetAutofillActionFill(); | 104 void OnSetAutofillActionFill(); |
105 void OnClearForm(); | 105 void OnClearForm(); |
106 void OnSetAutofillActionPreview(); | 106 void OnSetAutofillActionPreview(); |
107 void OnClearPreviewedForm(); | 107 void OnClearPreviewedForm(); |
108 void OnPreviewAutoCompleteNode(const base::string16& value); | |
Ilya Sherman
2014/02/22 05:59:51
nit: Please move this to be right after "OnSetNode
ziran.sun
2014/02/27 15:38:11
Done.
| |
108 void OnSetNodeText(const base::string16& value); | 109 void OnSetNodeText(const base::string16& value); |
109 void OnAcceptDataListSuggestion(const base::string16& value); | 110 void OnAcceptDataListSuggestion(const base::string16& value); |
110 void OnAcceptPasswordAutofillSuggestion(const base::string16& username); | 111 void OnAcceptPasswordAutofillSuggestion(const base::string16& username); |
111 | 112 |
112 // Called when interactive autocomplete finishes. | 113 // Called when interactive autocomplete finishes. |
113 void OnRequestAutocompleteResult( | 114 void OnRequestAutocompleteResult( |
114 blink::WebFormElement::AutocompleteResult result, | 115 blink::WebFormElement::AutocompleteResult result, |
115 const FormData& form_data); | 116 const FormData& form_data); |
116 | 117 |
117 // Called when an autocomplete request succeeds or fails with the |result|. | 118 // Called when an autocomplete request succeeds or fails with the |result|. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
166 // Fills |form| and |field| with the FormData and FormField corresponding to | 167 // Fills |form| and |field| with the FormData and FormField corresponding to |
167 // |node|. Returns true if the data was found; and false otherwise. | 168 // |node|. Returns true if the data was found; and false otherwise. |
168 bool FindFormAndFieldForNode( | 169 bool FindFormAndFieldForNode( |
169 const blink::WebNode& node, | 170 const blink::WebNode& node, |
170 FormData* form, | 171 FormData* form, |
171 FormFieldData* field) WARN_UNUSED_RESULT; | 172 FormFieldData* field) WARN_UNUSED_RESULT; |
172 | 173 |
173 // Set |node| to display the given |value|. | 174 // Set |node| to display the given |value|. |
174 void SetNodeText(const base::string16& value, blink::WebInputElement* node); | 175 void SetNodeText(const base::string16& value, blink::WebInputElement* node); |
175 | 176 |
177 // Set preview value for AutoComplete |node|. | |
Ilya Sherman
2014/02/22 05:59:51
nit: "Set |node| to display the given |value| as a
ziran.sun
2014/02/27 15:38:11
Done.
| |
178 void PreviewAutoCompleteNode(const base::string16& value, | |
179 blink::WebInputElement* node); | |
180 | |
176 // Hides any currently showing Autofill UI. | 181 // Hides any currently showing Autofill UI. |
177 void HideAutofillUI(); | 182 void HideAutofillUI(); |
178 | 183 |
179 FormCache form_cache_; | 184 FormCache form_cache_; |
180 | 185 |
181 PasswordAutofillAgent* password_autofill_agent_; // Weak reference. | 186 PasswordAutofillAgent* password_autofill_agent_; // Weak reference. |
182 PasswordGenerationAgent* password_generation_agent_; // Weak reference. | 187 PasswordGenerationAgent* password_generation_agent_; // Weak reference. |
183 | 188 |
184 // The ID of the last request sent for form field Autofill. Used to ignore | 189 // The ID of the last request sent for form field Autofill. Used to ignore |
185 // out of date responses. | 190 // out of date responses. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
238 FRIEND_TEST_ALL_PREFIXES( | 243 FRIEND_TEST_ALL_PREFIXES( |
239 PasswordAutofillAgentTest, | 244 PasswordAutofillAgentTest, |
240 PasswordAutofillTriggersOnChangeEventsWaitForUsername); | 245 PasswordAutofillTriggersOnChangeEventsWaitForUsername); |
241 | 246 |
242 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); | 247 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); |
243 }; | 248 }; |
244 | 249 |
245 } // namespace autofill | 250 } // namespace autofill |
246 | 251 |
247 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ | 252 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ |
OLD | NEW |