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

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: Addressing lfg@'s comment 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 RenderWidgetHostImpl;
Charlie Reis 2016/09/02 21:57:47 Stale?
kenrb 2016/09/06 18:14:48 This declares the Impl, so I don't think it's stal
Charlie Reis 2016/09/06 21:58:26 Ah yes, ignore this one. (I must have been overea
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)
kenrb 2016/09/06 18:14:48 Is the #ifdef necessary here? I don't see anything
EhsanK 2016/09/08 17:10:39 Acknowledged.
84 // Returns the RenderWidgetHostImpl inside the |root_view| at |point| where
85 // |point| is with respect to |root_view|'s coordinates. If a RWHI is found,
86 // the value of |transformed_point| is the coordinate of the point with
87 // respect to the RWHI's coordinates.
88 RenderWidgetHostImpl* GetRenderWidgetHostAtPoint(
89 RenderWidgetHostViewBase* root_view,
90 const gfx::Point& point,
91 gfx::Point* transformed_point);
92 #endif
93
82 private: 94 private:
83 struct HittestData { 95 struct HittestData {
84 bool ignored_for_hittest; 96 bool ignored_for_hittest;
85 }; 97 };
86 98
87 class HittestDelegate : public cc::SurfaceHittestDelegate { 99 class HittestDelegate : public cc::SurfaceHittestDelegate {
88 public: 100 public:
89 HittestDelegate( 101 HittestDelegate(
90 const std::unordered_map<cc::SurfaceId, HittestData, cc::SurfaceIdHash>& 102 const std::unordered_map<cc::SurfaceId, HittestData, cc::SurfaceIdHash>&
91 hittest_data); 103 hittest_data);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostInputEventRouter); 160 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostInputEventRouter);
149 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest, 161 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest,
150 InputEventRouterGestureTargetQueueTest); 162 InputEventRouterGestureTargetQueueTest);
151 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest, 163 FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest,
152 InputEventRouterTouchpadGestureTargetTest); 164 InputEventRouterTouchpadGestureTargetTest);
153 }; 165 };
154 166
155 } // namespace content 167 } // namespace content
156 168
157 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H _ 169 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_INPUT_EVENT_ROUTER_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698