| 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 22 matching lines...) Expand all Loading... |
| 33 float tangentialPressure() const { return tangential_pressure_; } | 33 float tangentialPressure() const { return tangential_pressure_; } |
| 34 long twist() const { return twist_; } | 34 long twist() const { return twist_; } |
| 35 const String& pointerType() const { return pointer_type_; } | 35 const String& pointerType() const { return pointer_type_; } |
| 36 bool isPrimary() const { return is_primary_; } | 36 bool isPrimary() const { return is_primary_; } |
| 37 | 37 |
| 38 short button() const override { return RawButton(); } | 38 short button() const override { return RawButton(); } |
| 39 bool IsMouseEvent() const override; | 39 bool IsMouseEvent() const override; |
| 40 bool IsPointerEvent() const override; | 40 bool IsPointerEvent() const override; |
| 41 | 41 |
| 42 EventDispatchMediator* CreateMediator() override; | 42 EventDispatchMediator* CreateMediator() override; |
| 43 void ReceivedTarget() override; |
| 43 | 44 |
| 44 HeapVector<Member<PointerEvent>> getCoalescedEvents() const; | 45 HeapVector<Member<PointerEvent>> getCoalescedEvents(); |
| 45 | 46 |
| 46 DECLARE_VIRTUAL_TRACE(); | 47 DECLARE_VIRTUAL_TRACE(); |
| 47 | 48 |
| 48 private: | 49 private: |
| 49 PointerEvent(const AtomicString&, | 50 PointerEvent(const AtomicString&, |
| 50 const PointerEventInit&, | 51 const PointerEventInit&, |
| 51 TimeTicks platform_time_stamp); | 52 TimeTicks platform_time_stamp); |
| 52 | 53 |
| 53 int pointer_id_; | 54 int pointer_id_; |
| 54 double width_; | 55 double width_; |
| 55 double height_; | 56 double height_; |
| 56 float pressure_; | 57 float pressure_; |
| 57 long tilt_x_; | 58 long tilt_x_; |
| 58 long tilt_y_; | 59 long tilt_y_; |
| 59 float tangential_pressure_; | 60 float tangential_pressure_; |
| 60 long twist_; | 61 long twist_; |
| 61 String pointer_type_; | 62 String pointer_type_; |
| 62 bool is_primary_; | 63 bool is_primary_; |
| 63 | 64 |
| 65 bool coalesced_events_targets_dirty_; |
| 66 |
| 64 HeapVector<Member<PointerEvent>> coalesced_events_; | 67 HeapVector<Member<PointerEvent>> coalesced_events_; |
| 65 }; | 68 }; |
| 66 | 69 |
| 67 class PointerEventDispatchMediator final : public EventDispatchMediator { | 70 class PointerEventDispatchMediator final : public EventDispatchMediator { |
| 68 public: | 71 public: |
| 69 static PointerEventDispatchMediator* Create(PointerEvent*); | 72 static PointerEventDispatchMediator* Create(PointerEvent*); |
| 70 | 73 |
| 71 private: | 74 private: |
| 72 explicit PointerEventDispatchMediator(PointerEvent*); | 75 explicit PointerEventDispatchMediator(PointerEvent*); |
| 73 PointerEvent& Event() const; | 76 PointerEvent& Event() const; |
| 74 DispatchEventResult DispatchEvent(EventDispatcher&) const override; | 77 DispatchEventResult DispatchEvent(EventDispatcher&) const override; |
| 75 }; | 78 }; |
| 76 | 79 |
| 77 DEFINE_EVENT_TYPE_CASTS(PointerEvent); | 80 DEFINE_EVENT_TYPE_CASTS(PointerEvent); |
| 78 | 81 |
| 79 } // namespace blink | 82 } // namespace blink |
| 80 | 83 |
| 81 #endif // PointerEvent_h | 84 #endif // PointerEvent_h |
| OLD | NEW |