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

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

Issue 876853005: Add wheel support to sky-scrollable (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Add missing files 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/WheelEvent.idl ('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 WebGestureEvent;
18 class WebKeyboardEvent; 18 class WebKeyboardEvent;
19 class WebPointerEvent; 19 class WebPointerEvent;
20 class WebWheelEvent;
20 21
21 class NewEventHandler { 22 class NewEventHandler {
22 WTF_MAKE_NONCOPYABLE(NewEventHandler); 23 WTF_MAKE_NONCOPYABLE(NewEventHandler);
23 public: 24 public:
24 explicit NewEventHandler(LocalFrame&); 25 explicit NewEventHandler(LocalFrame&);
25 ~NewEventHandler(); 26 ~NewEventHandler();
26 27
27 bool handlePointerEvent(const WebPointerEvent&); 28 bool handlePointerEvent(const WebPointerEvent&);
28 bool handleGestureEvent(const WebGestureEvent&); 29 bool handleGestureEvent(const WebGestureEvent&);
29 bool handleKeyboardEvent(const WebKeyboardEvent&); 30 bool handleKeyboardEvent(const WebKeyboardEvent&);
31 bool handleWheelEvent(const WebWheelEvent&);
30 32
31 private: 33 private:
32 bool handlePointerDownEvent(const WebPointerEvent&); 34 bool handlePointerDownEvent(const WebPointerEvent&);
33 bool handlePointerUpEvent(const WebPointerEvent&); 35 bool handlePointerUpEvent(const WebPointerEvent&);
34 bool handlePointerMoveEvent(const WebPointerEvent&); 36 bool handlePointerMoveEvent(const WebPointerEvent&);
35 bool handlePointerCancelEvent(const WebPointerEvent&); 37 bool handlePointerCancelEvent(const WebPointerEvent&);
36 38
37 bool dispatchGestureEvent(Node& target, const WebGestureEvent& event); 39 bool dispatchGestureEvent(Node& target, const WebGestureEvent& event);
38 bool dispatchPointerEvent(Node& target, const WebPointerEvent&); 40 bool dispatchPointerEvent(Node& target, const WebPointerEvent&);
39 bool dispatchClickEvent(Node& capturingTarget, const WebPointerEvent&); 41 bool dispatchClickEvent(Node& capturingTarget, const WebPointerEvent&);
40 bool dispatchKeyboardEvent(Node& target, const WebKeyboardEvent& event); 42 bool dispatchKeyboardEvent(Node& target, const WebKeyboardEvent& event);
43 bool dispatchWheelEvent(Node& target, const WebWheelEvent& event);
41 44
42 Node* targetForKeyboardEvent() const; 45 Node* targetForKeyboardEvent() const;
43 Node* targetForHitTestResult(const HitTestResult& hitTestResult); 46 Node* targetForHitTestResult(const HitTestResult& hitTestResult);
44 HitTestResult performHitTest(const LayoutPoint&); 47 HitTestResult performHitTest(const LayoutPoint&);
45 void updateSelectionForPointerDown(const HitTestResult&, const WebPointerEve nt&); 48 void updateSelectionForPointerDown(const HitTestResult&, const WebPointerEve nt&);
46 49
47 typedef std::map<int, RefPtr<Node>> PointerTargetMap; 50 typedef std::map<int, RefPtr<Node>> PointerTargetMap;
48 51
49 LocalFrame& m_frame; 52 LocalFrame& m_frame;
50 PointerTargetMap m_targetForPointer; 53 PointerTargetMap m_targetForPointer;
51 bool m_suppressNextCharEvent; 54 bool m_suppressNextCharEvent;
52 }; 55 };
53 56
54 } 57 }
55 58
56 #endif // SKY_ENGINE_CORE_FRAME_NEWEVENTHANDLER_H_ 59 #endif // SKY_ENGINE_CORE_FRAME_NEWEVENTHANDLER_H_
OLDNEW
« no previous file with comments | « sky/engine/core/events/WheelEvent.idl ('k') | sky/engine/core/frame/NewEventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698