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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 RenderWidgetHostImpl* main_rwh = main_rfh->GetRenderWidgetHost(); 302 RenderWidgetHostImpl* main_rwh = main_rfh->GetRenderWidgetHost();
303 params->main_frame_widget_routing_id = main_rwh->GetRoutingID(); 303 params->main_frame_widget_routing_id = main_rwh->GetRoutingID();
304 } 304 }
305 params->session_storage_namespace_id = 305 params->session_storage_namespace_id =
306 delegate_->GetSessionStorageNamespace(instance_.get())->id(); 306 delegate_->GetSessionStorageNamespace(instance_.get())->id();
307 // Ensure the RenderView sets its opener correctly. 307 // Ensure the RenderView sets its opener correctly.
308 params->opener_frame_route_id = opener_frame_route_id; 308 params->opener_frame_route_id = opener_frame_route_id;
309 params->swapped_out = !is_active_; 309 params->swapped_out = !is_active_;
310 params->replicated_frame_state = replicated_frame_state; 310 params->replicated_frame_state = replicated_frame_state;
311 params->proxy_routing_id = proxy_route_id; 311 params->proxy_routing_id = proxy_route_id;
312 params->hidden = GetWidget()->is_hidden(); 312 params->hidden = is_active_ ? GetWidget()->is_hidden()
313 : GetWidget()->delegate()->IsHidden();
nasko 2017/05/05 18:42:55 Wouldn't the value of GetWidget()->delegate()->IsH
lfg 2017/05/05 18:53:02 It's not correct for interstitials. It's also not
nasko 2017/05/05 20:33:51 Acknowledged.
313 params->never_visible = delegate_->IsNeverVisible(); 314 params->never_visible = delegate_->IsNeverVisible();
314 params->window_was_created_with_opener = window_was_created_with_opener; 315 params->window_was_created_with_opener = window_was_created_with_opener;
315 params->enable_auto_resize = GetWidget()->auto_resize_enabled(); 316 params->enable_auto_resize = GetWidget()->auto_resize_enabled();
316 params->min_size = GetWidget()->min_size_for_auto_resize(); 317 params->min_size = GetWidget()->min_size_for_auto_resize();
317 params->max_size = GetWidget()->max_size_for_auto_resize(); 318 params->max_size = GetWidget()->max_size_for_auto_resize();
318 params->page_zoom_level = delegate_->GetPendingPageZoomLevel(); 319 params->page_zoom_level = delegate_->GetPendingPageZoomLevel();
319 params->image_decode_color_space = gfx::ICCProfile::FromBestMonitor(); 320 params->image_decode_color_space = gfx::ICCProfile::FromBestMonitor();
320 321
321 // Pretend that HDR displays are sRGB so that we do not have inconsistent 322 // Pretend that HDR displays are sRGB so that we do not have inconsistent
322 // coloring. 323 // coloring.
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 } 956 }
956 957
957 void RenderViewHostImpl::ClosePageTimeout() { 958 void RenderViewHostImpl::ClosePageTimeout() {
958 if (delegate_->ShouldIgnoreUnresponsiveRenderer()) 959 if (delegate_->ShouldIgnoreUnresponsiveRenderer())
959 return; 960 return;
960 961
961 ClosePageIgnoringUnloadEvents(); 962 ClosePageIgnoringUnloadEvents();
962 } 963 }
963 964
964 } // namespace content 965 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698