OLD | NEW |
---|---|
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 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
989 blink::WebInsecureRequestPolicy policy) { | 989 blink::WebInsecureRequestPolicy policy) { |
990 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) | 990 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) |
991 return; | 991 return; |
992 | 992 |
993 for (const auto& pair : proxy_hosts_) { | 993 for (const auto& pair : proxy_hosts_) { |
994 pair.second->Send(new FrameMsg_EnforceInsecureRequestPolicy( | 994 pair.second->Send(new FrameMsg_EnforceInsecureRequestPolicy( |
995 pair.second->GetRoutingID(), policy)); | 995 pair.second->GetRoutingID(), policy)); |
996 } | 996 } |
997 } | 997 } |
998 | 998 |
999 void RenderFrameHostManager::OnDidUpdateFrameOwnerCollapsedState( | |
1000 bool collapsed) { | |
1001 DCHECK(frame_tree_node_->parent()); | |
1002 SiteInstance* parent_site_instance = | |
1003 frame_tree_node_->parent()->current_frame_host()->GetSiteInstance(); | |
1004 | |
1005 // There will be no proxy to represent the pending or speculative RFHs in the | |
1006 // 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.
| |
1007 // RFH is not swapped out before that happens either, so we can talk to the | |
1008 // FrameOwner in the parent via the child's current RenderFrame at any time. | |
1009 DCHECK(current_frame_host()); | |
1010 if (current_frame_host()->GetSiteInstance() == parent_site_instance) { | |
1011 current_frame_host()->Send(new FrameMsg_CollapseFrameOwner( | |
1012 current_frame_host()->GetRoutingID(), collapsed)); | |
1013 } else { | |
1014 RenderFrameProxyHost* proxy_to_parent = GetProxyToParent(); | |
1015 proxy_to_parent->Send(new FrameMsg_CollapseFrameOwner( | |
1016 proxy_to_parent->GetRoutingID(), collapsed)); | |
1017 } | |
1018 } | |
1019 | |
999 void RenderFrameHostManager::OnDidUpdateFrameOwnerProperties( | 1020 void RenderFrameHostManager::OnDidUpdateFrameOwnerProperties( |
1000 const FrameOwnerProperties& properties) { | 1021 const FrameOwnerProperties& properties) { |
1001 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) | 1022 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) |
1002 return; | 1023 return; |
1003 | 1024 |
1004 // FrameOwnerProperties exist only for frames that have a parent. | 1025 // FrameOwnerProperties exist only for frames that have a parent. |
1005 CHECK(frame_tree_node_->parent()); | 1026 CHECK(frame_tree_node_->parent()); |
1006 SiteInstance* parent_instance = | 1027 SiteInstance* parent_instance = |
1007 frame_tree_node_->parent()->current_frame_host()->GetSiteInstance(); | 1028 frame_tree_node_->parent()->current_frame_host()->GetSiteInstance(); |
1008 | 1029 |
(...skipping 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2763 resolved_url)) { | 2784 resolved_url)) { |
2764 DCHECK(!dest_instance || | 2785 DCHECK(!dest_instance || |
2765 dest_instance == render_frame_host_->GetSiteInstance()); | 2786 dest_instance == render_frame_host_->GetSiteInstance()); |
2766 return false; | 2787 return false; |
2767 } | 2788 } |
2768 | 2789 |
2769 return true; | 2790 return true; |
2770 } | 2791 } |
2771 | 2792 |
2772 } // namespace content | 2793 } // namespace content |
OLD | NEW |