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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_guest.h

Issue 1934703002: Fix keyboard focus for OOPIF-<webview>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nasko@ comments. Created 4 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 size_t offset, 91 size_t offset,
92 const gfx::Range& range) override; 92 const gfx::Range& range) override;
93 void SelectionBoundsChanged( 93 void SelectionBoundsChanged(
94 const ViewHostMsg_SelectionBounds_Params& params) override; 94 const ViewHostMsg_SelectionBounds_Params& params) override;
95 void OnSwapCompositorFrame(uint32_t output_surface_id, 95 void OnSwapCompositorFrame(uint32_t output_surface_id,
96 cc::CompositorFrame frame) override; 96 cc::CompositorFrame frame) override;
97 #if defined(USE_AURA) 97 #if defined(USE_AURA)
98 void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, 98 void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch,
99 InputEventAckState ack_result) override; 99 InputEventAckState ack_result) override;
100 #endif 100 #endif
101 void ProcessMouseEvent(const blink::WebMouseEvent& event,
102 const ui::LatencyInfo& latency) override;
101 void ProcessTouchEvent(const blink::WebTouchEvent& event, 103 void ProcessTouchEvent(const blink::WebTouchEvent& event,
102 const ui::LatencyInfo& latency) override; 104 const ui::LatencyInfo& latency) override;
103 105
104 bool LockMouse() override; 106 bool LockMouse() override;
105 void UnlockMouse() override; 107 void UnlockMouse() override;
106 void GetScreenInfo(blink::WebScreenInfo* results) override; 108 void GetScreenInfo(blink::WebScreenInfo* results) override;
107 109
108 #if defined(OS_MACOSX) 110 #if defined(OS_MACOSX)
109 // RenderWidgetHostView implementation. 111 // RenderWidgetHostView implementation.
110 void SetActive(bool active) override; 112 void SetActive(bool active) override;
(...skipping 12 matching lines...) Expand all
123 125
124 void GestureEventAck(const blink::WebGestureEvent& event, 126 void GestureEventAck(const blink::WebGestureEvent& event,
125 InputEventAckState ack_result) override; 127 InputEventAckState ack_result) override;
126 128
127 protected: 129 protected:
128 friend class RenderWidgetHostView; 130 friend class RenderWidgetHostView;
129 131
130 private: 132 private:
131 RenderWidgetHostViewBase* GetOwnerRenderWidgetHostView() const; 133 RenderWidgetHostViewBase* GetOwnerRenderWidgetHostView() const;
132 134
135 // Since we now route GestureEvents directly to the guest renderer, we need
136 // a way to make sure that the BrowserPlugin in the embedder gets focused so
137 // that keyboard input (which still travels via BrowserPlugin) is routed to
138 // the plugin and thus onwards to the guest.
139 // TODO(wjmaclean): When we remove BrowserPlugin, delete this code.
140 // http://crbug.com/533069
141 void MaybeSendSyntheticTapGesture(
142 const blink::WebFloatPoint& position,
143 const blink::WebFloatPoint& screenPosition) const;
144
133 void OnHandleInputEvent(RenderWidgetHostImpl* embedder, 145 void OnHandleInputEvent(RenderWidgetHostImpl* embedder,
134 int browser_plugin_instance_id, 146 int browser_plugin_instance_id,
135 const blink::WebInputEvent* event); 147 const blink::WebInputEvent* event);
136 148
137 // BrowserPluginGuest and RenderWidgetHostViewGuest's lifetimes are not tied 149 // BrowserPluginGuest and RenderWidgetHostViewGuest's lifetimes are not tied
138 // to one another, therefore we access |guest_| through WeakPtr. 150 // to one another, therefore we access |guest_| through WeakPtr.
139 base::WeakPtr<BrowserPluginGuest> guest_; 151 base::WeakPtr<BrowserPluginGuest> guest_;
140 gfx::Size size_; 152 gfx::Size size_;
141 // The platform view for this RenderWidgetHostView. 153 // The platform view for this RenderWidgetHostView.
142 // RenderWidgetHostViewGuest mostly only cares about stuff related to 154 // RenderWidgetHostViewGuest mostly only cares about stuff related to
143 // compositing, the rest are directly forwarded to this |platform_view_|. 155 // compositing, the rest are directly forwarded to this |platform_view_|.
144 base::WeakPtr<RenderWidgetHostViewBase> platform_view_; 156 base::WeakPtr<RenderWidgetHostViewBase> platform_view_;
145 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewGuest); 157 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewGuest);
146 }; 158 };
147 159
148 } // namespace content 160 } // namespace content
149 161
150 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ 162 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_proxy_host.cc ('k') | content/browser/frame_host/render_widget_host_view_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698