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

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

Issue 2956023004: Add a flag to update hover effect when a layout is changed (Closed)
Patch Set: hover layout Created 3 years, 5 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
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 12 matching lines...) Expand all
23 class DataTransfer; 23 class DataTransfer;
24 class Element; 24 class Element;
25 class FloatQuad; 25 class FloatQuad;
26 class HitTestResult; 26 class HitTestResult;
27 class InputDeviceCapabilities; 27 class InputDeviceCapabilities;
28 class LocalFrame; 28 class LocalFrame;
29 class ScrollManager; 29 class ScrollManager;
30 30
31 enum class DragInitiator; 31 enum class DragInitiator;
32 32
33 enum class DispatchInterval { kDuringScroll, kPerFrame };
dtapuska 2017/06/28 19:15:18 Perhaps this can be scoped into the EventHandler c
lanwei 2017/07/04 18:37:15 Done.
34
33 // This class takes care of dispatching all mouse events and keeps track of 35 // This class takes care of dispatching all mouse events and keeps track of
34 // positions and states of mouse. 36 // positions and states of mouse.
35 class CORE_EXPORT MouseEventManager final 37 class CORE_EXPORT MouseEventManager final
36 : public GarbageCollectedFinalized<MouseEventManager>, 38 : public GarbageCollectedFinalized<MouseEventManager>,
37 public SynchronousMutationObserver { 39 public SynchronousMutationObserver {
38 WTF_MAKE_NONCOPYABLE(MouseEventManager); 40 WTF_MAKE_NONCOPYABLE(MouseEventManager);
39 USING_GARBAGE_COLLECTED_MIXIN(MouseEventManager); 41 USING_GARBAGE_COLLECTED_MIXIN(MouseEventManager);
40 42
41 public: 43 public:
42 MouseEventManager(LocalFrame&, ScrollManager&); 44 MouseEventManager(LocalFrame&, ScrollManager&);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 const String& canvas_region_id, 82 const String& canvas_region_id,
81 const WebMouseEvent&); 83 const WebMouseEvent&);
82 84
83 WebInputEventResult HandleMouseFocus( 85 WebInputEventResult HandleMouseFocus(
84 const HitTestResult&, 86 const HitTestResult&,
85 InputDeviceCapabilities* source_capabilities); 87 InputDeviceCapabilities* source_capabilities);
86 88
87 void FakeMouseMoveEventTimerFired(TimerBase*); 89 void FakeMouseMoveEventTimerFired(TimerBase*);
88 90
89 void CancelFakeMouseMoveEvent(); 91 void CancelFakeMouseMoveEvent();
90 void DispatchFakeMouseMoveEventSoon(); 92 void DispatchFakeMouseMoveEventSoon(DispatchInterval);
91 void DispatchFakeMouseMoveEventSoonInQuad(const FloatQuad&); 93 void DispatchFakeMouseMoveEventSoonInQuad(const FloatQuad&);
92 94
93 void SetLastKnownMousePosition(const WebMouseEvent&); 95 void SetLastKnownMousePosition(const WebMouseEvent&);
94 96
95 bool HandleDragDropIfPossible(const GestureEventWithHitTestResults&); 97 bool HandleDragDropIfPossible(const GestureEventWithHitTestResults&);
96 98
97 WebInputEventResult HandleMouseDraggedEvent( 99 WebInputEventResult HandleMouseDraggedEvent(
98 const MouseEventWithHitTestResults&); 100 const MouseEventWithHitTestResults&);
99 WebInputEventResult HandleMousePressEvent( 101 WebInputEventResult HandleMousePressEvent(
100 const MouseEventWithHitTestResults&); 102 const MouseEventWithHitTestResults&);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 143 }
142 144
143 Node* MousePressNode(); 145 Node* MousePressNode();
144 void SetMousePressNode(Node*); 146 void SetMousePressNode(Node*);
145 147
146 void SetClickElement(Element*); 148 void SetClickElement(Element*);
147 void SetClickCount(int); 149 void SetClickCount(int);
148 150
149 bool MouseDownMayStartDrag(); 151 bool MouseDownMayStartDrag();
150 152
153 bool FakeMouseMovePending();
dtapuska 2017/06/28 19:15:18 const?
lanwei 2017/07/04 18:37:15 Done.
154
151 private: 155 private:
152 class MouseEventBoundaryEventDispatcher : public BoundaryEventDispatcher { 156 class MouseEventBoundaryEventDispatcher : public BoundaryEventDispatcher {
153 WTF_MAKE_NONCOPYABLE(MouseEventBoundaryEventDispatcher); 157 WTF_MAKE_NONCOPYABLE(MouseEventBoundaryEventDispatcher);
154 158
155 public: 159 public:
156 MouseEventBoundaryEventDispatcher(MouseEventManager*, 160 MouseEventBoundaryEventDispatcher(MouseEventManager*,
157 const WebMouseEvent*, 161 const WebMouseEvent*,
158 EventTarget* exited_target, 162 EventTarget* exited_target,
159 const String& canvas_region_id); 163 const String& canvas_region_id);
160 164
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 WebMouseEvent mouse_down_; 244 WebMouseEvent mouse_down_;
241 245
242 LayoutPoint drag_start_pos_; 246 LayoutPoint drag_start_pos_;
243 247
244 TaskRunnerTimer<MouseEventManager> fake_mouse_move_event_timer_; 248 TaskRunnerTimer<MouseEventManager> fake_mouse_move_event_timer_;
245 }; 249 };
246 250
247 } // namespace blink 251 } // namespace blink
248 252
249 #endif // MouseEventManager_h 253 #endif // MouseEventManager_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698