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: content/browser/renderer_host/render_widget_host_view_event_handler.h

Issue 2914393002: Adding phase info to wheel events migrated to wheel phase handler class. (Closed)
Patch Set: has pending wheel end used in mac unittests. Created 3 years, 6 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 CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_EVENT_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_EVENT_HANDLER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_EVENT_HANDLER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_EVENT_HANDLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/timer/timer.h" 11 #include "content/browser/renderer_host/mouse_wheel_phase_handler.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "content/public/browser/native_web_keyboard_event.h" 13 #include "content/public/browser/native_web_keyboard_event.h"
14 #include "ui/aura/window_tracker.h" 14 #include "ui/aura/window_tracker.h"
15 #include "ui/events/event_handler.h" 15 #include "ui/events/event_handler.h"
16 #include "ui/events/gestures/motion_event_aura.h" 16 #include "ui/events/gestures/motion_event_aura.h"
17 #include "ui/latency/latency_info.h" 17 #include "ui/latency/latency_info.h"
18 18
19 namespace aura { 19 namespace aura {
20 class Window; 20 class Window;
21 } // namespace aura 21 } // namespace aura
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 // Returns true when we can do SurfaceHitTesting for the event type. 182 // Returns true when we can do SurfaceHitTesting for the event type.
183 bool ShouldRouteEvent(const ui::Event* event) const; 183 bool ShouldRouteEvent(const ui::Event* event) const;
184 184
185 // Directs events to the |host_|. 185 // Directs events to the |host_|.
186 void ProcessMouseEvent(const blink::WebMouseEvent& event, 186 void ProcessMouseEvent(const blink::WebMouseEvent& event,
187 const ui::LatencyInfo& latency); 187 const ui::LatencyInfo& latency);
188 void ProcessMouseWheelEvent(const blink::WebMouseWheelEvent& event, 188 void ProcessMouseWheelEvent(const blink::WebMouseWheelEvent& event,
189 const ui::LatencyInfo& latency); 189 const ui::LatencyInfo& latency);
190 void ProcessTouchEvent(const blink::WebTouchEvent& event, 190 void ProcessTouchEvent(const blink::WebTouchEvent& event,
191 const ui::LatencyInfo& latency); 191 const ui::LatencyInfo& latency);
192 void SendSyntheticWheelEventWithPhaseEnded(
193 blink::WebMouseWheelEvent last_mouse_wheel_event,
194 bool should_route_event);
195 void AddPhaseAndScheduleEndEvent(blink::WebMouseWheelEvent& mouse_wheel_event,
196 bool should_route_event);
197 192
198 // Whether return characters should be passed on to the RenderWidgetHostImpl. 193 // Whether return characters should be passed on to the RenderWidgetHostImpl.
199 bool accept_return_character_; 194 bool accept_return_character_;
200 195
201 // Allows tests to send gesture events for testing without first sending a 196 // Allows tests to send gesture events for testing without first sending a
202 // corresponding touch sequence, as would be required by 197 // corresponding touch sequence, as would be required by
203 // RenderWidgetHostInputEventRouter. 198 // RenderWidgetHostInputEventRouter.
204 bool disable_input_event_router_for_testing_; 199 bool disable_input_event_router_for_testing_;
205 200
206 // While the mouse is locked, the cursor is hidden from the user. Mouse events 201 // While the mouse is locked, the cursor is hidden from the user. Mouse events
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 243
249 // The following are not owned. They should outlive |this| 244 // The following are not owned. They should outlive |this|
250 RenderWidgetHostImpl* const host_; 245 RenderWidgetHostImpl* const host_;
251 // Should create |this| and own it. 246 // Should create |this| and own it.
252 RenderWidgetHostViewBase* const host_view_; 247 RenderWidgetHostViewBase* const host_view_;
253 // Optional, used to redirect events to a popup and associated handler. 248 // Optional, used to redirect events to a popup and associated handler.
254 RenderWidgetHostViewBase* popup_child_host_view_; 249 RenderWidgetHostViewBase* popup_child_host_view_;
255 ui::EventHandler* popup_child_event_handler_; 250 ui::EventHandler* popup_child_event_handler_;
256 Delegate* const delegate_; 251 Delegate* const delegate_;
257 aura::Window* window_; 252 aura::Window* window_;
258 253 std::unique_ptr<MouseWheelPhaseHandler> mouse_wheel_phase_handler_;
tdresser 2017/06/05 15:19:08 Why use a unique_ptr here? Why not just stack allo
sahel 2017/06/05 19:05:43 Done.
259 base::OneShotTimer mouse_wheel_end_dispatch_timer_;
260 254
261 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewEventHandler); 255 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewEventHandler);
262 }; 256 };
263 257
264 } // namespace content 258 } // namespace content
265 259
266 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_EVENT_HANDLER_H _ 260 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_EVENT_HANDLER_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698