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

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

Issue 1663433002: Adds an interface to SurfaceHittestDelegate in order to override (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 #include <unordered_map> 9 #include <unordered_map>
10 10
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 bool ignored_for_hittest; 68 bool ignored_for_hittest;
69 }; 69 };
70 70
71 class HittestDelegate : public cc::SurfaceHittestDelegate { 71 class HittestDelegate : public cc::SurfaceHittestDelegate {
72 public: 72 public:
73 HittestDelegate( 73 HittestDelegate(
74 const std::unordered_map<cc::SurfaceId, HittestData, cc::SurfaceIdHash>& 74 const std::unordered_map<cc::SurfaceId, HittestData, cc::SurfaceIdHash>&
75 hittest_data); 75 hittest_data);
76 bool RejectHitTarget(const cc::SurfaceDrawQuad* surface_quad, 76 bool RejectHitTarget(const cc::SurfaceDrawQuad* surface_quad,
77 const gfx::Point& point_in_quad_space) override; 77 const gfx::Point& point_in_quad_space) override;
78 bool AcceptHitTarget(const cc::SurfaceDrawQuad* surface_quad,
79 const gfx::Point& point_in_quad_space) override;
78 80
79 const std::unordered_map<cc::SurfaceId, HittestData, cc::SurfaceIdHash>& 81 const std::unordered_map<cc::SurfaceId, HittestData, cc::SurfaceIdHash>&
80 hittest_data_; 82 hittest_data_;
81 }; 83 };
82 84
83 using WeakTarget = base::WeakPtr<RenderWidgetHostViewBase>; 85 using WeakTarget = base::WeakPtr<RenderWidgetHostViewBase>;
84 using SurfaceIdNamespaceOwnerMap = 86 using SurfaceIdNamespaceOwnerMap =
85 base::hash_map<uint32_t, base::WeakPtr<RenderWidgetHostViewBase>>; 87 base::hash_map<uint32_t, base::WeakPtr<RenderWidgetHostViewBase>>;
86 88
87 RenderWidgetHostViewBase* FindEventTarget(RenderWidgetHostViewBase* root_view, 89 RenderWidgetHostViewBase* FindEventTarget(RenderWidgetHostViewBase* root_view,
88 const gfx::Point& point, 90 const gfx::Point& point,
89 gfx::Point* transformed_point); 91 gfx::Point* transformed_point);
90 92
91 SurfaceIdNamespaceOwnerMap owner_map_; 93 SurfaceIdNamespaceOwnerMap owner_map_;
92 WeakTarget current_touch_target_; 94 WeakTarget current_touch_target_;
93 int active_touches_; 95 int active_touches_;
94 std::unordered_map<cc::SurfaceId, HittestData, cc::SurfaceIdHash> 96 std::unordered_map<cc::SurfaceId, HittestData, cc::SurfaceIdHash>
95 hittest_data_; 97 hittest_data_;
96 98
97 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostInputEventRouter); 99 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostInputEventRouter);
98 }; 100 };
99 101
100 } // namespace content 102 } // namespace content
101 103
102 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H _ 104 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H _
OLDNEW
« no previous file with comments | « cc/test/surface_hittest_test_helpers.cc ('k') | 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