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