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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 1388293002: Notify WebContentsObservers of user interactions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 512dfee75fcfe859870524425f795d18b164b4aa..b33017d8b5292a431e2633bc7fca955aa0bf23ad 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -991,6 +991,8 @@ void RenderWidgetHostImpl::ForwardWheelEventWithLatencyInfo(
if (IgnoreInputEvents())
return;
+ OnUserInput(wheel_event.type);
+
if (touch_emulator_ && touch_emulator_->HandleMouseWheelEvent(wheel_event))
return;
@@ -1105,6 +1107,9 @@ void RenderWidgetHostImpl::ForwardKeyboardEvent(
OnUserGesture();
}
+ if (key_event.type == WebKeyboardEvent::RawKeyDown)
jdduke (slow) 2015/10/21 20:53:51 Let's remove the explicit call here and in Forward
dominickn 2015/10/26 04:14:24 Done.
+ OnUserInput(key_event.type);
+
// Double check the type to make sure caller hasn't sent us nonsense that
// will mess up our key queue.
if (!WebInputEvent::isKeyboardEventType(key_event.type))
@@ -1862,6 +1867,7 @@ InputEventAckState RenderWidgetHostImpl::FilterInputEvent(
if (event.type == WebInputEvent::MouseDown ||
event.type == WebInputEvent::GestureTapDown) {
+ OnUserInput(event.type);
OnUserGesture();
}

Powered by Google App Engine
This is Rietveld 408576698