Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(412)

Unified Diff: components/autofill/content/renderer/autofill_agent.h

Issue 1026493002: Allow only a user gesture to trigger autofill popup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable user gesture check for tests. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/autofill/content/renderer/autofill_agent.h
diff --git a/components/autofill/content/renderer/autofill_agent.h b/components/autofill/content/renderer/autofill_agent.h
index da555e446f3aa6fd384ee1017358ae1b768fa251..074af74c436762b46333ec85541ac42428a8592f 100644
--- a/components/autofill/content/renderer/autofill_agent.h
+++ b/components/autofill/content/renderer/autofill_agent.h
@@ -54,6 +54,10 @@ class AutofillAgent : public content::RenderFrameObserver,
PasswordGenerationAgent* password_generation_agent);
virtual ~AutofillAgent();
+ void DisableUserGestureCheckForTests() {
+ disable_user_gesture_check_ = true;
+ }
+
private:
// Functor used as a simplified comparison function for FormData.
struct FormDataCompare {
@@ -274,6 +278,10 @@ class AutofillAgent : public content::RenderFrameObserver,
// messages to close the Autofill popup when it can't possibly be showing.
bool is_popup_possibly_visible_;
+ // If true, then user gestures are not required for processing text edit
+ // notifications. Used only in tests.
+ bool disable_user_gesture_check_;
+
base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(AutofillAgent);

Powered by Google App Engine
This is Rietveld 408576698