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

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

Issue 2096923002: Revert of Fix touchpad gesture routing to renderers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_input_event_router.cc » ('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 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 const gfx::Point& point_in_quad_space) override; 89 const gfx::Point& point_in_quad_space) override;
90 bool AcceptHitTarget(const cc::SurfaceDrawQuad* surface_quad, 90 bool AcceptHitTarget(const cc::SurfaceDrawQuad* surface_quad,
91 const gfx::Point& point_in_quad_space) override; 91 const gfx::Point& point_in_quad_space) override;
92 92
93 const std::unordered_map<cc::SurfaceId, HittestData, cc::SurfaceIdHash>& 93 const std::unordered_map<cc::SurfaceId, HittestData, cc::SurfaceIdHash>&
94 hittest_data_; 94 hittest_data_;
95 }; 95 };
96 96
97 using SurfaceIdNamespaceOwnerMap = 97 using SurfaceIdNamespaceOwnerMap =
98 base::hash_map<uint32_t, RenderWidgetHostViewBase*>; 98 base::hash_map<uint32_t, RenderWidgetHostViewBase*>;
99 struct TargetData { 99 struct GestureTargetData {
100 RenderWidgetHostViewBase* target; 100 RenderWidgetHostViewBase* target;
101 gfx::Vector2d delta; 101 const gfx::Vector2d delta;
102 102
103 TargetData() : target(nullptr) {} 103 GestureTargetData(RenderWidgetHostViewBase* target, gfx::Vector2d delta)
104 : target(target), delta(delta) {}
104 }; 105 };
105 using TargetQueue = std::deque<TargetData>; 106 using GestureTargetQueue = std::deque<GestureTargetData>;
106 107
107 void ClearAllObserverRegistrations(); 108 void ClearAllObserverRegistrations();
108 109
109 RenderWidgetHostViewBase* FindEventTarget(RenderWidgetHostViewBase* root_view, 110 RenderWidgetHostViewBase* FindEventTarget(RenderWidgetHostViewBase* root_view,
110 const gfx::Point& point, 111 const gfx::Point& point,
111 gfx::Point* transformed_point); 112 gfx::Point* transformed_point);
112 113
113 void RouteTouchscreenGestureEvent(RenderWidgetHostViewBase* root_view,
114 blink::WebGestureEvent* event,
115 const ui::LatencyInfo& latency);
116 void RouteTouchpadGestureEvent(RenderWidgetHostViewBase* root_view,
117 blink::WebGestureEvent* event,
118 const ui::LatencyInfo& latency);
119
120 SurfaceIdNamespaceOwnerMap owner_map_; 114 SurfaceIdNamespaceOwnerMap owner_map_;
121 TargetQueue touchscreen_gesture_target_queue_; 115 GestureTargetQueue gesture_target_queue_;
122 TargetData touch_target_; 116 RenderWidgetHostViewBase* touch_target_;
123 TargetData touchscreen_gesture_target_; 117 RenderWidgetHostViewBase* gesture_target_;
124 TargetData touchpad_gesture_target_; 118 gfx::Vector2d touch_delta_;
119 gfx::Vector2d gesture_delta_;
125 int active_touches_; 120 int active_touches_;
126 std::unordered_map<cc::SurfaceId, HittestData, cc::SurfaceIdHash> 121 std::unordered_map<cc::SurfaceId, HittestData, cc::SurfaceIdHash>
127 hittest_data_; 122 hittest_data_;
128 123
129 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostInputEventRouter); 124 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostInputEventRouter);
130 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest, 125 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest,
131 InputEventRouterGestureTargetQueueTest); 126 InputEventRouterGestureTargetQueueTest);
132 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest,
133 InputEventRouterTouchpadGestureTargetTest);
134 }; 127 };
135 128
136 } // namespace content 129 } // namespace content
137 130
138 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H _ 131 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H _
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_input_event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698