Chromium Code Reviews| 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 | 20 |
| 21 // This class takes care of gestures and delegating the action based on the | 21 // This class takes care of gestures and delegating the action based on the |
| 22 // gesture to the responsible class. | 22 // gesture to the responsible class. |
| 23 class CORE_EXPORT GestureManager { | 23 class CORE_EXPORT GestureManager final : public GarbageCollectedFinalized<Gestur eManager> { |
|
haraken
2016/09/01 23:31:15
Maybe you can drop 'Finalized' and remove the dest
Navid Zolghadr
2016/09/02 16:36:45
Done.
| |
| 24 WTF_MAKE_NONCOPYABLE(GestureManager); | 24 WTF_MAKE_NONCOPYABLE(GestureManager); |
| 25 DISALLOW_NEW(); | |
| 26 | 25 |
| 27 public: | 26 public: |
| 28 GestureManager(LocalFrame*, ScrollManager*, PointerEventManager*, | 27 GestureManager(LocalFrame*, ScrollManager*, PointerEventManager*, |
| 29 SelectionController*); | 28 SelectionController*); |
| 30 ~GestureManager(); | 29 ~GestureManager(); |
| 31 DECLARE_TRACE(); | 30 DECLARE_TRACE(); |
| 32 | 31 |
| 33 void clear(); | 32 void clear(); |
| 34 | 33 |
| 35 HitTestRequest::HitTestRequestType getHitTypeForGestureType(PlatformEvent::E ventType); | 34 HitTestRequest::HitTestRequestType getHitTypeForGestureType(PlatformEvent::E ventType); |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 50 | 49 |
| 51 WebInputEventResult sendContextMenuEventForGesture(const GestureEventWithHit TestResults&); | 50 WebInputEventResult sendContextMenuEventForGesture(const GestureEventWithHit TestResults&); |
| 52 | 51 |
| 53 FrameHost* frameHost() const; | 52 FrameHost* frameHost() const; |
| 54 | 53 |
| 55 // NOTE: If adding a new field to this class please ensure that it is | 54 // NOTE: If adding a new field to this class please ensure that it is |
| 56 // cleared if needed in |GestureManager::clear()|. | 55 // cleared if needed in |GestureManager::clear()|. |
| 57 | 56 |
| 58 const Member<LocalFrame> m_frame; | 57 const Member<LocalFrame> m_frame; |
| 59 | 58 |
| 60 ScrollManager* m_scrollManager; | 59 Member<ScrollManager> m_scrollManager; |
| 61 PointerEventManager* m_pointerEventManager; | 60 Member<PointerEventManager> m_pointerEventManager; |
| 62 | 61 |
| 63 // Set on GestureTapDown if the |pointerdown| event corresponding to the | 62 // Set on GestureTapDown if the |pointerdown| event corresponding to the |
| 64 // triggering |touchstart| event was canceled. This suppresses mouse event | 63 // triggering |touchstart| event was canceled. This suppresses mouse event |
| 65 // firing for the current gesture sequence (i.e. until next GestureTapDown). | 64 // firing for the current gesture sequence (i.e. until next GestureTapDown). |
| 66 bool m_suppressMouseEventsFromGestures; | 65 bool m_suppressMouseEventsFromGestures; |
| 67 | 66 |
| 68 bool m_longTapShouldInvokeContextMenu; | 67 bool m_longTapShouldInvokeContextMenu; |
| 69 | 68 |
| 70 const Member<SelectionController> m_selectionController; | 69 const Member<SelectionController> m_selectionController; |
| 71 | 70 |
| 72 double m_lastShowPressTimestamp; | 71 double m_lastShowPressTimestamp; |
| 73 }; | 72 }; |
| 74 | 73 |
| 75 } // namespace blink | 74 } // namespace blink |
| 76 | 75 |
| 77 #endif // GestureManager_h | 76 #endif // GestureManager_h |
| OLD | NEW |