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

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

Issue 2863003002: Use the WebContents visibility as the initial visibility when creating a swapped-out RenderView. (Closed)
Patch Set: address comment 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 f62cf8320202c8cecfe3caa4b1504b320f58ca25..8ccaf1f10a67bc75222dbb6cfb32f178825c5290 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -309,7 +309,8 @@ bool RenderViewHostImpl::CreateRenderView(
params->swapped_out = !is_active_;
params->replicated_frame_state = replicated_frame_state;
params->proxy_routing_id = proxy_route_id;
- params->hidden = GetWidget()->is_hidden();
+ params->hidden = is_active_ ? GetWidget()->is_hidden()
+ : GetWidget()->delegate()->IsHidden();
params->never_visible = delegate_->IsNeverVisible();
params->window_was_created_with_opener = window_was_created_with_opener;
params->enable_auto_resize = GetWidget()->auto_resize_enabled();
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.cc ('k') | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698