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

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

Issue 2255323004: Create MouseEventManager and EventHandlingUtil (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing Created 4 years, 3 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 // 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 TouchEventManager_h 5 #ifndef TouchEventManager_h
6 #define TouchEventManager_h 6 #define TouchEventManager_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/events/PointerEventFactory.h" 9 #include "core/events/PointerEventFactory.h"
10 #include "platform/UserGestureIndicator.h" 10 #include "platform/UserGestureIndicator.h"
11 #include "public/platform/WebInputEventResult.h" 11 #include "public/platform/WebInputEventResult.h"
12 #include "wtf/Allocator.h" 12 #include "wtf/Allocator.h"
13 #include "wtf/HashMap.h" 13 #include "wtf/HashMap.h"
14 14
15 15
16 namespace blink { 16 namespace blink {
17 17
18 class LocalFrame; 18 class LocalFrame;
19 class Document; 19 class Document;
20 class PlatformTouchEvent; 20 class PlatformTouchEvent;
21 21
22 // This class takes care of dispatching all touch events and 22 // This class takes care of dispatching all touch events and
23 // maintaining related states. 23 // maintaining related states.
24 class CORE_EXPORT TouchEventManager: public UserGestureUtilizedCallback { 24 class CORE_EXPORT TouchEventManager : public GarbageCollectedFinalized<TouchEven tManager>, public UserGestureUtilizedCallback {
25 WTF_MAKE_NONCOPYABLE(TouchEventManager); 25 WTF_MAKE_NONCOPYABLE(TouchEventManager);
26 DISALLOW_NEW();
27 public: 26 public:
28 class TouchInfo { 27 class TouchInfo {
29 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 28 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
30 public: 29 public:
31 DEFINE_INLINE_TRACE() 30 DEFINE_INLINE_TRACE()
32 { 31 {
33 visitor->trace(touchNode); 32 visitor->trace(touchNode);
34 visitor->trace(targetFrame); 33 visitor->trace(targetFrame);
35 } 34 }
36 35
37 PlatformTouchPoint point; 36 PlatformTouchPoint point;
38 Member<Node> touchNode; 37 Member<Node> touchNode;
39 Member<LocalFrame> targetFrame; 38 Member<LocalFrame> targetFrame;
40 FloatPoint contentPoint; 39 FloatPoint contentPoint;
41 FloatSize adjustedRadius; 40 FloatSize adjustedRadius;
42 bool knownTarget; 41 bool knownTarget;
43 String region; 42 String region;
44 }; 43 };
45 44
46 explicit TouchEventManager(LocalFrame*); 45 explicit TouchEventManager(LocalFrame*);
47 ~TouchEventManager();
48 DECLARE_TRACE(); 46 DECLARE_TRACE();
49 47
50 // Does the hit-testing again if the original hit test result was not inside 48 // Does the hit-testing again if the original hit test result was not inside
51 // capturing frame for touch events. Returns true if touch events could be 49 // capturing frame for touch events. Returns true if touch events could be
52 // dispatched and otherwise returns false. 50 // dispatched and otherwise returns false.
53 bool reHitTestTouchPointsIfNeeded( 51 bool reHitTestTouchPointsIfNeeded(
54 const PlatformTouchEvent&, 52 const PlatformTouchEvent&,
55 HeapVector<TouchInfo>&); 53 HeapVector<TouchInfo>&);
56 54
57 // The TouchInfo array is reference just to prevent the copy. However, it 55 // The TouchInfo array is reference just to prevent the copy. However, it
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 bool m_touchScrollStarted; 101 bool m_touchScrollStarted;
104 // The touch event currently being handled or NoType if none. 102 // The touch event currently being handled or NoType if none.
105 PlatformEvent::EventType m_currentEvent; 103 PlatformEvent::EventType m_currentEvent;
106 }; 104 };
107 105
108 } // namespace blink 106 } // namespace blink
109 107
110 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::TouchEventManager::TouchInfo); 108 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::TouchEventManager::TouchInfo);
111 109
112 #endif // TouchEventManager_h 110 #endif // TouchEventManager_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/input/ScrollManager.cpp ('k') | third_party/WebKit/Source/core/input/TouchEventManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698