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 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 blink::WebInsecureRequestPolicy policy) { | 943 blink::WebInsecureRequestPolicy policy) { |
944 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) | 944 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) |
945 return; | 945 return; |
946 | 946 |
947 for (const auto& pair : proxy_hosts_) { | 947 for (const auto& pair : proxy_hosts_) { |
948 pair.second->Send(new FrameMsg_EnforceInsecureRequestPolicy( | 948 pair.second->Send(new FrameMsg_EnforceInsecureRequestPolicy( |
949 pair.second->GetRoutingID(), policy)); | 949 pair.second->GetRoutingID(), policy)); |
950 } | 950 } |
951 } | 951 } |
952 | 952 |
| 953 void RenderFrameHostManager::OnDidChangeCollapsedState(bool collapsed) { |
| 954 DCHECK(frame_tree_node_->parent()); |
| 955 SiteInstance* parent_site_instance = |
| 956 frame_tree_node_->parent()->current_frame_host()->GetSiteInstance(); |
| 957 |
| 958 // There will be no proxy to represent the pending or speculative RFHs in the |
| 959 // parent's SiteInstance until the navigation is committed, but the old RFH is |
| 960 // not swapped out before that happens either, so we can talk to the |
| 961 // FrameOwner in the parent via the child's current RenderFrame at any time. |
| 962 DCHECK(current_frame_host()); |
| 963 if (current_frame_host()->GetSiteInstance() == parent_site_instance) { |
| 964 current_frame_host()->Send( |
| 965 new FrameMsg_Collapse(current_frame_host()->GetRoutingID(), collapsed)); |
| 966 } else { |
| 967 RenderFrameProxyHost* proxy_to_parent = |
| 968 GetRenderFrameProxyHost(parent_site_instance); |
| 969 proxy_to_parent->Send( |
| 970 new FrameMsg_Collapse(proxy_to_parent->GetRoutingID(), collapsed)); |
| 971 } |
| 972 } |
| 973 |
953 void RenderFrameHostManager::OnDidUpdateFrameOwnerProperties( | 974 void RenderFrameHostManager::OnDidUpdateFrameOwnerProperties( |
954 const FrameOwnerProperties& properties) { | 975 const FrameOwnerProperties& properties) { |
955 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) | 976 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) |
956 return; | 977 return; |
957 | 978 |
958 // FrameOwnerProperties exist only for frames that have a parent. | 979 // FrameOwnerProperties exist only for frames that have a parent. |
959 CHECK(frame_tree_node_->parent()); | 980 CHECK(frame_tree_node_->parent()); |
960 SiteInstance* parent_instance = | 981 SiteInstance* parent_instance = |
961 frame_tree_node_->parent()->current_frame_host()->GetSiteInstance(); | 982 frame_tree_node_->parent()->current_frame_host()->GetSiteInstance(); |
962 | 983 |
(...skipping 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2835 delegate_->IsHidden()) { | 2856 delegate_->IsHidden()) { |
2836 if (delegate_->IsHidden()) { | 2857 if (delegate_->IsHidden()) { |
2837 render_frame_host_->GetView()->Hide(); | 2858 render_frame_host_->GetView()->Hide(); |
2838 } else { | 2859 } else { |
2839 render_frame_host_->GetView()->Show(); | 2860 render_frame_host_->GetView()->Show(); |
2840 } | 2861 } |
2841 } | 2862 } |
2842 } | 2863 } |
2843 | 2864 |
2844 } // namespace content | 2865 } // namespace content |
OLD | NEW |