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 abc23579cabd91dcd471277b3e78c469d4686a4d..ff51dc226ecfd970d707aef8b80e389bc538e980 100644 |
| --- a/content/browser/frame_host/render_frame_host_manager.cc |
| +++ b/content/browser/frame_host/render_frame_host_manager.cc |
| @@ -984,6 +984,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 |
| + // 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. |
|
clamy
2017/01/18 15:10:55
Does this mean that if we start a request for whic
engedy
2017/01/18 23:37:14
Yep, that's the plan.
|
| + 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()) |