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 DragEvent_h | 5 #ifndef DragEvent_h |
6 #define DragEvent_h | 6 #define DragEvent_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/events/DragEventInit.h" | 9 #include "core/events/DragEventInit.h" |
10 #include "core/events/MouseEvent.h" | 10 #include "core/events/MouseEvent.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 int windowX, | 33 int windowX, |
34 int windowY, | 34 int windowY, |
35 int movementX, | 35 int movementX, |
36 int movementY, | 36 int movementY, |
37 PlatformEvent::Modifiers, | 37 PlatformEvent::Modifiers, |
38 short button, | 38 short button, |
39 unsigned short buttons, | 39 unsigned short buttons, |
40 EventTarget* relatedTarget, | 40 EventTarget* relatedTarget, |
41 TimeTicks platformTimeStamp, | 41 TimeTicks platformTimeStamp, |
42 DataTransfer*, | 42 DataTransfer*, |
43 PlatformMouseEvent::SyntheticEventType = | 43 SyntheticEventType = RealOrIndistinguishable); |
44 PlatformMouseEvent::RealOrIndistinguishable); | |
45 | 44 |
46 static DragEvent* create(const AtomicString& type, | 45 static DragEvent* create(const AtomicString& type, |
47 const DragEventInit& initializer) { | 46 const DragEventInit& initializer) { |
48 return new DragEvent(type, initializer); | 47 return new DragEvent(type, initializer); |
49 } | 48 } |
50 | 49 |
51 DataTransfer* getDataTransfer() const override { | 50 DataTransfer* getDataTransfer() const override { |
52 return isDragEvent() ? m_dataTransfer.get() : nullptr; | 51 return isDragEvent() ? m_dataTransfer.get() : nullptr; |
53 } | 52 } |
54 | 53 |
(...skipping 17 matching lines...) Expand all Loading... |
72 int windowX, | 71 int windowX, |
73 int windowY, | 72 int windowY, |
74 int movementX, | 73 int movementX, |
75 int movementY, | 74 int movementY, |
76 PlatformEvent::Modifiers, | 75 PlatformEvent::Modifiers, |
77 short button, | 76 short button, |
78 unsigned short buttons, | 77 unsigned short buttons, |
79 EventTarget* relatedTarget, | 78 EventTarget* relatedTarget, |
80 TimeTicks platformTimeStamp, | 79 TimeTicks platformTimeStamp, |
81 DataTransfer*, | 80 DataTransfer*, |
82 PlatformMouseEvent::SyntheticEventType); | 81 SyntheticEventType); |
83 | 82 |
84 DragEvent(const AtomicString& type, const DragEventInit&); | 83 DragEvent(const AtomicString& type, const DragEventInit&); |
85 | 84 |
86 Member<DataTransfer> m_dataTransfer; | 85 Member<DataTransfer> m_dataTransfer; |
87 }; | 86 }; |
88 | 87 |
89 class DragEventDispatchMediator final : public EventDispatchMediator { | 88 class DragEventDispatchMediator final : public EventDispatchMediator { |
90 public: | 89 public: |
91 static DragEventDispatchMediator* create(DragEvent*); | 90 static DragEventDispatchMediator* create(DragEvent*); |
92 | 91 |
93 private: | 92 private: |
94 explicit DragEventDispatchMediator(DragEvent*); | 93 explicit DragEventDispatchMediator(DragEvent*); |
95 DragEvent& event() const; | 94 DragEvent& event() const; |
96 DispatchEventResult dispatchEvent(EventDispatcher&) const override; | 95 DispatchEventResult dispatchEvent(EventDispatcher&) const override; |
97 }; | 96 }; |
98 | 97 |
99 DEFINE_EVENT_TYPE_CASTS(DragEvent); | 98 DEFINE_EVENT_TYPE_CASTS(DragEvent); |
100 | 99 |
101 } // namespace blink | 100 } // namespace blink |
102 | 101 |
103 #endif // DragEvent_h | 102 #endif // DragEvent_h |
OLD | NEW |