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

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

Issue 2027473002: Deprecate use of user gestures during scroll-related touch events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: 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 f0ef96bae1e3ab40c7f1176f875aac1eb177b959..e5c8843fb97d82b7da9ce8992bce989c7a91a66e 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 {
DISALLOW_NEW();
public:
class TouchInfo {
@@ -67,8 +67,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>&);
@@ -96,7 +101,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