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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 public blink::WebAutofillClient { | 47 public blink::WebAutofillClient { |
48 public: | 48 public: |
49 // PasswordAutofillAgent is guaranteed to outlive AutofillAgent. | 49 // PasswordAutofillAgent is guaranteed to outlive AutofillAgent. |
50 // PasswordGenerationAgent may be NULL. If it is not, then it is also | 50 // PasswordGenerationAgent may be NULL. If it is not, then it is also |
51 // guaranteed to outlive AutofillAgent. | 51 // guaranteed to outlive AutofillAgent. |
52 AutofillAgent(content::RenderFrame* render_frame, | 52 AutofillAgent(content::RenderFrame* render_frame, |
53 PasswordAutofillAgent* password_autofill_manager, | 53 PasswordAutofillAgent* password_autofill_manager, |
54 PasswordGenerationAgent* password_generation_agent); | 54 PasswordGenerationAgent* password_generation_agent); |
55 virtual ~AutofillAgent(); | 55 virtual ~AutofillAgent(); |
56 | 56 |
| 57 void DisableUserGestureCheckForTests() { |
| 58 disable_user_gesture_check_ = true; |
| 59 } |
| 60 |
57 private: | 61 private: |
58 // Functor used as a simplified comparison function for FormData. | 62 // Functor used as a simplified comparison function for FormData. |
59 struct FormDataCompare { | 63 struct FormDataCompare { |
60 bool operator()(const FormData& lhs, const FormData& rhs) const; | 64 bool operator()(const FormData& lhs, const FormData& rhs) const; |
61 }; | 65 }; |
62 | 66 |
63 // Thunk class for RenderViewObserver methods that haven't yet been migrated | 67 // Thunk class for RenderViewObserver methods that haven't yet been migrated |
64 // to RenderFrameObserver. Should eventually be removed. | 68 // to RenderFrameObserver. Should eventually be removed. |
65 // http://crbug.com/433486 | 69 // http://crbug.com/433486 |
66 class LegacyAutofillAgent : public content::RenderViewObserver { | 70 class LegacyAutofillAgent : public content::RenderViewObserver { |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 // Whether or not to ignore text changes. Useful for when we're committing | 271 // Whether or not to ignore text changes. Useful for when we're committing |
268 // a composition when we are defocusing the WebView and we don't want to | 272 // a composition when we are defocusing the WebView and we don't want to |
269 // trigger an autofill popup to show. | 273 // trigger an autofill popup to show. |
270 bool ignore_text_changes_; | 274 bool ignore_text_changes_; |
271 | 275 |
272 // Whether the Autofill popup is possibly visible. This is tracked as a | 276 // Whether the Autofill popup is possibly visible. This is tracked as a |
273 // performance improvement, so that the IPC channel isn't flooded with | 277 // performance improvement, so that the IPC channel isn't flooded with |
274 // messages to close the Autofill popup when it can't possibly be showing. | 278 // messages to close the Autofill popup when it can't possibly be showing. |
275 bool is_popup_possibly_visible_; | 279 bool is_popup_possibly_visible_; |
276 | 280 |
| 281 // If true, then user gestures are not required for processing text edit |
| 282 // notifications. Used only in tests. |
| 283 bool disable_user_gesture_check_; |
| 284 |
277 base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_; | 285 base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_; |
278 | 286 |
279 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); | 287 DISALLOW_COPY_AND_ASSIGN(AutofillAgent); |
280 }; | 288 }; |
281 | 289 |
282 } // namespace autofill | 290 } // namespace autofill |
283 | 291 |
284 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ | 292 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_AUTOFILL_AGENT_H_ |
OLD | NEW |