Chromium Code Reviews| 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 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 923 blink::WebInsecureRequestPolicy policy) { | 923 blink::WebInsecureRequestPolicy policy) { |
| 924 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) | 924 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) |
| 925 return; | 925 return; |
| 926 | 926 |
| 927 for (const auto& pair : proxy_hosts_) { | 927 for (const auto& pair : proxy_hosts_) { |
| 928 pair.second->Send(new FrameMsg_EnforceInsecureRequestPolicy( | 928 pair.second->Send(new FrameMsg_EnforceInsecureRequestPolicy( |
| 929 pair.second->GetRoutingID(), policy)); | 929 pair.second->GetRoutingID(), policy)); |
| 930 } | 930 } |
| 931 } | 931 } |
| 932 | 932 |
| 933 void RenderFrameHostManager::OnDidChangeCollapsedState(bool collapsed) { | |
| 934 DCHECK(frame_tree_node_->parent()); | |
| 935 SiteInstance* parent_site_instance = | |
| 936 frame_tree_node_->parent()->current_frame_host()->GetSiteInstance(); | |
| 937 | |
| 938 // There will be no proxy to represent the pending or speculative RFHs in the | |
| 939 // parent's SiteInstance until the provisional load is committed, but the old | |
| 940 // RFH is not swapped out before that happens either, so we can talk to the | |
| 941 // FrameOwner in the parent via the child's current RenderFrame at any time. | |
| 942 DCHECK(current_frame_host()); | |
| 943 if (current_frame_host()->GetSiteInstance() == parent_site_instance) { | |
| 944 current_frame_host()->Send( | |
| 945 new FrameMsg_Collapse(current_frame_host()->GetRoutingID(), collapsed)); | |
| 946 } else { | |
| 947 RenderFrameProxyHost* proxy_to_parent = GetProxyToParent(); | |
|
alexmos
2017/04/11 06:00:29
optional: you could just use GetRenderFrameProxyHo
engedy
2017/04/11 08:06:17
Nice, done!
| |
| 948 proxy_to_parent->Send( | |
| 949 new FrameMsg_Collapse(proxy_to_parent->GetRoutingID(), collapsed)); | |
| 950 } | |
| 951 } | |
| 952 | |
| 933 void RenderFrameHostManager::OnDidUpdateFrameOwnerProperties( | 953 void RenderFrameHostManager::OnDidUpdateFrameOwnerProperties( |
| 934 const FrameOwnerProperties& properties) { | 954 const FrameOwnerProperties& properties) { |
| 935 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) | 955 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) |
| 936 return; | 956 return; |
| 937 | 957 |
| 938 // FrameOwnerProperties exist only for frames that have a parent. | 958 // FrameOwnerProperties exist only for frames that have a parent. |
| 939 CHECK(frame_tree_node_->parent()); | 959 CHECK(frame_tree_node_->parent()); |
| 940 SiteInstance* parent_instance = | 960 SiteInstance* parent_instance = |
| 941 frame_tree_node_->parent()->current_frame_host()->GetSiteInstance(); | 961 frame_tree_node_->parent()->current_frame_host()->GetSiteInstance(); |
| 942 | 962 |
| (...skipping 1865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2808 delegate_->IsHidden()) { | 2828 delegate_->IsHidden()) { |
| 2809 if (delegate_->IsHidden()) { | 2829 if (delegate_->IsHidden()) { |
| 2810 render_frame_host_->GetView()->Hide(); | 2830 render_frame_host_->GetView()->Hide(); |
| 2811 } else { | 2831 } else { |
| 2812 render_frame_host_->GetView()->Show(); | 2832 render_frame_host_->GetView()->Show(); |
| 2813 } | 2833 } |
| 2814 } | 2834 } |
| 2815 } | 2835 } |
| 2816 | 2836 |
| 2817 } // namespace content | 2837 } // namespace content |
| OLD | NEW |