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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1652483002: Browser Side Text Input State Tracking for OOPIF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing Comments and Fixing Compile Errors Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
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 e02c77031447bd168bd78da1759ae6fdceb488a9..82ad4008a02cfcd262a4ed51af2e31c4b9062f6d 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1671,6 +1671,22 @@ RenderWidgetHostImpl* WebContentsImpl::GetFocusedRenderWidgetHost(
return RenderWidgetHostImpl::From(view->GetRenderWidgetHost());
}
+RenderWidgetHostViewBase* WebContentsImpl::GetFocusedView() {
+ FrameTreeNode* focused_frame = frame_tree_.GetFocusedFrame();
+ if (!focused_frame)
+ return nullptr;
+
+ RenderFrameHostImpl* rfhi = focused_frame->current_frame_host();
+ if (rfhi->GetRenderWidgetHost())
+ return rfhi->GetRenderWidgetHost()->GetView();
+ else if (rfhi->GetRenderViewHost())
Charlie Reis 2016/02/17 06:22:14 nit: No else needed after return. Also, this look
kenrb 2016/02/17 23:05:53 I hadn't noticed this, but right. I think everythi
EhsanK 2016/02/18 05:48:01 Yes this is the correct way. Thanks!
EhsanK 2016/02/18 05:48:01 I guess using RFH::GetView() resolves all the issu
+ return RenderWidgetHostImpl::From(rfhi->GetRenderViewHost()->GetWidget())
+ ->GetView();
+
+ NOTREACHED();
+ return nullptr;
+}
+
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.

Powered by Google App Engine
This is Rietveld 408576698