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

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

Issue 10218001: Add ZoomLevelChanged and DidChangeScrollOffset to RenderViewObserver (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Hide popup for all scrolls and zoom Created 8 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
« no previous file with comments | « chrome/renderer/autofill/autofill_agent.h ('k') | content/public/renderer/render_view_observer.h » ('j') | 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 f250e4fd5ac2566f201cce9ab5b21b60a09b508a..0b28d452e6dd2af761b116f6b78eb7028373cc1c 100644
--- a/chrome/renderer/autofill/autofill_agent.cc
+++ b/chrome/renderer/autofill/autofill_agent.cc
@@ -155,6 +155,20 @@ void AutofillAgent::WillSubmitForm(WebFrame* frame,
}
}
+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()));
+}
+
+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()));
+}
+
bool AutofillAgent::InputElementClicked(const WebInputElement& element,
bool was_focused,
bool is_focused) {
« no previous file with comments | « chrome/renderer/autofill/autofill_agent.h ('k') | content/public/renderer/render_view_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698