OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 MouseEventManager_h | 5 #ifndef MouseEventManager_h |
6 #define MouseEventManager_h | 6 #define MouseEventManager_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/dom/SynchronousMutationObserver.h" | 9 #include "core/dom/SynchronousMutationObserver.h" |
10 #include "core/input/BoundaryEventDispatcher.h" | 10 #include "core/input/BoundaryEventDispatcher.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 bool handleDragDropIfPossible(const GestureEventWithHitTestResults&); | 93 bool handleDragDropIfPossible(const GestureEventWithHitTestResults&); |
94 | 94 |
95 WebInputEventResult handleMouseDraggedEvent( | 95 WebInputEventResult handleMouseDraggedEvent( |
96 const MouseEventWithHitTestResults&); | 96 const MouseEventWithHitTestResults&); |
97 WebInputEventResult handleMousePressEvent( | 97 WebInputEventResult handleMousePressEvent( |
98 const MouseEventWithHitTestResults&); | 98 const MouseEventWithHitTestResults&); |
99 WebInputEventResult handleMouseReleaseEvent( | 99 WebInputEventResult handleMouseReleaseEvent( |
100 const MouseEventWithHitTestResults&); | 100 const MouseEventWithHitTestResults&); |
101 | 101 |
102 static DragState& dragState(); | 102 DragState& dragState(); |
103 | 103 |
104 void focusDocumentView(); | 104 void focusDocumentView(); |
105 | 105 |
106 // Resets the state that indicates the next events could cause a drag. It is | 106 // Resets the state that indicates the next events could cause a drag. It is |
107 // called when we realize the next events should not cause drag based on the | 107 // called when we realize the next events should not cause drag based on the |
108 // drag heuristics. | 108 // drag heuristics. |
109 void clearDragHeuristicState(); | 109 void clearDragHeuristicState(); |
110 | 110 |
111 void dragSourceEndedAt(const WebMouseEvent&, DragOperation); | 111 void dragSourceEndedAt(const WebMouseEvent&, DragOperation); |
112 | 112 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 // flag, slide focus to its inner element. Returns true if the resulting focus | 182 // flag, slide focus to its inner element. Returns true if the resulting focus |
183 // is different from the given element. | 183 // is different from the given element. |
184 bool slideFocusOnShadowHostIfNecessary(const Element&); | 184 bool slideFocusOnShadowHostIfNecessary(const Element&); |
185 | 185 |
186 bool dragThresholdExceeded(const IntPoint&) const; | 186 bool dragThresholdExceeded(const IntPoint&) const; |
187 bool handleDrag(const MouseEventWithHitTestResults&, DragInitiator); | 187 bool handleDrag(const MouseEventWithHitTestResults&, DragInitiator); |
188 bool tryStartDrag(const MouseEventWithHitTestResults&); | 188 bool tryStartDrag(const MouseEventWithHitTestResults&); |
189 void clearDragDataTransfer(); | 189 void clearDragDataTransfer(); |
190 DataTransfer* createDraggingDataTransfer() const; | 190 DataTransfer* createDraggingDataTransfer() const; |
191 | 191 |
| 192 void resetDragState(); |
| 193 |
192 // Implementations of |SynchronousMutationObserver| | 194 // Implementations of |SynchronousMutationObserver| |
193 void nodeChildrenWillBeRemoved(ContainerNode&) final; | 195 void nodeChildrenWillBeRemoved(ContainerNode&) final; |
194 void nodeWillBeRemoved(Node& nodeToBeRemoved) final; | 196 void nodeWillBeRemoved(Node& nodeToBeRemoved) final; |
195 | 197 |
196 // NOTE: If adding a new field to this class please ensure that it is | 198 // NOTE: If adding a new field to this class please ensure that it is |
197 // cleared in |MouseEventManager::clear()|. | 199 // cleared in |MouseEventManager::clear()|. |
198 | 200 |
199 const Member<LocalFrame> m_frame; | 201 const Member<LocalFrame> m_frame; |
200 Member<ScrollManager> m_scrollManager; | 202 Member<ScrollManager> m_scrollManager; |
201 | 203 |
(...skipping 27 matching lines...) Expand all Loading... |
229 WebMouseEvent m_mouseDown; | 231 WebMouseEvent m_mouseDown; |
230 | 232 |
231 LayoutPoint m_dragStartPos; | 233 LayoutPoint m_dragStartPos; |
232 | 234 |
233 TaskRunnerTimer<MouseEventManager> m_fakeMouseMoveEventTimer; | 235 TaskRunnerTimer<MouseEventManager> m_fakeMouseMoveEventTimer; |
234 }; | 236 }; |
235 | 237 |
236 } // namespace blink | 238 } // namespace blink |
237 | 239 |
238 #endif // MouseEventManager_h | 240 #endif // MouseEventManager_h |
OLD | NEW |