Chromium Code Reviews (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out

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

Issue 11270018: [autofill] Adding new API to request an interactive autocomplete UI flow. (Closed) Base URL: svn://
Patch Set: isherman@ review Created 8 years, 2 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: chrome/renderer/autofill/autofill_agent.h
diff --git a/chrome/renderer/autofill/autofill_agent.h b/chrome/renderer/autofill/autofill_agent.h
index cc60560a395426c1143f3a140e87ccf7284b11f5..aea8047d8c852deecd7449a16f79387090134122 100644
--- a/chrome/renderer/autofill/autofill_agent.h
+++ b/chrome/renderer/autofill/autofill_agent.h
@@ -88,6 +88,9 @@ class AutofillAgent : public content::RenderViewObserver,
virtual void textFieldDidReceiveKeyDown(
const WebKit::WebInputElement& element,
const WebKit::WebKeyboardEvent& event) OVERRIDE;
+ virtual void didRequestAutocomplete(
+ WebKit::WebFrame* frame,
+ const WebKit::WebFormElement& form) OVERRIDE;
void OnSuggestionsReturned(int query_id,
const std::vector<string16>& values,
@@ -107,6 +110,9 @@ class AutofillAgent : public content::RenderViewObserver,
void OnAcceptDataListSuggestion(const string16& value);
void OnAcceptPasswordAutofillSuggestion(const string16& value);
+ // For interactive autocomplete.
+ void OnRequestAutocompleteFinished(int result);
// Called in a posted task by textFieldDidChange() to work-around a WebKit bug
void TextFieldDidChangeImpl(const WebKit::WebInputElement& element);
@@ -162,6 +168,9 @@ class AutofillAgent : public content::RenderViewObserver,
// Set |node| to display the given |value|.
void SetNodeText(const string16& value, WebKit::WebInputElement* node);
+ // Hides any currently showing Autofill popups.
+ void HidePopups();
FormCache form_cache_;
PasswordAutofillManager* password_autofill_manager_; // WEAK reference.
@@ -173,6 +182,10 @@ class AutofillAgent : public content::RenderViewObserver,
// The element corresponding to the last request sent for form field Autofill.
WebKit::WebInputElement element_;
+ // The element corresponding to the last request sent for an interactive
+ // autocomplete.
+ WebKit::WebFormElement form_;
// The action to take when receiving Autofill data from the AutofillManager.
AutofillAction autofill_action_;
@@ -189,6 +202,9 @@ class AutofillAgent : public content::RenderViewObserver,
// If true we just set the node text so we shouldn't show the popup.
bool did_set_node_text_;
+ // Whether there is a pending request for an interactive autocomplete.
+ bool has_requested_autocomplete_;
base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_;
friend class PasswordAutofillManagerTest;

Powered by Google App Engine
This is Rietveld 408576698