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

Unified Diff: third_party/WebKit/Source/core/input/TouchEventManager.h

Issue 1996143002: Deprecate use of user gestures during scroll-related touch events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with trunk Created 4 years, 7 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: third_party/WebKit/Source/core/input/TouchEventManager.h
diff --git a/third_party/WebKit/Source/core/input/TouchEventManager.h b/third_party/WebKit/Source/core/input/TouchEventManager.h
index da68249e5e07897db41b21fca2cbe65e93051a07..ef93f92567c8b39456974ee9ac90435c87be11f5 100644
--- a/third_party/WebKit/Source/core/input/TouchEventManager.h
+++ b/third_party/WebKit/Source/core/input/TouchEventManager.h
@@ -22,7 +22,7 @@ class PointerEventWithTarget;
// This class takes care of dispatching all touch events and
// maintaining related states.
-class CORE_EXPORT TouchEventManager {
+class CORE_EXPORT TouchEventManager: public UserGestureUtilizedCallback {
WTF_MAKE_NONCOPYABLE(TouchEventManager);
DISALLOW_NEW();
public:
@@ -68,8 +68,13 @@ public:
// Returns whether there is any touch on the screen.
bool isAnyTouchActive() const;
-private:
+ // Indicate that a touch scroll has started.
+ void setTouchScrollStarted() { m_touchScrollStarted = true; }
+
+ // Invoked when a UserGestureIndicator corresponding to a touch event is utilized.
+ void userGestureUtilized() override;
+private:
void updateTargetAndRegionMapsForTouchStarts(HeapVector<TouchInfo>&);
void setAllPropertiesOfTouchInfos(HeapVector<TouchInfo>&);
@@ -97,7 +102,10 @@ private:
bool m_touchPressed;
// True if waiting on first touch move after a touch start.
bool m_waitingForFirstTouchMove;
-
+ // True if a touch is active but scrolling/zooming has started.
+ bool m_touchScrollStarted;
+ // The touch event currently being handled or NoType if none.
+ PlatformEvent::EventType m_currentEvent;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698