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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 2914013004: Propagate auto-resize viewport values to OOPIF processes (Closed)
Patch Set: Style tidy-up Created 3 years, 7 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/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index df1962ab320d770de1b74f63d194e66a63cc5fc0..ee95681349227e15eb1b535ffe2e75ebb6847c93 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -933,6 +933,10 @@ void RenderViewHostImpl::DisableAutoResize(const gfx::Size& new_size) {
Send(new ViewMsg_DisableAutoResize(GetRoutingID(), new_size));
if (!new_size.IsEmpty())
GetWidget()->GetView()->SetSize(new_size);
+ // This clears the cached value in the WebContents, so that OOPIFs will
+ // stop using it.
+ if (GetWidget()->delegate())
+ GetWidget()->delegate()->ResetAutoResizeSize();
}
void RenderViewHostImpl::ExecuteMediaPlayerActionAtLocation(

Powered by Google App Engine
This is Rietveld 408576698