Index: content/browser/frame_host/render_frame_host_manager.cc |
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc |
index 42ee8bc75ae27ee8f7c2818f27a2b4536c46e797..e8c33818510b26cd7c34cfde9643e70442df4940 100644 |
--- a/content/browser/frame_host/render_frame_host_manager.cc |
+++ b/content/browser/frame_host/render_frame_host_manager.cc |
@@ -949,6 +949,27 @@ void RenderFrameHostManager::OnEnforceInsecureRequestPolicy( |
} |
} |
+void RenderFrameHostManager::OnDidChangeCollapsedState(bool collapsed) { |
+ DCHECK(frame_tree_node_->parent()); |
+ SiteInstance* parent_site_instance = |
+ frame_tree_node_->parent()->current_frame_host()->GetSiteInstance(); |
+ |
+ // There will be no proxy to represent the pending or speculative RFHs in the |
+ // parent's SiteInstance until the provisional load is committed, but the old |
nasko
2017/05/03 16:58:30
nit: s/the provisional load/the navigation/
engedy
2017/05/05 08:23:57
Done.
|
+ // RFH is not swapped out before that happens either, so we can talk to the |
+ // FrameOwner in the parent via the child's current RenderFrame at any time. |
+ DCHECK(current_frame_host()); |
+ if (current_frame_host()->GetSiteInstance() == parent_site_instance) { |
+ current_frame_host()->Send( |
+ new FrameMsg_Collapse(current_frame_host()->GetRoutingID(), collapsed)); |
+ } else { |
+ RenderFrameProxyHost* proxy_to_parent = |
+ GetRenderFrameProxyHost(parent_site_instance); |
+ proxy_to_parent->Send( |
+ new FrameMsg_Collapse(proxy_to_parent->GetRoutingID(), collapsed)); |
+ } |
+} |
+ |
void RenderFrameHostManager::OnDidUpdateFrameOwnerProperties( |
const FrameOwnerProperties& properties) { |
if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) |