| 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 #include "wtf/Optional.h" |
| 14 | 15 |
| 15 namespace blink { | 16 namespace blink { |
| 16 | 17 |
| 17 class ScrollManager; | 18 class ScrollManager; |
| 18 class SelectionController; | 19 class SelectionController; |
| 19 class PointerEventManager; | 20 class PointerEventManager; |
| 20 class MouseEventManager; | 21 class MouseEventManager; |
| 21 | 22 |
| 22 // This class takes care of gestures and delegating the action based on the | 23 // This class takes care of gestures and delegating the action based on the |
| 23 // gesture to the responsible class. | 24 // gesture to the responsible class. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 36 void clear(); | 37 void clear(); |
| 37 | 38 |
| 38 HitTestRequest::HitTestRequestType getHitTypeForGestureType( | 39 HitTestRequest::HitTestRequestType getHitTypeForGestureType( |
| 39 WebInputEvent::Type); | 40 WebInputEvent::Type); |
| 40 WebInputEventResult handleGestureEventInFrame( | 41 WebInputEventResult handleGestureEventInFrame( |
| 41 const GestureEventWithHitTestResults&); | 42 const GestureEventWithHitTestResults&); |
| 42 | 43 |
| 43 // TODO(nzolghadr): This can probably be hidden and the related logic | 44 // TODO(nzolghadr): This can probably be hidden and the related logic |
| 44 // be moved to this class (see crrev.com/112023010). Since that might cause | 45 // be moved to this class (see crrev.com/112023010). Since that might cause |
| 45 // regression it's better to move that logic in another change. | 46 // regression it's better to move that logic in another change. |
| 46 TimeTicks getLastShowPressTimestamp() const; | 47 WTF::Optional<WTF::TimeTicks> getLastShowPressTimestamp() const; |
| 47 | 48 |
| 48 private: | 49 private: |
| 49 WebInputEventResult handleGestureShowPress(); | 50 WebInputEventResult handleGestureShowPress(); |
| 50 WebInputEventResult handleGestureTapDown( | 51 WebInputEventResult handleGestureTapDown( |
| 51 const GestureEventWithHitTestResults&); | 52 const GestureEventWithHitTestResults&); |
| 52 WebInputEventResult handleGestureTap(const GestureEventWithHitTestResults&); | 53 WebInputEventResult handleGestureTap(const GestureEventWithHitTestResults&); |
| 53 WebInputEventResult handleGestureLongPress( | 54 WebInputEventResult handleGestureLongPress( |
| 54 const GestureEventWithHitTestResults&); | 55 const GestureEventWithHitTestResults&); |
| 55 WebInputEventResult handleGestureLongTap( | 56 WebInputEventResult handleGestureLongTap( |
| 56 const GestureEventWithHitTestResults&); | 57 const GestureEventWithHitTestResults&); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 73 | 74 |
| 74 // Set on GestureTapDown if the |pointerdown| event corresponding to the | 75 // Set on GestureTapDown if the |pointerdown| event corresponding to the |
| 75 // triggering |touchstart| event was canceled. This suppresses mouse event | 76 // triggering |touchstart| event was canceled. This suppresses mouse event |
| 76 // firing for the current gesture sequence (i.e. until next GestureTapDown). | 77 // firing for the current gesture sequence (i.e. until next GestureTapDown). |
| 77 bool m_suppressMouseEventsFromGestures; | 78 bool m_suppressMouseEventsFromGestures; |
| 78 | 79 |
| 79 bool m_longTapShouldInvokeContextMenu; | 80 bool m_longTapShouldInvokeContextMenu; |
| 80 | 81 |
| 81 const Member<SelectionController> m_selectionController; | 82 const Member<SelectionController> m_selectionController; |
| 82 | 83 |
| 83 TimeTicks m_lastShowPressTimestamp; | 84 WTF::Optional<WTF::TimeTicks> m_lastShowPressTimestamp; |
| 84 }; | 85 }; |
| 85 | 86 |
| 86 } // namespace blink | 87 } // namespace blink |
| 87 | 88 |
| 88 #endif // GestureManager_h | 89 #endif // GestureManager_h |
| OLD | NEW |