OLD | NEW |
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 PointerEvent_h | 5 #ifndef PointerEvent_h |
6 #define PointerEvent_h | 6 #define PointerEvent_h |
7 | 7 |
8 #include "core/events/MouseEvent.h" | 8 #include "core/events/MouseEvent.h" |
9 #include "core/events/PointerEventInit.h" | 9 #include "core/events/PointerEventInit.h" |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 long pointerId() const { return m_pointerId; } | 27 long pointerId() const { return m_pointerId; } |
28 double width() const { return m_width; } | 28 double width() const { return m_width; } |
29 double height() const { return m_height; } | 29 double height() const { return m_height; } |
30 float pressure() const { return m_pressure; } | 30 float pressure() const { return m_pressure; } |
31 long tiltX() const { return m_tiltX; } | 31 long tiltX() const { return m_tiltX; } |
32 long tiltY() const { return m_tiltY; } | 32 long tiltY() const { return m_tiltY; } |
33 const String& pointerType() const { return m_pointerType; } | 33 const String& pointerType() const { return m_pointerType; } |
34 bool isPrimary() const { return m_isPrimary; } | 34 bool isPrimary() const { return m_isPrimary; } |
35 | 35 |
| 36 virtual bool isMouseEvent() const override; |
36 virtual bool isPointerEvent() const override; | 37 virtual bool isPointerEvent() const override; |
37 | 38 |
38 DECLARE_VIRTUAL_TRACE(); | 39 DECLARE_VIRTUAL_TRACE(); |
39 | 40 |
40 private: | 41 private: |
41 PointerEvent(); | 42 PointerEvent(); |
42 PointerEvent(const AtomicString&, const PointerEventInit&); | 43 PointerEvent(const AtomicString&, const PointerEventInit&); |
43 | 44 |
44 long m_pointerId; | 45 long m_pointerId; |
45 double m_width; | 46 double m_width; |
46 double m_height; | 47 double m_height; |
47 float m_pressure; | 48 float m_pressure; |
48 long m_tiltX; | 49 long m_tiltX; |
49 long m_tiltY; | 50 long m_tiltY; |
50 String m_pointerType; | 51 String m_pointerType; |
51 bool m_isPrimary; | 52 bool m_isPrimary; |
52 }; | 53 }; |
53 | 54 |
| 55 |
| 56 class PointerEventDispatchMediator final : public EventDispatchMediator { |
| 57 public: |
| 58 static PassRefPtrWillBeRawPtr<PointerEventDispatchMediator> create(PassRefPt
rWillBeRawPtr<PointerEvent>); |
| 59 |
| 60 private: |
| 61 explicit PointerEventDispatchMediator(PassRefPtrWillBeRawPtr<PointerEvent>); |
| 62 PointerEvent& event() const; |
| 63 virtual bool dispatchEvent(EventDispatcher&) const override; |
| 64 }; |
| 65 |
54 DEFINE_EVENT_TYPE_CASTS(PointerEvent); | 66 DEFINE_EVENT_TYPE_CASTS(PointerEvent); |
55 | 67 |
56 } // namespace blink | 68 } // namespace blink |
57 | 69 |
58 #endif // PointerEvent_h | 70 #endif // PointerEvent_h |
OLD | NEW |