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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 // only if the particular message has not been previously submitted for the | 214 // only if the particular message has not been previously submitted for the |
215 // form in the current frame. | 215 // form in the current frame. |
216 // Additionally, depending on |send_submitted_event| a message is sent to the | 216 // Additionally, depending on |send_submitted_event| a message is sent to the |
217 // browser that the form was submitted. | 217 // browser that the form was submitted. |
218 void SendFormEvents(const blink::WebFormElement& form, | 218 void SendFormEvents(const blink::WebFormElement& form, |
219 bool send_submitted_event); | 219 bool send_submitted_event); |
220 | 220 |
221 // Hides any currently showing Autofill popup. | 221 // Hides any currently showing Autofill popup. |
222 void HidePopup(); | 222 void HidePopup(); |
223 | 223 |
224 // Returns true if the text field change is due to a user gesture. Can be | |
225 // overriden in tests. | |
226 virtual bool IsUserGesture() const; | |
227 | |
228 // Formerly cached forms for all frames, now only caches forms for the current | 224 // Formerly cached forms for all frames, now only caches forms for the current |
229 // frame. | 225 // frame. |
230 FormCache form_cache_; | 226 FormCache form_cache_; |
231 | 227 |
232 // Keeps track of the forms for which a "will submit" message has been sent in | 228 // Keeps track of the forms for which a "will submit" message has been sent in |
233 // this frame's current load. We use a simplified comparison function. | 229 // this frame's current load. We use a simplified comparison function. |
234 std::set<FormData, FormDataCompare> submitted_forms_; | 230 std::set<FormData, FormDataCompare> submitted_forms_; |
235 | 231 |
236 PasswordAutofillAgent* password_autofill_agent_; // Weak reference. | 232 PasswordAutofillAgent* password_autofill_agent_; // Weak reference. |
237 PasswordGenerationAgent* password_generation_agent_; // Weak reference. | 233 PasswordGenerationAgent* password_generation_agent_; // Weak reference. |
(...skipping 29 matching lines...) Expand all Loading... |
267 bool is_popup_possibly_visible_; | 263 bool is_popup_possibly_visible_; |
268 | 264 |
269 base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_; | 265 base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_; |
270 | 266 |
271 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); | 267 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); |
272 }; | 268 }; |
273 | 269 |
274 } // namespace autofill | 270 } // namespace autofill |
275 | 271 |
276 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ | 272 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ |
OLD | NEW |