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

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: And a bit of cleanup Created 7 years, 8 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 b6da184e76c9f3c8ecc41bd270ad959cc1c323d0..9b53325ff0acda9a963e689fa7e36c900ba20b78 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_state.h"
#include "components/autofill/renderer/form_cache.h"
#include "components/autofill/renderer/page_click_listener.h"
#include "content/public/renderer/render_view_observer.h"
@@ -103,6 +104,8 @@ class AutofillAgent : public content::RenderViewObserver,
WebKit::WebFrame* frame,
const WebKit::WebFormElement& form) OVERRIDE;
virtual void setIgnoreTextChanges(bool ignore) OVERRIDE;
+ virtual void didAssociateFormControls(
+ const WebKit::WebVector<WebKit::WebNode>& nodes) OVERRIDE;
void OnSuggestionsReturned(int query_id,
const std::vector<base::string16>& values,
@@ -206,6 +209,8 @@ class AutofillAgent : public content::RenderViewObserver,
// Hides any currently showing Autofill UI in the browser only.
void HideHostAutofillUi();
+ void MaybeSendDynamicFormsSeen();
+
FormCache form_cache_;
PasswordAutofillAgent* password_autofill_agent_; // WEAK reference.
@@ -256,6 +261,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
+ // since the last loaded forms were sent to the browser process.
+ bool has_new_forms_for_browser_;
+
// 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.
@@ -269,6 +278,7 @@ class AutofillAgent : public content::RenderViewObserver,
friend class PasswordAutofillAgentTest;
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(PasswordAutofillAgentTest, WaitUsername);
FRIEND_TEST_ALL_PREFIXES(PasswordAutofillAgentTest, SuggestionAccept);

Powered by Google App Engine
This is Rietveld 408576698