| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 // Returns whether pan is handled and resets the state on release. | 120 // Returns whether pan is handled and resets the state on release. |
| 121 bool HandleSvgPanIfNeeded(bool is_release_event); | 121 bool HandleSvgPanIfNeeded(bool is_release_event); |
| 122 | 122 |
| 123 void InvalidateClick(); | 123 void InvalidateClick(); |
| 124 | 124 |
| 125 // TODO: These functions ideally should be private but the code needs more | 125 // TODO: These functions ideally should be private but the code needs more |
| 126 // refactoring to be able to remove the dependency from EventHandler. | 126 // refactoring to be able to remove the dependency from EventHandler. |
| 127 Node* GetNodeUnderMouse(); | 127 Node* GetNodeUnderMouse(); |
| 128 bool IsMousePositionUnknown(); | 128 bool IsMousePositionUnknown(); |
| 129 // TODO(aelias): Make LastKnownMousePosition return FloatPoint. |
| 129 IntPoint LastKnownMousePosition(); | 130 IntPoint LastKnownMousePosition(); |
| 131 FloatPoint LastKnownMousePositionGlobal(); |
| 130 | 132 |
| 131 bool MousePressed(); | 133 bool MousePressed(); |
| 132 void SetMousePressed(bool); | 134 void SetMousePressed(bool); |
| 133 | 135 |
| 134 bool CapturesDragging() const; | 136 bool CapturesDragging() const; |
| 135 void SetCapturesDragging(bool); | 137 void SetCapturesDragging(bool); |
| 136 | 138 |
| 137 void SetMouseDownMayStartAutoscroll() { | 139 void SetMouseDownMayStartAutoscroll() { |
| 138 mouse_down_may_start_autoscroll_ = true; | 140 mouse_down_may_start_autoscroll_ = true; |
| 139 } | 141 } |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 const Member<LocalFrame> frame_; | 206 const Member<LocalFrame> frame_; |
| 205 Member<ScrollManager> scroll_manager_; | 207 Member<ScrollManager> scroll_manager_; |
| 206 | 208 |
| 207 // The effective position of the mouse pointer. | 209 // The effective position of the mouse pointer. |
| 208 // See | 210 // See |
| 209 // https://w3c.github.io/pointerevents/#dfn-tracking-the-effective-position-of
-the-legacy-mouse-pointer. | 211 // https://w3c.github.io/pointerevents/#dfn-tracking-the-effective-position-of
-the-legacy-mouse-pointer. |
| 210 Member<Node> node_under_mouse_; | 212 Member<Node> node_under_mouse_; |
| 211 | 213 |
| 212 // The last mouse movement position this frame has seen in root frame | 214 // The last mouse movement position this frame has seen in root frame |
| 213 // coordinates. | 215 // coordinates. |
| 214 IntPoint last_known_mouse_position_; | 216 FloatPoint last_known_mouse_position_; |
| 215 IntPoint last_known_mouse_global_position_; | 217 FloatPoint last_known_mouse_global_position_; |
| 216 | 218 |
| 217 unsigned is_mouse_position_unknown_ : 1; | 219 unsigned is_mouse_position_unknown_ : 1; |
| 218 // Current button-press state for mouse/mouse-like-stylus. | 220 // Current button-press state for mouse/mouse-like-stylus. |
| 219 // TODO(crbug.com/563676): Buggy for chorded buttons. | 221 // TODO(crbug.com/563676): Buggy for chorded buttons. |
| 220 unsigned mouse_pressed_ : 1; | 222 unsigned mouse_pressed_ : 1; |
| 221 | 223 |
| 222 unsigned mouse_down_may_start_autoscroll_ : 1; | 224 unsigned mouse_down_may_start_autoscroll_ : 1; |
| 223 unsigned svg_pan_ : 1; | 225 unsigned svg_pan_ : 1; |
| 224 unsigned captures_dragging_ : 1; | 226 unsigned captures_dragging_ : 1; |
| 225 unsigned mouse_down_may_start_drag_ : 1; | 227 unsigned mouse_down_may_start_drag_ : 1; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 238 WebMouseEvent mouse_down_; | 240 WebMouseEvent mouse_down_; |
| 239 | 241 |
| 240 LayoutPoint drag_start_pos_; | 242 LayoutPoint drag_start_pos_; |
| 241 | 243 |
| 242 TaskRunnerTimer<MouseEventManager> fake_mouse_move_event_timer_; | 244 TaskRunnerTimer<MouseEventManager> fake_mouse_move_event_timer_; |
| 243 }; | 245 }; |
| 244 | 246 |
| 245 } // namespace blink | 247 } // namespace blink |
| 246 | 248 |
| 247 #endif // MouseEventManager_h | 249 #endif // MouseEventManager_h |
| OLD | NEW |