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

Side by Side Diff: third_party/WebKit/Source/core/input/MouseEventManager.h

Issue 2687193004: Tie DragState to DragController. (Closed)
Patch Set: tidy up DragState resetting Created 3 years, 10 months 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/input/MouseEventManager.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/input/MouseEventManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698