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

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

Issue 2422973003: Fix TextInputClientMac related crashes of Fullscreen RenderWidget (Closed)
Patch Set: Rebased Created 4 years, 1 month 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 11172c31d3b9c4f0fc6bcffb7a69d687a4238cc9..fa092e8ad85c20dca098562a2bcc49916d48143a 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -928,10 +928,9 @@ RenderWidgetHostView* WebContentsImpl::GetTopLevelRenderWidgetHostView() {
RenderWidgetHostView* WebContentsImpl::GetFullscreenRenderWidgetHostView()
const {
- RenderWidgetHost* const widget_host =
- RenderWidgetHostImpl::FromID(fullscreen_widget_process_id_,
- fullscreen_widget_routing_id_);
- return widget_host ? widget_host->GetView() : NULL;
+ if (auto widget_host = GetFullscreenRenderWidgetHost())
+ return widget_host->GetView();
+ return nullptr;
}
WebContentsView* WebContentsImpl::GetView() const {
@@ -5015,6 +5014,11 @@ int WebContentsImpl::GetOuterDelegateFrameTreeNodeId() {
return FrameTreeNode::kFrameTreeNodeInvalidId;
}
+RenderWidgetHostImpl* WebContentsImpl::GetFullscreenRenderWidgetHost() const {
+ return RenderWidgetHostImpl::FromID(fullscreen_widget_process_id_,
+ fullscreen_widget_routing_id_);
+}
+
RenderFrameHostManager* WebContentsImpl::GetRenderManager() const {
return frame_tree_.root()->render_manager();
}
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698