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

Side by Side Diff: sky/engine/core/frame/NewEventHandler.h

Issue 874823002: Move GestureEvent to NewEventDispatcher (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Build fixes Created 5 years, 11 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
« no previous file with comments | « sky/engine/core/events/PointerEvent.cpp ('k') | sky/engine/core/frame/NewEventHandler.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 SKY_ENGINE_CORE_FRAME_NEWEVENTHANDLER_H_ 5 #ifndef SKY_ENGINE_CORE_FRAME_NEWEVENTHANDLER_H_
6 #define SKY_ENGINE_CORE_FRAME_NEWEVENTHANDLER_H_ 6 #define SKY_ENGINE_CORE_FRAME_NEWEVENTHANDLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include "sky/engine/core/dom/Node.h" 9 #include "sky/engine/core/dom/Node.h"
10 #include "sky/engine/core/rendering/HitTestRequest.h" 10 #include "sky/engine/core/rendering/HitTestRequest.h"
11 #include "sky/engine/core/rendering/HitTestResult.h" 11 #include "sky/engine/core/rendering/HitTestResult.h"
12 #include "sky/engine/wtf/HashMap.h" 12 #include "sky/engine/wtf/HashMap.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class LocalFrame; 16 class LocalFrame;
17 class WebGestureEvent;
17 class WebPointerEvent; 18 class WebPointerEvent;
18 19
19 class NewEventHandler { 20 class NewEventHandler {
20 WTF_MAKE_NONCOPYABLE(NewEventHandler); 21 WTF_MAKE_NONCOPYABLE(NewEventHandler);
21 public: 22 public:
22 explicit NewEventHandler(LocalFrame&); 23 explicit NewEventHandler(LocalFrame&);
23 ~NewEventHandler(); 24 ~NewEventHandler();
24 25
25 bool handlePointerEvent(const WebPointerEvent&); 26 bool handlePointerEvent(const WebPointerEvent&);
27 bool handleGestureEvent(const WebGestureEvent&);
26 28
27 private: 29 private:
28 bool handlePointerDownEvent(const WebPointerEvent&); 30 bool handlePointerDownEvent(const WebPointerEvent&);
29 bool handlePointerUpEvent(const WebPointerEvent&); 31 bool handlePointerUpEvent(const WebPointerEvent&);
30 bool handlePointerMoveEvent(const WebPointerEvent&); 32 bool handlePointerMoveEvent(const WebPointerEvent&);
31 bool handlePointerCancelEvent(const WebPointerEvent&); 33 bool handlePointerCancelEvent(const WebPointerEvent&);
32 34
35 bool dispatchGestureEvent(Node& target, const WebGestureEvent& event);
33 bool dispatchPointerEvent(Node& target, const WebPointerEvent&); 36 bool dispatchPointerEvent(Node& target, const WebPointerEvent&);
34 bool dispatchClickEvent(Node& capturingTarget, const WebPointerEvent&); 37 bool dispatchClickEvent(Node& capturingTarget, const WebPointerEvent&);
35 38
36 Node* targetForHitTestResult(const HitTestResult& hitTestResult); 39 Node* targetForHitTestResult(const HitTestResult& hitTestResult);
37 HitTestResult performHitTest(const LayoutPoint&); 40 HitTestResult performHitTest(const LayoutPoint&);
38 void updateSelectionForPointerDown(const HitTestResult&, const WebPointerEve nt&); 41 void updateSelectionForPointerDown(const HitTestResult&, const WebPointerEve nt&);
39 42
40 typedef std::map<int, RefPtr<Node>> PointerTargetMap; 43 typedef std::map<int, RefPtr<Node>> PointerTargetMap;
41 44
42 LocalFrame& m_frame; 45 LocalFrame& m_frame;
43 PointerTargetMap m_targetForPointer; 46 PointerTargetMap m_targetForPointer;
44 }; 47 };
45 48
46 } 49 }
47 50
48 #endif // SKY_ENGINE_CORE_FRAME_NEWEVENTHANDLER_H_ 51 #endif // SKY_ENGINE_CORE_FRAME_NEWEVENTHANDLER_H_
OLDNEW
« no previous file with comments | « sky/engine/core/events/PointerEvent.cpp ('k') | sky/engine/core/frame/NewEventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698