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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // PasswordAutofillAgent is guaranteed to outlive AutofillAgent. | 51 // PasswordAutofillAgent is guaranteed to outlive AutofillAgent. |
52 // PasswordGenerationAgent may be NULL. If it is not, then it is also | 52 // PasswordGenerationAgent may be NULL. If it is not, then it is also |
53 // guaranteed to outlive AutofillAgent. | 53 // guaranteed to outlive AutofillAgent. |
54 AutofillAgent(content::RenderFrame* render_frame, | 54 AutofillAgent(content::RenderFrame* render_frame, |
55 PasswordAutofillAgent* password_autofill_manager, | 55 PasswordAutofillAgent* password_autofill_manager, |
56 PasswordGenerationAgent* password_generation_agent); | 56 PasswordGenerationAgent* password_generation_agent); |
57 ~AutofillAgent() override; | 57 ~AutofillAgent() override; |
58 | 58 |
59 void BindRequest(mojom::AutofillAgentRequest request); | 59 void BindRequest(mojom::AutofillAgentRequest request); |
60 | 60 |
| 61 // mojom::AutofillAgent: |
| 62 void FirstUserGestureObservedInTab() override; |
| 63 void FillForm(int32_t id, |
| 64 const FormData& form, |
| 65 const FillFormCallback& callback) override; |
| 66 |
61 private: | 67 private: |
62 // Functor used as a simplified comparison function for FormData. Only | 68 // Functor used as a simplified comparison function for FormData. Only |
63 // compares forms at a high level (notably name, origin, action). | 69 // compares forms at a high level (notably name, origin, action). |
64 struct FormDataCompare { | 70 struct FormDataCompare { |
65 bool operator()(const FormData& lhs, const FormData& rhs) const; | 71 bool operator()(const FormData& lhs, const FormData& rhs) const; |
66 }; | 72 }; |
67 | 73 |
68 // Thunk class for RenderViewObserver methods that haven't yet been migrated | 74 // Thunk class for RenderViewObserver methods that haven't yet been migrated |
69 // to RenderFrameObserver. Should eventually be removed. | 75 // to RenderFrameObserver. Should eventually be removed. |
70 // http://crbug.com/433486 | 76 // http://crbug.com/433486 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 void setIgnoreTextChanges(bool ignore) override; | 154 void setIgnoreTextChanges(bool ignore) override; |
149 void didAssociateFormControls( | 155 void didAssociateFormControls( |
150 const blink::WebVector<blink::WebNode>& nodes) override; | 156 const blink::WebVector<blink::WebNode>& nodes) override; |
151 void openTextDataListChooser(const blink::WebInputElement& element) override; | 157 void openTextDataListChooser(const blink::WebInputElement& element) override; |
152 void dataListOptionsChanged(const blink::WebInputElement& element) override; | 158 void dataListOptionsChanged(const blink::WebInputElement& element) override; |
153 void firstUserGestureObserved() override; | 159 void firstUserGestureObserved() override; |
154 void ajaxSucceeded() override; | 160 void ajaxSucceeded() override; |
155 | 161 |
156 void OnFieldTypePredictionsAvailable( | 162 void OnFieldTypePredictionsAvailable( |
157 const std::vector<FormDataPredictions>& forms); | 163 const std::vector<FormDataPredictions>& forms); |
158 void OnFillForm(int query_id, const FormData& form); | |
159 void OnPing(); | 164 void OnPing(); |
160 void OnPreviewForm(int query_id, const FormData& form); | 165 void OnPreviewForm(int query_id, const FormData& form); |
161 | 166 |
162 // mojom::AutofillAgent: | |
163 void FirstUserGestureObservedInTab() override; | |
164 | |
165 // For external Autofill selection. | 167 // For external Autofill selection. |
166 void OnClearForm(); | 168 void OnClearForm(); |
167 void OnClearPreviewedForm(); | 169 void OnClearPreviewedForm(); |
168 void OnFillFieldWithValue(const base::string16& value); | 170 void OnFillFieldWithValue(const base::string16& value); |
169 void OnPreviewFieldWithValue(const base::string16& value); | 171 void OnPreviewFieldWithValue(const base::string16& value); |
170 void OnAcceptDataListSuggestion(const base::string16& value); | 172 void OnAcceptDataListSuggestion(const base::string16& value); |
171 void OnFillPasswordSuggestion(const base::string16& username, | 173 void OnFillPasswordSuggestion(const base::string16& username, |
172 const base::string16& password); | 174 const base::string16& password); |
173 void OnPreviewPasswordSuggestion(const base::string16& username, | 175 void OnPreviewPasswordSuggestion(const base::string16& username, |
174 const base::string16& password); | 176 const base::string16& password); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 mojom::AutofillDriverPtr mojo_autofill_driver_; | 287 mojom::AutofillDriverPtr mojo_autofill_driver_; |
286 | 288 |
287 base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_; | 289 base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_; |
288 | 290 |
289 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); | 291 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); |
290 }; | 292 }; |
291 | 293 |
292 } // namespace autofill | 294 } // namespace autofill |
293 | 295 |
294 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ | 296 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ |
OLD | NEW |