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

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

Issue 13264002: Requery the autofill server when forms and input fields are dynamically added. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more fixes. you get the drill. Created 7 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/renderer/autofill_agent.h
diff --git a/components/autofill/renderer/autofill_agent.h b/components/autofill/renderer/autofill_agent.h
index 12dd1b560d006d40fc6619843a8b796092f63a01..4fd7a8c48f0e4b49862630d7f54d69e85753af31 100644
--- a/components/autofill/renderer/autofill_agent.h
+++ b/components/autofill/renderer/autofill_agent.h
@@ -13,6 +13,7 @@
#include "base/memory/weak_ptr.h"
#include "base/time.h"
#include "base/timer.h"
+#include "components/autofill/common/forms_seen_param.h"
#include "components/autofill/renderer/form_cache.h"
#include "components/autofill/renderer/page_click_listener.h"
#include "content/public/renderer/render_view_observer.h"
@@ -206,6 +207,8 @@ class AutofillAgent : public content::RenderViewObserver,
// Hides any currently showing Autofill UI in the browser only.
void HideHostAutofillUi();
+ void SendDynamicFormsSeen();
+
FormCache form_cache_;
PasswordAutofillManager* password_autofill_manager_; // WEAK reference.
@@ -256,6 +259,10 @@ class AutofillAgent : public content::RenderViewObserver,
// Whether or not |topmost_frame_| is whitelisted for Autocheckout.
bool is_whitelisted_for_autocheckout_;
+ // Whether or not new forms/fields have been dynamically added
+ // post-document load.
+ bool forms_have_changed_since_load_;
Ilya Sherman 2013/04/06 00:29:39 You should make sure to initialize this in the ini
Ilya Sherman 2013/04/06 00:29:39 nit: This variable is actually tracking whether or
Dane Wallinga 2013/04/08 22:55:50 Done.
Dane Wallinga 2013/04/08 22:55:50 Done.
+
// Whether or not to ignore text changes. Useful for when we're committing
// a composition when we are defocusing the WebView and we don't want to
// trigger an autofill popup to show.
@@ -266,9 +273,13 @@ class AutofillAgent : public content::RenderViewObserver,
base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_;
+ virtual void didAssociateFormControls(
+ const WebKit::WebVector<WebKit::WebNode>& nodes) OVERRIDE;
Ilya Sherman 2013/04/06 00:29:39 nit: This should be grouped with whatever set of m
Dane Wallinga 2013/04/08 22:55:50 Done.
+
friend class PasswordAutofillManagerTest;
FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, FillFormElement);
FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, SendForms);
+ FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, SendDynamicForms);
FRIEND_TEST_ALL_PREFIXES(ChromeRenderViewTest, ShowAutofillWarning);
FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, WaitUsername);
FRIEND_TEST_ALL_PREFIXES(PasswordAutofillManagerTest, SuggestionAccept);

Powered by Google App Engine
This is Rietveld 408576698