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

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

Issue 866213004: Switch Sky to pointer events (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: nits 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
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 "sky/engine/core/dom/Node.h" 9 #include "sky/engine/core/dom/Node.h"
9 #include "sky/engine/core/rendering/HitTestRequest.h" 10 #include "sky/engine/core/rendering/HitTestRequest.h"
10 #include "sky/engine/core/rendering/HitTestResult.h" 11 #include "sky/engine/core/rendering/HitTestResult.h"
11 #include "sky/engine/wtf/HashMap.h" 12 #include "sky/engine/wtf/HashMap.h"
12 13
13 namespace blink { 14 namespace blink {
14 15
15 class LocalFrame; 16 class LocalFrame;
16 class WebPointerEvent; 17 class WebPointerEvent;
17 18
(...skipping 11 matching lines...) Expand all
29 bool handlePointerMoveEvent(const WebPointerEvent&); 30 bool handlePointerMoveEvent(const WebPointerEvent&);
30 bool handlePointerCancelEvent(const WebPointerEvent&); 31 bool handlePointerCancelEvent(const WebPointerEvent&);
31 32
32 bool dispatchPointerEvent(Node& target, const WebPointerEvent&); 33 bool dispatchPointerEvent(Node& target, const WebPointerEvent&);
33 bool dispatchClickEvent(Node& capturingTarget, const WebPointerEvent&); 34 bool dispatchClickEvent(Node& capturingTarget, const WebPointerEvent&);
34 35
35 Node* targetForHitTestResult(const HitTestResult& hitTestResult); 36 Node* targetForHitTestResult(const HitTestResult& hitTestResult);
36 HitTestResult performHitTest(const LayoutPoint&); 37 HitTestResult performHitTest(const LayoutPoint&);
37 void updateSelectionForPointerDown(const HitTestResult&, const WebPointerEve nt&); 38 void updateSelectionForPointerDown(const HitTestResult&, const WebPointerEve nt&);
38 39
39 typedef HashMap<int, RefPtr<Node>> PointerTargetMap; 40 typedef std::map<int, RefPtr<Node>> PointerTargetMap;
ojan 2015/01/23 10:23:55 Why didn't HashMap work? stl containers are terrib
abarth-chromium 2015/01/23 16:51:33 I kept having trouble with HashMap asserting in ch
40 41
41 LocalFrame& m_frame; 42 LocalFrame& m_frame;
42 PointerTargetMap m_targetForPointer; 43 PointerTargetMap m_targetForPointer;
43 }; 44 };
44 45
45 } 46 }
46 47
47 #endif // SKY_ENGINE_CORE_FRAME_NEWEVENTHANDLER_H_ 48 #endif // SKY_ENGINE_CORE_FRAME_NEWEVENTHANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698