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

Side by Side Diff: content/browser/frame_host/render_frame_host_manager.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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/render_view_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/frame_host/render_frame_host_manager.h" 5 #include "content/browser/frame_host/render_frame_host_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 1846 matching lines...) Expand 10 before | Expand all | Expand 10 after
1857 1857
1858 RenderViewHostImpl* render_view_host = nullptr; 1858 RenderViewHostImpl* render_view_host = nullptr;
1859 1859
1860 // Ensure a RenderViewHost exists for |instance|, as it creates the page 1860 // Ensure a RenderViewHost exists for |instance|, as it creates the page
1861 // level structure in Blink. 1861 // level structure in Blink.
1862 render_view_host = 1862 render_view_host =
1863 frame_tree_node_->frame_tree()->GetRenderViewHost(instance); 1863 frame_tree_node_->frame_tree()->GetRenderViewHost(instance);
1864 if (!render_view_host) { 1864 if (!render_view_host) {
1865 CHECK(frame_tree_node_->IsMainFrame()); 1865 CHECK(frame_tree_node_->IsMainFrame());
1866 render_view_host = frame_tree_node_->frame_tree()->CreateRenderViewHost( 1866 render_view_host = frame_tree_node_->frame_tree()->CreateRenderViewHost(
1867 instance, MSG_ROUTING_NONE, MSG_ROUTING_NONE, true, 1867 instance, MSG_ROUTING_NONE, MSG_ROUTING_NONE, true, true);
1868 delegate_->IsHidden());
1869 } 1868 }
1870 1869
1871 RenderFrameProxyHost* proxy = GetRenderFrameProxyHost(instance); 1870 RenderFrameProxyHost* proxy = GetRenderFrameProxyHost(instance);
1872 if (proxy && proxy->is_render_frame_proxy_live()) 1871 if (proxy && proxy->is_render_frame_proxy_live())
1873 return proxy->GetRoutingID(); 1872 return proxy->GetRoutingID();
1874 1873
1875 if (!proxy) 1874 if (!proxy)
1876 proxy = CreateRenderFrameProxyHost(instance, render_view_host); 1875 proxy = CreateRenderFrameProxyHost(instance, render_view_host);
1877 1876
1878 if (frame_tree_node_->IsMainFrame()) { 1877 if (frame_tree_node_->IsMainFrame()) {
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after
2854 delegate_->IsHidden()) { 2853 delegate_->IsHidden()) {
2855 if (delegate_->IsHidden()) { 2854 if (delegate_->IsHidden()) {
2856 render_frame_host_->GetView()->Hide(); 2855 render_frame_host_->GetView()->Hide();
2857 } else { 2856 } else {
2858 render_frame_host_->GetView()->Show(); 2857 render_frame_host_->GetView()->Show();
2859 } 2858 }
2860 } 2859 }
2861 } 2860 }
2862 2861
2863 } // namespace content 2862 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_view_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698