Chromium Code Reviews| 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 cf4050b7eb81cb9e87dbac7cff8ff2ec48670e41..538adcac7814d3d754670681e6d5e34af61cff44 100644 |
| --- a/content/browser/frame_host/render_frame_host_manager.cc |
| +++ b/content/browser/frame_host/render_frame_host_manager.cc |
| @@ -996,6 +996,27 @@ void RenderFrameHostManager::OnEnforceInsecureRequestPolicy( |
| } |
| } |
| +void RenderFrameHostManager::OnDidUpdateFrameOwnerCollapsedState( |
| + 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 site instance until the provisional load is committed, but the old |
|
nasko
2017/01/19 00:11:46
nit: SiteInstance
engedy
2017/02/17 18:09:25
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_CollapseFrameOwner( |
| + current_frame_host()->GetRoutingID(), collapsed)); |
| + } else { |
| + RenderFrameProxyHost* proxy_to_parent = GetProxyToParent(); |
| + proxy_to_parent->Send(new FrameMsg_CollapseFrameOwner( |
| + proxy_to_parent->GetRoutingID(), collapsed)); |
| + } |
| +} |
| + |
| void RenderFrameHostManager::OnDidUpdateFrameOwnerProperties( |
| const FrameOwnerProperties& properties) { |
| if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) |