| 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 bool isMouseEvent() const override; |
| 37 virtual bool isPointerEvent() const override; | 37 bool isPointerEvent() const override; |
| 38 | 38 |
| 39 DECLARE_VIRTUAL_TRACE(); | 39 DECLARE_VIRTUAL_TRACE(); |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 PointerEvent(); | 42 PointerEvent(); |
| 43 PointerEvent(const AtomicString&, const PointerEventInit&); | 43 PointerEvent(const AtomicString&, const PointerEventInit&); |
| 44 | 44 |
| 45 long m_pointerId; | 45 long m_pointerId; |
| 46 double m_width; | 46 double m_width; |
| 47 double m_height; | 47 double m_height; |
| 48 float m_pressure; | 48 float m_pressure; |
| 49 long m_tiltX; | 49 long m_tiltX; |
| 50 long m_tiltY; | 50 long m_tiltY; |
| 51 String m_pointerType; | 51 String m_pointerType; |
| 52 bool m_isPrimary; | 52 bool m_isPrimary; |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 | 55 |
| 56 class PointerEventDispatchMediator final : public EventDispatchMediator { | 56 class PointerEventDispatchMediator final : public EventDispatchMediator { |
| 57 public: | 57 public: |
| 58 static PassRefPtrWillBeRawPtr<PointerEventDispatchMediator> create(PassRefPt
rWillBeRawPtr<PointerEvent>); | 58 static PassRefPtrWillBeRawPtr<PointerEventDispatchMediator> create(PassRefPt
rWillBeRawPtr<PointerEvent>); |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 explicit PointerEventDispatchMediator(PassRefPtrWillBeRawPtr<PointerEvent>); | 61 explicit PointerEventDispatchMediator(PassRefPtrWillBeRawPtr<PointerEvent>); |
| 62 PointerEvent& event() const; | 62 PointerEvent& event() const; |
| 63 virtual bool dispatchEvent(EventDispatcher&) const override; | 63 bool dispatchEvent(EventDispatcher&) const override; |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 DEFINE_EVENT_TYPE_CASTS(PointerEvent); | 66 DEFINE_EVENT_TYPE_CASTS(PointerEvent); |
| 67 | 67 |
| 68 } // namespace blink | 68 } // namespace blink |
| 69 | 69 |
| 70 #endif // PointerEvent_h | 70 #endif // PointerEvent_h |
| OLD | NEW |