summaryrefslogtreecommitdiffstats
path: root/content/public
diff options
context:
space:
mode:
authordominickn <dominickn@chromium.org>2016-03-24 20:06:22 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-25 03:08:00 +0000
commit5cc29a417bcb7b86ca8ebc4304eefa4d74a7e919 (patch)
tree59e328c0344387a03921ca149ed88a7800922d21 /content/public
parent5f7188d95a25fca7424f0d6b56288139b85cf9e4 (diff)
downloadchromium_src-5cc29a417bcb7b86ca8ebc4304eefa4d74a7e919.zip
chromium_src-5cc29a417bcb7b86ca8ebc4304eefa4d74a7e919.tar.gz
chromium_src-5cc29a417bcb7b86ca8ebc4304eefa4d74a7e919.tar.bz2
Replace MouseWheel events with GestureScrollBegin in WebContentsObserver::DidGetUserInteraction
crbug.com/568183 implements GestureScrollBegin for mouse wheel events. Once this has landed, the mouse event coalescing currently performed by WebContentsObserver::DidGetUserInteraction will be redundant. This CL removes the mouse event coalescing, and changes DidGetUserInteraction to fire on GestureScrollBegin events. The event type used to signal scrolls in the method is changed from MouseWheel to GestureScrollBegin, as scroll events will now be fired on mobile scrolls as well as wheel scrolls. Finally, in clients of DidGetUserInteraction, MouseWheel is replaced with GestureScrollBegin, and references to 'wheel' are replaced with 'scroll'. BUG=590612 Review URL: https://codereview.chromium.org/1748553002 Cr-Commit-Position: refs/heads/master@{#383231}
Diffstat (limited to 'content/public')
-rw-r--r--content/public/browser/web_contents_observer.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
index 226f309..a3bc77f 100644
--- a/content/public/browser/web_contents_observer.h
+++ b/content/public/browser/web_contents_observer.h
@@ -327,15 +327,10 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener,
// 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);
+ // 2) the start of a scroll (blink::WebInputEvent::GestureScrollBegin);
// 3) any raw key down event (blink::WebInputEvent::RawKeyDown);
// 4) any gesture tap event (blink::WebInputEvent::GestureTapDown); and
// 5) a browser navigation or reload (blink::WebInputEvent::Undefined).
- // 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
- // the Blink EventHandler to detect the end of scrolls.
- // TODO(dominickn): replace MouseWheel with GestureScrollBegin.
virtual void DidGetUserInteraction(const blink::WebInputEvent::Type type) {}
// This method is invoked when a RenderViewHost of this WebContents was