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 <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 const std::vector<FormDataPredictions>& forms); | 147 const std::vector<FormDataPredictions>& forms); |
148 void OnFillForm(int query_id, const FormData& form); | 148 void OnFillForm(int query_id, const FormData& form); |
149 void OnFirstUserGestureObservedInTab(); | 149 void OnFirstUserGestureObservedInTab(); |
150 void OnPing(); | 150 void OnPing(); |
151 void OnPreviewForm(int query_id, const FormData& form); | 151 void OnPreviewForm(int query_id, const FormData& form); |
152 | 152 |
153 // For external Autofill selection. | 153 // For external Autofill selection. |
154 void OnClearForm(); | 154 void OnClearForm(); |
155 void OnClearPreviewedForm(); | 155 void OnClearPreviewedForm(); |
156 void OnFillFieldWithValue(const base::string16& value); | 156 void OnFillFieldWithValue(const base::string16& value); |
157 void OnPreviewFieldWithValue(const base::string16& value); | 157 void OnPreviewFieldWithValue(const base::string16& value, int match_start); |
158 void OnAcceptDataListSuggestion(const base::string16& value); | 158 void OnAcceptDataListSuggestion(const base::string16& value); |
159 void OnFillPasswordSuggestion(const base::string16& username, | 159 void OnFillPasswordSuggestion(const base::string16& username, |
160 const base::string16& password); | 160 const base::string16& password); |
161 void OnPreviewPasswordSuggestion(const base::string16& username, | 161 void OnPreviewPasswordSuggestion(const base::string16& username, |
162 const base::string16& password); | 162 const base::string16& password, |
| 163 int start); |
163 | 164 |
164 // Called when interactive autocomplete finishes. |message| is printed to | 165 // Called when interactive autocomplete finishes. |message| is printed to |
165 // the console if non-empty. | 166 // the console if non-empty. |
166 void OnRequestAutocompleteResult( | 167 void OnRequestAutocompleteResult( |
167 blink::WebFormElement::AutocompleteResult result, | 168 blink::WebFormElement::AutocompleteResult result, |
168 const base::string16& message, | 169 const base::string16& message, |
169 const FormData& form_data); | 170 const FormData& form_data); |
170 | 171 |
171 // Called when an autocomplete request succeeds or fails with the |result|. | 172 // Called when an autocomplete request succeeds or fails with the |result|. |
172 void FinishAutocompleteRequest( | 173 void FinishAutocompleteRequest( |
(...skipping 25 matching lines...) Expand all Loading... |
198 FormFieldData* field) WARN_UNUSED_RESULT; | 199 FormFieldData* field) WARN_UNUSED_RESULT; |
199 | 200 |
200 // Set |node| to display the given |value|. | 201 // Set |node| to display the given |value|. |
201 void FillFieldWithValue(const base::string16& value, | 202 void FillFieldWithValue(const base::string16& value, |
202 blink::WebInputElement* node); | 203 blink::WebInputElement* node); |
203 | 204 |
204 // Set |node| to display the given |value| as a preview. The preview is | 205 // Set |node| to display the given |value| as a preview. The preview is |
205 // visible on screen to the user, but not visible to the page via the DOM or | 206 // visible on screen to the user, but not visible to the page via the DOM or |
206 // JavaScript. | 207 // JavaScript. |
207 void PreviewFieldWithValue(const base::string16& value, | 208 void PreviewFieldWithValue(const base::string16& value, |
208 blink::WebInputElement* node); | 209 blink::WebInputElement* node, |
| 210 int match_start); |
209 | 211 |
210 // Notifies browser of new fillable forms in |render_frame|. | 212 // Notifies browser of new fillable forms in |render_frame|. |
211 void ProcessForms(); | 213 void ProcessForms(); |
212 | 214 |
213 // Sends a message to the browser that the form is about to be submitted, | 215 // Sends a message to the browser that the form is about to be submitted, |
214 // only if the particular message has not been previously submitted for the | 216 // only if the particular message has not been previously submitted for the |
215 // form in the current frame. | 217 // form in the current frame. |
216 // Additionally, depending on |send_submitted_event| a message is sent to the | 218 // Additionally, depending on |send_submitted_event| a message is sent to the |
217 // browser that the form was submitted. | 219 // browser that the form was submitted. |
218 void SendFormEvents(const blink::WebFormElement& form, | 220 void SendFormEvents(const blink::WebFormElement& form, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 bool is_generation_popup_possibly_visible_; | 275 bool is_generation_popup_possibly_visible_; |
274 | 276 |
275 base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_; | 277 base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_; |
276 | 278 |
277 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); | 279 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); |
278 }; | 280 }; |
279 | 281 |
280 } // namespace autofill | 282 } // namespace autofill |
281 | 283 |
282 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ | 284 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ |
OLD | NEW |