| OLD | NEW |
| 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 Loading... |
| 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
_ |
| OLD | NEW |