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

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

Issue 11273096: [autofill] When hiding popups in the renderer also hide those in the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « chrome/renderer/autofill/autofill_agent.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/autofill/autofill_agent.cc
diff --git a/chrome/renderer/autofill/autofill_agent.cc b/chrome/renderer/autofill/autofill_agent.cc
index 878634e5db895d953dce4293c57034b1a72f6bbd..94485e0abf5da9b0edf2b8b3c102743dc3d6f155 100644
--- a/chrome/renderer/autofill/autofill_agent.cc
+++ b/chrome/renderer/autofill/autofill_agent.cc
@@ -205,14 +205,14 @@ void AutofillAgent::ZoomLevelChanged() {
// Any time the zoom level changes, the page's content moves, so any Autofill
// popups should be hidden. This is only needed for the new Autofill UI
// because WebKit already knows to hide the old UI when this occurs.
- Send(new AutofillHostMsg_HideAutofillPopup(routing_id()));
+ HideHostPopups();
}
void AutofillAgent::DidChangeScrollOffset(WebKit::WebFrame*) {
// Any time the scroll offset changes, the page's content moves, so Autofill
// popups should be hidden. This is only needed for the new Autofill UI
// because WebKit already knows to hide the old UI when this occurs.
- Send(new AutofillHostMsg_HideAutofillPopup(routing_id()));
+ HideHostPopups();
}
void AutofillAgent::didRequestAutocomplete(WebKit::WebFrame* frame,
@@ -225,6 +225,7 @@ void AutofillAgent::didRequestAutocomplete(WebKit::WebFrame* frame,
// Any popup currently showing is obsolete.
HidePopups();
+ HideHostPopups();
FormData form_data;
if (WebFormElementToFormData(form,
@@ -249,7 +250,7 @@ bool AutofillAgent::InputElementClicked(const WebInputElement& element,
}
bool AutofillAgent::InputElementLostFocus() {
- Send(new AutofillHostMsg_HideAutofillPopup(routing_id()));
+ HideHostPopups();
return false;
}
@@ -498,6 +499,7 @@ void AutofillAgent::CombineDataListEntriesAndShow(
if (v.empty()) {
// No suggestions, any popup currently showing is obsolete.
web_view->hidePopups();
+ HideHostPopups();
return;
}
@@ -630,6 +632,7 @@ void AutofillAgent::ShowSuggestions(const WebInputElement& element,
element.selectionEnd() != static_cast<int>(value.length())))) {
// Any popup currently showing is obsolete.
HidePopups();
+ HideHostPopups();
return;
}
@@ -735,4 +738,8 @@ void AutofillAgent::HidePopups() {
web_view->hidePopups();
}
Ilya Sherman 2012/10/29 23:14:19 nit: I think this should also call HideHostPopups(
Dan Beam 2012/10/30 00:44:15 Done.
+void AutofillAgent::HideHostPopups() {
+ Send(new AutofillHostMsg_HideAutofillPopup(routing_id()));
+}
+
} // namespace autofill
« no previous file with comments | « chrome/renderer/autofill/autofill_agent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698