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

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

Issue 1426643008: Cleaning up PointerIdManager and add id re-mapping (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix EXPECT_EQ compilation error on Android Created 5 years 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"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class PointerEvent final : public MouseEvent { 14 class PointerEvent final : public MouseEvent {
15 DEFINE_WRAPPERTYPEINFO(); 15 DEFINE_WRAPPERTYPEINFO();
16 16
17 public: 17 public:
18 static PassRefPtrWillBeRawPtr<PointerEvent> create() 18 static PassRefPtrWillBeRawPtr<PointerEvent> create()
19 { 19 {
20 return adoptRefWillBeNoop(new PointerEvent); 20 return adoptRefWillBeNoop(new PointerEvent);
21 } 21 }
22 22
23 static PassRefPtrWillBeRawPtr<PointerEvent> create(const AtomicString& type, const PointerEventInit& initializer) 23 static PassRefPtrWillBeRawPtr<PointerEvent> create(const AtomicString& type, const PointerEventInit& initializer)
24 { 24 {
25 return adoptRefWillBeNoop(new PointerEvent(type, initializer)); 25 return adoptRefWillBeNoop(new PointerEvent(type, initializer));
26 } 26 }
27 27
28 static PassRefPtrWillBeRawPtr<PointerEvent> create(const AtomicString& type,
29 const bool isPrimary, const PlatformMouseEvent&, PassRefPtrWillBeRawPtr< Node> relatedTarget,
30 PassRefPtrWillBeRawPtr<AbstractView>);
31
32 static PassRefPtrWillBeRawPtr<PointerEvent> create(const AtomicString& type,
33 const bool isPrimary, const PlatformTouchPoint&,
34 PlatformEvent::Modifiers,
35 const double width, const double height,
36 const double clientX, const double clientY);
37
38 long pointerId() const { return m_pointerId; } 28 long pointerId() const { return m_pointerId; }
39 double width() const { return m_width; } 29 double width() const { return m_width; }
40 double height() const { return m_height; } 30 double height() const { return m_height; }
41 float pressure() const { return m_pressure; } 31 float pressure() const { return m_pressure; }
42 long tiltX() const { return m_tiltX; } 32 long tiltX() const { return m_tiltX; }
43 long tiltY() const { return m_tiltY; } 33 long tiltY() const { return m_tiltY; }
44 const String& pointerType() const { return m_pointerType; } 34 const String& pointerType() const { return m_pointerType; }
45 bool isPrimary() const { return m_isPrimary; } 35 bool isPrimary() const { return m_isPrimary; }
46 36
47 bool isMouseEvent() const override; 37 bool isMouseEvent() const override;
(...skipping 26 matching lines...) Expand all
74 explicit PointerEventDispatchMediator(PassRefPtrWillBeRawPtr<PointerEvent>); 64 explicit PointerEventDispatchMediator(PassRefPtrWillBeRawPtr<PointerEvent>);
75 PointerEvent& event() const; 65 PointerEvent& event() const;
76 bool dispatchEvent(EventDispatcher&) const override; 66 bool dispatchEvent(EventDispatcher&) const override;
77 }; 67 };
78 68
79 DEFINE_EVENT_TYPE_CASTS(PointerEvent); 69 DEFINE_EVENT_TYPE_CASTS(PointerEvent);
80 70
81 } // namespace blink 71 } // namespace blink
82 72
83 #endif // PointerEvent_h 73 #endif // PointerEvent_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/events/PointerEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698