Chromium Code Reviews| Index: content/browser/web_contents/web_contents_impl.cc |
| diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc |
| index 6b1407b78e0ace939218a24a5478b0c23d48f1c3..765168619c929bd78174d518c2d2c1a9ed0d4653 100644 |
| --- a/content/browser/web_contents/web_contents_impl.cc |
| +++ b/content/browser/web_contents/web_contents_impl.cc |
| @@ -1590,6 +1590,18 @@ void WebContentsImpl::ReplicatePageFocus(bool is_focused) { |
| frame_tree_.ReplicatePageFocus(is_focused); |
| } |
| +RenderWidgetHostImpl* WebContentsImpl::GetFocusedRenderWidgetHost() { |
|
alexmos
2015/10/23 23:40:16
I wasn't sure whether this logic should go into Re
kenrb
2015/10/28 21:07:05
I was thinking about this also, but I can't think
|
| + RenderWidgetHostImpl* target_rwh; |
| + FrameTreeNode* focused_frame = frame_tree_.GetFocusedFrame(); |
| + if (!focused_frame) { |
| + target_rwh = GetMainFrame()->GetRenderWidgetHost(); |
| + } else { |
| + target_rwh = RenderWidgetHostImpl::From( |
| + focused_frame->current_frame_host()->GetView()->GetRenderWidgetHost()); |
| + } |
| + return target_rwh; |
|
alexmos
2015/10/23 23:40:16
I thought about whether this should check AreCross
kenrb
2015/10/28 21:07:05
Will this affect browser plugin? Currently that st
alexmos
2015/10/29 05:26:29
I've tried it on a sample app with <webview>, and
|
| +} |
| + |
| void WebContentsImpl::EnterFullscreenMode(const GURL& origin) { |
| // This method is being called to enter renderer-initiated fullscreen mode. |
| // Make sure any existing fullscreen widget is shut down first. |