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

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

Issue 2278283002: Implement Mac Pop-up Dictionary for OOPIF. (Closed)
Patch Set: Added Tests and Modified DEPS Created 4 years, 3 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>
(...skipping 20 matching lines...) Expand all
31 namespace gfx { 31 namespace gfx {
32 class Point; 32 class Point;
33 } 33 }
34 34
35 namespace ui { 35 namespace ui {
36 class LatencyInfo; 36 class LatencyInfo;
37 } 37 }
38 38
39 namespace content { 39 namespace content {
40 40
41 class RenderWidgetHost;
41 class RenderWidgetHostViewBase; 42 class RenderWidgetHostViewBase;
42 43
43 // Class owned by WebContentsImpl for the purpose of directing input events 44 // Class owned by WebContentsImpl for the purpose of directing input events
44 // to the correct RenderWidgetHost on pages with multiple RenderWidgetHosts. 45 // to the correct RenderWidgetHost on pages with multiple RenderWidgetHosts.
45 // It maintains a mapping of RenderWidgetHostViews to Surface IDs that they 46 // It maintains a mapping of RenderWidgetHostViews to Surface IDs that they
46 // own. When an input event requires routing based on window coordinates, 47 // own. When an input event requires routing based on window coordinates,
47 // this class requests a Surface hit test from the provided |root_view| and 48 // this class requests a Surface hit test from the provided |root_view| and
48 // forwards the event to the owning RWHV of the returned Surface ID. 49 // forwards the event to the owning RWHV of the returned Surface ID.
49 class CONTENT_EXPORT RenderWidgetHostInputEventRouter 50 class CONTENT_EXPORT RenderWidgetHostInputEventRouter
50 : public RenderWidgetHostViewBaseObserver { 51 : public RenderWidgetHostViewBaseObserver {
(...skipping 21 matching lines...) Expand all
72 73
73 void AddSurfaceClientIdOwner(uint32_t id, RenderWidgetHostViewBase* owner); 74 void AddSurfaceClientIdOwner(uint32_t id, RenderWidgetHostViewBase* owner);
74 void RemoveSurfaceClientIdOwner(uint32_t id); 75 void RemoveSurfaceClientIdOwner(uint32_t id);
75 76
76 bool is_registered(uint32_t id) { 77 bool is_registered(uint32_t id) {
77 return owner_map_.find(id) != owner_map_.end(); 78 return owner_map_.find(id) != owner_map_.end();
78 } 79 }
79 80
80 void OnHittestData(const FrameHostMsg_HittestData_Params& params); 81 void OnHittestData(const FrameHostMsg_HittestData_Params& params);
81 82
83 #if defined(OS_MACOSX)
84 RenderWidgetHost* GetRenderWidgetHostAtPos(
Charlie Reis 2016/08/31 22:50:03 nit: Needs comment (e.g., explaining |point| vs |t
EhsanK 2016/09/01 21:58:36 Done.
85 RenderWidgetHostViewBase* root_view,
86 const gfx::Point& point,
87 gfx::Point* transformed_point);
88 #endif
89
82 private: 90 private:
83 struct HittestData { 91 struct HittestData {
84 bool ignored_for_hittest; 92 bool ignored_for_hittest;
85 }; 93 };
86 94
87 class HittestDelegate : public cc::SurfaceHittestDelegate { 95 class HittestDelegate : public cc::SurfaceHittestDelegate {
88 public: 96 public:
89 HittestDelegate( 97 HittestDelegate(
90 const std::unordered_map<cc::SurfaceId, HittestData, cc::SurfaceIdHash>& 98 const std::unordered_map<cc::SurfaceId, HittestData, cc::SurfaceIdHash>&
91 hittest_data); 99 hittest_data);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostInputEventRouter); 156 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostInputEventRouter);
149 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest, 157 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest,
150 InputEventRouterGestureTargetQueueTest); 158 InputEventRouterGestureTargetQueueTest);
151 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest, 159 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest,
152 InputEventRouterTouchpadGestureTargetTest); 160 InputEventRouterTouchpadGestureTargetTest);
153 }; 161 };
154 162
155 } // namespace content 163 } // namespace content
156 164
157 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H _ 165 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698