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

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: 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
« 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 0fedba59f3a496103525fe1aed9303d273c918db..010dbab282444fd58f8971e42d135bf3bd206531 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,
@@ -249,7 +249,7 @@ bool AutofillAgent::InputElementClicked(const WebInputElement& element,
}
bool AutofillAgent::InputElementLostFocus() {
- Send(new AutofillHostMsg_HideAutofillPopup(routing_id()));
+ HideHostPopups();
return false;
}
@@ -491,16 +491,16 @@ void AutofillAgent::CombineDataListEntriesAndShow(
i.insert(i.end(), icons.begin(), icons.end());
ids.insert(ids.end(), item_ids.begin(), item_ids.end());
- WebKit::WebView* web_view = render_view()->GetWebView();
- if (!web_view)
- return;
-
Dan Beam 2012/10/30 00:44:15 tell me if there's any problem with this ever-so-s
if (v.empty()) {
// No suggestions, any popup currently showing is obsolete.
- web_view->hidePopups();
+ HidePopups();
return;
}
+ WebKit::WebView* web_view = render_view()->GetWebView();
+ if (!web_view)
+ return;
+
// Send to WebKit for display.
web_view->applyAutofillSuggestions(element, v, l, i, ids);
@@ -731,6 +731,8 @@ void AutofillAgent::HidePopups() {
WebKit::WebView* web_view = render_view()->GetWebView();
if (web_view)
web_view->hidePopups();
+
+ 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