| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SKY_ENGINE_CORE_FRAME_NEWEVENTHANDLER_H_ |
| 6 #define SKY_ENGINE_CORE_FRAME_NEWEVENTHANDLER_H_ |
| 7 |
| 8 #include "sky/engine/core/dom/Node.h" |
| 9 #include "sky/engine/core/rendering/HitTestRequest.h" |
| 10 #include "sky/engine/core/rendering/HitTestResult.h" |
| 11 #include "sky/engine/wtf/HashMap.h" |
| 12 |
| 13 namespace blink { |
| 14 |
| 15 class LocalFrame; |
| 16 class WebPointerEvent; |
| 17 |
| 18 class NewEventHandler { |
| 19 WTF_MAKE_NONCOPYABLE(NewEventHandler); |
| 20 public: |
| 21 explicit NewEventHandler(LocalFrame&); |
| 22 ~NewEventHandler(); |
| 23 |
| 24 bool handlePointerEvent(const WebPointerEvent&); |
| 25 |
| 26 private: |
| 27 bool handlePointerDownEvent(const WebPointerEvent&); |
| 28 bool handlePointerUpEvent(const WebPointerEvent&); |
| 29 bool handlePointerMoveEvent(const WebPointerEvent&); |
| 30 bool handlePointerCancelEvent(const WebPointerEvent&); |
| 31 |
| 32 bool dispatchPointerEvent(Node& target, const WebPointerEvent&); |
| 33 bool dispatchClickEvent(Node& capturingTarget, const WebPointerEvent&); |
| 34 |
| 35 Node* targetForHitTestResult(const HitTestResult& hitTestResult); |
| 36 HitTestResult performHitTest(const LayoutPoint&); |
| 37 void updateSelectionForPointerDown(const HitTestResult&, const WebPointerEve
nt&); |
| 38 |
| 39 typedef HashMap<int, RefPtr<Node>> PointerTargetMap; |
| 40 |
| 41 LocalFrame& m_frame; |
| 42 PointerTargetMap m_targetForPointer; |
| 43 }; |
| 44 |
| 45 } |
| 46 |
| 47 #endif // SKY_ENGINE_CORE_FRAME_NEWEVENTHANDLER_H_ |
| OLD | NEW |