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

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

Issue 2137113002: Create GestureManager class and move related logic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the nits Created 4 years, 5 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 10 matching lines...) Expand all
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef EventHandler_h 26 #ifndef EventHandler_h
27 #define EventHandler_h 27 #define EventHandler_h
28 28
29 #include "core/CoreExport.h" 29 #include "core/CoreExport.h"
30 #include "core/events/TextEventInputType.h" 30 #include "core/events/TextEventInputType.h"
31 #include "core/input/GestureManager.h"
31 #include "core/input/KeyboardEventManager.h" 32 #include "core/input/KeyboardEventManager.h"
32 #include "core/input/PointerEventManager.h" 33 #include "core/input/PointerEventManager.h"
33 #include "core/input/ScrollManager.h" 34 #include "core/input/ScrollManager.h"
34 #include "core/layout/HitTestRequest.h" 35 #include "core/layout/HitTestRequest.h"
35 #include "core/page/DragActions.h" 36 #include "core/page/DragActions.h"
36 #include "core/page/EventWithHitTestResults.h" 37 #include "core/page/EventWithHitTestResults.h"
37 #include "core/style/ComputedStyleConstants.h" 38 #include "core/style/ComputedStyleConstants.h"
38 #include "platform/Cursor.h" 39 #include "platform/Cursor.h"
39 #include "platform/PlatformMouseEvent.h" 40 #include "platform/PlatformMouseEvent.h"
40 #include "platform/PlatformTouchPoint.h" 41 #include "platform/PlatformTouchPoint.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 void defaultArrowEventHandler(WebFocusType, KeyboardEvent*); 319 void defaultArrowEventHandler(WebFocusType, KeyboardEvent*);
319 320
320 void updateLastScrollbarUnderMouse(Scrollbar*, bool); 321 void updateLastScrollbarUnderMouse(Scrollbar*, bool);
321 322
322 bool capturesDragging() const { return m_capturesDragging; } 323 bool capturesDragging() const { return m_capturesDragging; }
323 324
324 WebInputEventResult handleGestureShowPress(); 325 WebInputEventResult handleGestureShowPress();
325 326
326 void setLastKnownMousePosition(const PlatformMouseEvent&); 327 void setLastKnownMousePosition(const PlatformMouseEvent&);
327 328
329 void setClickNode(Node*);
330 bool handleDragDropIfPossible(const GestureEventWithHitTestResults&);
331 static ContainerNode* parentForClickEvent(const Node&);
332
328 bool shouldTopControlsConsumeScroll(FloatSize) const; 333 bool shouldTopControlsConsumeScroll(FloatSize) const;
329 334
330 // If the given element is a shadow host and its root has delegatesFocus=fal se flag, 335 // If the given element is a shadow host and its root has delegatesFocus=fal se flag,
331 // slide focus to its inner element. Returns true if the resulting focus is different from 336 // slide focus to its inner element. Returns true if the resulting focus is different from
332 // the given element. 337 // the given element.
333 bool slideFocusOnShadowHostIfNecessary(const Element&); 338 bool slideFocusOnShadowHostIfNecessary(const Element&);
334 339
335 FrameHost* frameHost() const; 340 FrameHost* frameHost() const;
336 341
337 // NOTE: If adding a new field to this class please ensure that it is 342 // NOTE: If adding a new field to this class please ensure that it is
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 IntPoint m_lastKnownMousePosition; 390 IntPoint m_lastKnownMousePosition;
386 IntPoint m_lastKnownMouseGlobalPosition; 391 IntPoint m_lastKnownMouseGlobalPosition;
387 IntPoint m_mouseDownPos; // In our view's coords. 392 IntPoint m_mouseDownPos; // In our view's coords.
388 double m_mouseDownTimestamp; 393 double m_mouseDownTimestamp;
389 PlatformMouseEvent m_mouseDown; 394 PlatformMouseEvent m_mouseDown;
390 RefPtr<UserGestureToken> m_lastMouseDownUserGestureToken; 395 RefPtr<UserGestureToken> m_lastMouseDownUserGestureToken;
391 396
392 PointerEventManager m_pointerEventManager; 397 PointerEventManager m_pointerEventManager;
393 ScrollManager m_scrollManager; 398 ScrollManager m_scrollManager;
394 KeyboardEventManager m_keyboardEventManager; 399 KeyboardEventManager m_keyboardEventManager;
400 GestureManager m_gestureManager;
395 401
396 double m_maxMouseMovedDuration; 402 double m_maxMouseMovedDuration;
397 403
398 bool m_longTapShouldInvokeContextMenu; 404 bool m_longTapShouldInvokeContextMenu;
399 405
400 Timer<EventHandler> m_activeIntervalTimer; 406 Timer<EventHandler> m_activeIntervalTimer;
401 double m_lastShowPressTimestamp; 407 double m_lastShowPressTimestamp;
402 Member<Element> m_lastDeferredTapElement; 408 Member<Element> m_lastDeferredTapElement;
403 409
404 // Set on GestureTapDown if the |pointerdown| event corresponding to the 410 // Set on GestureTapDown if the |pointerdown| event corresponding to the
405 // triggering |touchstart| event was canceled. This suppresses mouse event 411 // triggering |touchstart| event was canceled. This suppresses mouse event
406 // firing for the current gesture sequence (i.e. until next GestureTapDown). 412 // firing for the current gesture sequence (i.e. until next GestureTapDown).
407 bool m_suppressMouseEventsFromGestures; 413 bool m_suppressMouseEventsFromGestures;
414
415 // TODO(nzolghadr): Temporary until further refactoring
416 friend GestureManager;
408 }; 417 };
409 418
410 } // namespace blink 419 } // namespace blink
411 420
412 #endif // EventHandler_h 421 #endif // EventHandler_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/input/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698