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

Side by Side Diff: content/browser/renderer_host/render_widget_host_input_event_router.h

Issue 2229463004: Generate MouseEnter/MouseLeave events between processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test breakages from last PS Created 4 years, 3 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 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 CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 const gfx::Point& point, 114 const gfx::Point& point,
115 gfx::Point* transformed_point); 115 gfx::Point* transformed_point);
116 116
117 void RouteTouchscreenGestureEvent(RenderWidgetHostViewBase* root_view, 117 void RouteTouchscreenGestureEvent(RenderWidgetHostViewBase* root_view,
118 blink::WebGestureEvent* event, 118 blink::WebGestureEvent* event,
119 const ui::LatencyInfo& latency); 119 const ui::LatencyInfo& latency);
120 void RouteTouchpadGestureEvent(RenderWidgetHostViewBase* root_view, 120 void RouteTouchpadGestureEvent(RenderWidgetHostViewBase* root_view,
121 blink::WebGestureEvent* event, 121 blink::WebGestureEvent* event,
122 const ui::LatencyInfo& latency); 122 const ui::LatencyInfo& latency);
123 123
124 // MouseMove/Enter/Leave events might need to be processed by multiple frames
125 // in different processes for MouseEnter and MouseLeave event handlers to
126 // properly fire. This method determines which RenderWidgetHostViews other
127 // than the actual target require notification, and sends the appropriate
128 // events to them.
129 void SendMouseEnterOrLeaveEvents(blink::WebMouseEvent* event,
130 RenderWidgetHostViewBase* target,
131 RenderWidgetHostViewBase* root_view);
132
124 // The following methods take a GestureScrollUpdate event and send a 133 // The following methods take a GestureScrollUpdate event and send a
125 // GestureScrollBegin or GestureScrollEnd for wrapping it. This is needed 134 // GestureScrollBegin or GestureScrollEnd for wrapping it. This is needed
126 // when GestureScrollUpdates are being forwarded for scroll bubbling. 135 // when GestureScrollUpdates are being forwarded for scroll bubbling.
127 void SendGestureScrollBegin(RenderWidgetHostViewBase* view, 136 void SendGestureScrollBegin(RenderWidgetHostViewBase* view,
128 const blink::WebGestureEvent& event); 137 const blink::WebGestureEvent& event);
129 void SendGestureScrollEnd(RenderWidgetHostViewBase* view, 138 void SendGestureScrollEnd(RenderWidgetHostViewBase* view,
130 const blink::WebGestureEvent& event); 139 const blink::WebGestureEvent& event);
131 140
132 SurfaceClientIdOwnerMap owner_map_; 141 SurfaceClientIdOwnerMap owner_map_;
133 TargetQueue touchscreen_gesture_target_queue_; 142 TargetQueue touchscreen_gesture_target_queue_;
134 TargetData touch_target_; 143 TargetData touch_target_;
135 TargetData touchscreen_gesture_target_; 144 TargetData touchscreen_gesture_target_;
136 TargetData touchpad_gesture_target_; 145 TargetData touchpad_gesture_target_;
137 TargetData bubbling_gesture_scroll_target_; 146 TargetData bubbling_gesture_scroll_target_;
138 TargetData first_bubbling_scroll_target_; 147 TargetData first_bubbling_scroll_target_;
148
149 // Tracked for the purpose of generating MouseEnter and MouseLeave events.
150 RenderWidgetHostViewBase* last_mouse_move_target_;
151 RenderWidgetHostViewBase* last_mouse_move_root_view_;
152
139 int active_touches_; 153 int active_touches_;
140 // Keep track of when we are between GesturePinchBegin and GesturePinchEnd 154 // Keep track of when we are between GesturePinchBegin and GesturePinchEnd
141 // inclusive, as we need to route these events (and anything in between) to 155 // inclusive, as we need to route these events (and anything in between) to
142 // the main frame. 156 // the main frame.
143 bool in_touchscreen_gesture_pinch_; 157 bool in_touchscreen_gesture_pinch_;
144 bool gesture_pinch_did_send_scroll_begin_; 158 bool gesture_pinch_did_send_scroll_begin_;
145 std::unordered_map<cc::SurfaceId, HittestData, cc::SurfaceIdHash> 159 std::unordered_map<cc::SurfaceId, HittestData, cc::SurfaceIdHash>
146 hittest_data_; 160 hittest_data_;
147 161
148 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostInputEventRouter); 162 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostInputEventRouter);
149 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest, 163 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest,
150 InputEventRouterGestureTargetQueueTest); 164 InputEventRouterGestureTargetQueueTest);
151 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest, 165 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest,
152 InputEventRouterTouchpadGestureTargetTest); 166 InputEventRouterTouchpadGestureTargetTest);
153 }; 167 };
154 168
155 } // namespace content 169 } // namespace content
156 170
157 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H _ 171 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698