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

Unified Diff: content/public/browser/web_contents_observer.h

Issue 1407053010: Make mouse wheel events trigger WebContentsObserver::DidGetUserInteraction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing nit Created 5 years, 1 month 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/public/browser/web_contents_observer.h
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
index 37f28b1191abe06936caf47801ade9828344e210..edc4dd26ab3216363c54b02a31e6df4ba28ad109 100644
--- a/content/public/browser/web_contents_observer.h
+++ b/content/public/browser/web_contents_observer.h
@@ -319,8 +319,16 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener,
virtual void DidGetUserGesture() {}
// Called when there has been direct user interaction with the WebContents.
- // Direct user input includes 1) any mouse down event; 2) any raw key down
- // event; and 3) any gesture tap event (including taps and scrolls).
+ // The type argument specifies the kind of interaction. Direct user input
+ // signalled through this callback includes:
+ // 1) any mouse down event (blink::WebInputEvent::MouseDown);
+ // 2) the start of a mouse wheel scroll (blink::WebInputEvent::MouseWheel);
+ // 3) any raw key down event (blink::WebInputEvent::RawKeyDown); and
+ // 4) any gesture tap event (blink::WebInputEvent::GestureTapDown).
+ // The start of a mouse wheel scroll is heuristically detected: a mouse
+ // wheel event fired at least 0.1 seconds after any other wheel event is
+ // regarded as the beginning of a scroll. This matches the interval used by
+ // blink to detect the end of scrolls.
nasko 2015/11/04 17:31:23 nit: Blink
dominickn 2015/11/04 23:21:25 Done.
virtual void DidGetUserInteraction(const blink::WebInputEvent::Type type) {}
// This method is invoked when a RenderViewHost of this WebContents was

Powered by Google App Engine
This is Rietveld 408576698