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

Side by Side Diff: third_party/WebKit/Source/core/events/PointerEvent.h

Issue 2479123003: WIP Add getCoalescedEvents API using vector of WebInputEvents (Closed)
Patch Set: Created 4 years, 1 month 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 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 #include "platform/PlatformTouchPoint.h" 10 #include "platform/PlatformTouchPoint.h"
(...skipping 17 matching lines...) Expand all
28 long tiltY() const { return m_tiltY; } 28 long tiltY() const { return m_tiltY; }
29 const String& pointerType() const { return m_pointerType; } 29 const String& pointerType() const { return m_pointerType; }
30 bool isPrimary() const { return m_isPrimary; } 30 bool isPrimary() const { return m_isPrimary; }
31 31
32 short button() const override { return rawButton(); } 32 short button() const override { return rawButton(); }
33 bool isMouseEvent() const override; 33 bool isMouseEvent() const override;
34 bool isPointerEvent() const override; 34 bool isPointerEvent() const override;
35 35
36 EventDispatchMediator* createMediator() override; 36 EventDispatchMediator* createMediator() override;
37 37
38 HeapVector<Member<PointerEvent>> getCoalescedEvents() const;
39
38 DECLARE_VIRTUAL_TRACE(); 40 DECLARE_VIRTUAL_TRACE();
39 41
40 private: 42 private:
41 PointerEvent(const AtomicString&, const PointerEventInit&); 43 PointerEvent(const AtomicString&, const PointerEventInit&);
44 PointerEvent(const AtomicString&, const PointerEventInit&, bool);
42 45
43 int m_pointerId; 46 int m_pointerId;
44 double m_width; 47 double m_width;
45 double m_height; 48 double m_height;
46 float m_pressure; 49 float m_pressure;
47 long m_tiltX; 50 long m_tiltX;
48 long m_tiltY; 51 long m_tiltY;
49 String m_pointerType; 52 String m_pointerType;
50 bool m_isPrimary; 53 bool m_isPrimary;
54
55 HeapVector<Member<PointerEvent>> m_coalescedEvents;
51 }; 56 };
52 57
53 class PointerEventDispatchMediator final : public EventDispatchMediator { 58 class PointerEventDispatchMediator final : public EventDispatchMediator {
54 public: 59 public:
55 static PointerEventDispatchMediator* create(PointerEvent*); 60 static PointerEventDispatchMediator* create(PointerEvent*);
56 61
57 private: 62 private:
58 explicit PointerEventDispatchMediator(PointerEvent*); 63 explicit PointerEventDispatchMediator(PointerEvent*);
59 PointerEvent& event() const; 64 PointerEvent& event() const;
60 DispatchEventResult dispatchEvent(EventDispatcher&) const override; 65 DispatchEventResult dispatchEvent(EventDispatcher&) const override;
61 }; 66 };
62 67
63 DEFINE_EVENT_TYPE_CASTS(PointerEvent); 68 DEFINE_EVENT_TYPE_CASTS(PointerEvent);
64 69
65 } // namespace blink 70 } // namespace blink
66 71
67 #endif // PointerEvent_h 72 #endif // PointerEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698