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

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

Issue 2797473005: Fix interstitials on OOPIF-based guests. (Closed)
Patch Set: rebase Created 3 years, 8 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>
11 #include <unordered_map> 11 #include <unordered_map>
12 #include <vector>
12 13
13 #include "base/containers/hash_tables.h" 14 #include "base/containers/hash_tables.h"
14 #include "base/gtest_prod_util.h" 15 #include "base/gtest_prod_util.h"
15 #include "base/macros.h" 16 #include "base/macros.h"
16 #include "cc/surfaces/surface_hittest_delegate.h" 17 #include "cc/surfaces/surface_hittest_delegate.h"
17 #include "cc/surfaces/surface_id.h" 18 #include "cc/surfaces/surface_id.h"
18 #include "content/browser/renderer_host/render_widget_host_view_base_observer.h" 19 #include "content/browser/renderer_host/render_widget_host_view_base_observer.h"
19 #include "content/common/content_export.h" 20 #include "content/common/content_export.h"
20 #include "ui/gfx/geometry/vector2d.h" 21 #include "ui/gfx/geometry/vector2d.h"
21 22
(...skipping 10 matching lines...) Expand all
32 class Point; 33 class Point;
33 } 34 }
34 35
35 namespace ui { 36 namespace ui {
36 class LatencyInfo; 37 class LatencyInfo;
37 } 38 }
38 39
39 namespace content { 40 namespace content {
40 41
41 class RenderWidgetHostImpl; 42 class RenderWidgetHostImpl;
43 class RenderWidgetHostView;
42 class RenderWidgetHostViewBase; 44 class RenderWidgetHostViewBase;
43 45
44 // Class owned by WebContentsImpl for the purpose of directing input events 46 // Class owned by WebContentsImpl for the purpose of directing input events
45 // to the correct RenderWidgetHost on pages with multiple RenderWidgetHosts. 47 // to the correct RenderWidgetHost on pages with multiple RenderWidgetHosts.
46 // It maintains a mapping of RenderWidgetHostViews to Surface IDs that they 48 // It maintains a mapping of RenderWidgetHostViews to Surface IDs that they
47 // own. When an input event requires routing based on window coordinates, 49 // own. When an input event requires routing based on window coordinates,
48 // this class requests a Surface hit test from the provided |root_view| and 50 // this class requests a Surface hit test from the provided |root_view| and
49 // forwards the event to the owning RWHV of the returned Surface ID. 51 // forwards the event to the owning RWHV of the returned Surface ID.
50 class CONTENT_EXPORT RenderWidgetHostInputEventRouter 52 class CONTENT_EXPORT RenderWidgetHostInputEventRouter
51 : public RenderWidgetHostViewBaseObserver { 53 : public RenderWidgetHostViewBaseObserver {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // Returns the RenderWidgetHostImpl inside the |root_view| at |point| where 88 // Returns the RenderWidgetHostImpl inside the |root_view| at |point| where
87 // |point| is with respect to |root_view|'s coordinates. If a RWHI is found, 89 // |point| is with respect to |root_view|'s coordinates. If a RWHI is found,
88 // the value of |transformed_point| is the coordinate of the point with 90 // the value of |transformed_point| is the coordinate of the point with
89 // respect to the RWHI's coordinates. If |root_view| is nullptr, this method 91 // respect to the RWHI's coordinates. If |root_view| is nullptr, this method
90 // will return nullptr and will not modify |transformed_point|. 92 // will return nullptr and will not modify |transformed_point|.
91 RenderWidgetHostImpl* GetRenderWidgetHostAtPoint( 93 RenderWidgetHostImpl* GetRenderWidgetHostAtPoint(
92 RenderWidgetHostViewBase* root_view, 94 RenderWidgetHostViewBase* root_view,
93 const gfx::Point& point, 95 const gfx::Point& point,
94 gfx::Point* transformed_point); 96 gfx::Point* transformed_point);
95 97
98 std::vector<RenderWidgetHostView*> GetRenderWidgetHostViewsForTests() const;
99
96 private: 100 private:
97 struct HittestData { 101 struct HittestData {
98 bool ignored_for_hittest; 102 bool ignored_for_hittest;
99 }; 103 };
100 104
101 class HittestDelegate : public cc::SurfaceHittestDelegate { 105 class HittestDelegate : public cc::SurfaceHittestDelegate {
102 public: 106 public:
103 HittestDelegate( 107 HittestDelegate(
104 const std::unordered_map<cc::SurfaceId, HittestData, cc::SurfaceIdHash>& 108 const std::unordered_map<cc::SurfaceId, HittestData, cc::SurfaceIdHash>&
105 hittest_data); 109 hittest_data);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostInputEventRouter); 183 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostInputEventRouter);
180 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest, 184 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest,
181 InputEventRouterGestureTargetQueueTest); 185 InputEventRouterGestureTargetQueueTest);
182 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest, 186 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest,
183 InputEventRouterTouchpadGestureTargetTest); 187 InputEventRouterTouchpadGestureTargetTest);
184 }; 188 };
185 189
186 } // namespace content 190 } // namespace content
187 191
188 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H _ 192 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698