OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef GestureManager_h | 5 #ifndef GestureManager_h |
6 #define GestureManager_h | 6 #define GestureManager_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/frame/LocalFrame.h" | 9 #include "core/frame/LocalFrame.h" |
10 #include "core/layout/HitTestRequest.h" | 10 #include "core/layout/HitTestRequest.h" |
11 #include "core/page/EventWithHitTestResults.h" | 11 #include "core/page/EventWithHitTestResults.h" |
12 #include "platform/PlatformEvent.h" | 12 #include "platform/PlatformEvent.h" |
13 #include "public/platform/WebInputEventResult.h" | 13 #include "public/platform/WebInputEventResult.h" |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
16 | 16 |
17 class ScrollManager; | 17 class ScrollManager; |
18 class SelectionController; | 18 class SelectionController; |
19 class PointerEventManager; | 19 class PointerEventManager; |
| 20 class MouseEventManager; |
20 | 21 |
21 // This class takes care of gestures and delegating the action based on the | 22 // This class takes care of gestures and delegating the action based on the |
22 // gesture to the responsible class. | 23 // gesture to the responsible class. |
23 class CORE_EXPORT GestureManager | 24 class CORE_EXPORT GestureManager |
24 : public GarbageCollectedFinalized<GestureManager> { | 25 : public GarbageCollectedFinalized<GestureManager> { |
25 WTF_MAKE_NONCOPYABLE(GestureManager); | 26 WTF_MAKE_NONCOPYABLE(GestureManager); |
26 | 27 |
27 public: | 28 public: |
28 GestureManager(LocalFrame*, | 29 GestureManager(LocalFrame*, |
29 ScrollManager*, | 30 ScrollManager*, |
| 31 MouseEventManager*, |
30 PointerEventManager*, | 32 PointerEventManager*, |
31 SelectionController*); | 33 SelectionController*); |
32 DECLARE_TRACE(); | 34 DECLARE_TRACE(); |
33 | 35 |
34 void clear(); | 36 void clear(); |
35 | 37 |
36 HitTestRequest::HitTestRequestType getHitTypeForGestureType( | 38 HitTestRequest::HitTestRequestType getHitTypeForGestureType( |
37 PlatformEvent::EventType); | 39 PlatformEvent::EventType); |
38 WebInputEventResult handleGestureEventInFrame( | 40 WebInputEventResult handleGestureEventInFrame( |
39 const GestureEventWithHitTestResults&); | 41 const GestureEventWithHitTestResults&); |
(...skipping 19 matching lines...) Expand all Loading... |
59 const GestureEventWithHitTestResults&); | 61 const GestureEventWithHitTestResults&); |
60 | 62 |
61 FrameHost* frameHost() const; | 63 FrameHost* frameHost() const; |
62 | 64 |
63 // NOTE: If adding a new field to this class please ensure that it is | 65 // NOTE: If adding a new field to this class please ensure that it is |
64 // cleared if needed in |GestureManager::clear()|. | 66 // cleared if needed in |GestureManager::clear()|. |
65 | 67 |
66 const Member<LocalFrame> m_frame; | 68 const Member<LocalFrame> m_frame; |
67 | 69 |
68 Member<ScrollManager> m_scrollManager; | 70 Member<ScrollManager> m_scrollManager; |
| 71 Member<MouseEventManager> m_mouseEventManager; |
69 Member<PointerEventManager> m_pointerEventManager; | 72 Member<PointerEventManager> m_pointerEventManager; |
70 | 73 |
71 // Set on GestureTapDown if the |pointerdown| event corresponding to the | 74 // Set on GestureTapDown if the |pointerdown| event corresponding to the |
72 // triggering |touchstart| event was canceled. This suppresses mouse event | 75 // triggering |touchstart| event was canceled. This suppresses mouse event |
73 // firing for the current gesture sequence (i.e. until next GestureTapDown). | 76 // firing for the current gesture sequence (i.e. until next GestureTapDown). |
74 bool m_suppressMouseEventsFromGestures; | 77 bool m_suppressMouseEventsFromGestures; |
75 | 78 |
76 bool m_longTapShouldInvokeContextMenu; | 79 bool m_longTapShouldInvokeContextMenu; |
77 | 80 |
78 const Member<SelectionController> m_selectionController; | 81 const Member<SelectionController> m_selectionController; |
79 | 82 |
80 double m_lastShowPressTimestamp; | 83 double m_lastShowPressTimestamp; |
81 }; | 84 }; |
82 | 85 |
83 } // namespace blink | 86 } // namespace blink |
84 | 87 |
85 #endif // GestureManager_h | 88 #endif // GestureManager_h |
OLD | NEW |