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

Side by Side Diff: third_party/WebKit/Source/core/input/EventHandler.h

Issue 1799253002: Stricter user gestures for touch - measure and warn (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 class ScrollableArea; 79 class ScrollableArea;
80 class Scrollbar; 80 class Scrollbar;
81 class ScrollState; 81 class ScrollState;
82 class SelectionController; 82 class SelectionController;
83 class TextEvent; 83 class TextEvent;
84 class WheelEvent; 84 class WheelEvent;
85 class Widget; 85 class Widget;
86 86
87 enum class DragInitiator; 87 enum class DragInitiator;
88 88
89 class CORE_EXPORT EventHandler final : public NoBaseWillBeGarbageCollectedFinali zed<EventHandler> { 89 class CORE_EXPORT EventHandler final : public NoBaseWillBeGarbageCollectedFinali zed<EventHandler>
90 , public UserGestureUsedCallback {
90 WTF_MAKE_NONCOPYABLE(EventHandler); 91 WTF_MAKE_NONCOPYABLE(EventHandler);
91 USING_FAST_MALLOC_WILL_BE_REMOVED(EventHandler); 92 USING_FAST_MALLOC_WILL_BE_REMOVED(EventHandler);
92 public: 93 public:
93 explicit EventHandler(LocalFrame*); 94 explicit EventHandler(LocalFrame*);
94 ~EventHandler(); 95 ~EventHandler();
95 DECLARE_TRACE(); 96 DECLARE_TRACE();
96 97
97 void clear(); 98 void clear();
98 void nodeWillBeRemoved(Node&); 99 void nodeWillBeRemoved(Node&);
99 100
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 bool handleTextInputEvent(const String& text, Event* underlyingEvent = nullp tr, TextEventInputType = TextEventInputKeyboard); 199 bool handleTextInputEvent(const String& text, Event* underlyingEvent = nullp tr, TextEventInputType = TextEventInputKeyboard);
199 void defaultTextInputEventHandler(TextEvent*); 200 void defaultTextInputEventHandler(TextEvent*);
200 201
201 void dragSourceEndedAt(const PlatformMouseEvent&, DragOperation); 202 void dragSourceEndedAt(const PlatformMouseEvent&, DragOperation);
202 203
203 void focusDocumentView(); 204 void focusDocumentView();
204 205
205 void capsLockStateMayHaveChanged(); // Only called by FrameSelection 206 void capsLockStateMayHaveChanged(); // Only called by FrameSelection
206 207
207 WebInputEventResult handleTouchEvent(const PlatformTouchEvent&); 208 WebInputEventResult handleTouchEvent(const PlatformTouchEvent&);
209 void userGestureUsed();
208 210
209 bool useHandCursor(Node*, bool isOverLink); 211 bool useHandCursor(Node*, bool isOverLink);
210 212
211 void notifyElementActivated(); 213 void notifyElementActivated();
212 214
213 PassRefPtr<UserGestureToken> takeLastMouseDownGestureToken() { return m_last MouseDownUserGestureToken.release(); } 215 PassRefPtr<UserGestureToken> takeLastMouseDownGestureToken() { return m_last MouseDownUserGestureToken.release(); }
214 216
215 int clickCount() { return m_clickCount; } 217 int clickCount() { return m_clickCount; }
216 218
217 SelectionController& selectionController() const { return *m_selectionContro ller; } 219 SelectionController& selectionController() const { return *m_selectionContro ller; }
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 // scroll which shouldn't propagate can't cause any element to 480 // scroll which shouldn't propagate can't cause any element to
479 // scroll other than the |m_previousGestureScrolledNode|. 481 // scroll other than the |m_previousGestureScrolledNode|.
480 bool m_deltaConsumedForScrollSequence; 482 bool m_deltaConsumedForScrollSequence;
481 }; 483 };
482 484
483 } // namespace blink 485 } // namespace blink
484 486
485 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::EventHandler::TouchInfo); 487 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::EventHandler::TouchInfo);
486 488
487 #endif // EventHandler_h 489 #endif // EventHandler_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698