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 <utility> | 10 #include <utility> |
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
939 bool should_enforce) { | 939 bool should_enforce) { |
940 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) | 940 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) |
941 return; | 941 return; |
942 | 942 |
943 for (const auto& pair : proxy_hosts_) { | 943 for (const auto& pair : proxy_hosts_) { |
944 pair.second->Send(new FrameMsg_EnforceStrictMixedContentChecking( | 944 pair.second->Send(new FrameMsg_EnforceStrictMixedContentChecking( |
945 pair.second->GetRoutingID(), should_enforce)); | 945 pair.second->GetRoutingID(), should_enforce)); |
946 } | 946 } |
947 } | 947 } |
948 | 948 |
| 949 void RenderFrameHostManager::OnDidUpdateFrameOwnerProperties( |
| 950 const blink::WebFrameOwnerProperties& properties) { |
| 951 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) |
| 952 return; |
| 953 |
| 954 // WebFrameOwnerProperties exist only for frames that have a parent. |
| 955 CHECK(frame_tree_node_->parent()); |
| 956 SiteInstance* parent_instance = |
| 957 frame_tree_node_->parent()->current_frame_host()->GetSiteInstance(); |
| 958 |
| 959 // Notify the RenderFrame if it lives in a different process from its parent. |
| 960 if (render_frame_host_->GetSiteInstance() != parent_instance) { |
| 961 render_frame_host_->Send(new FrameMsg_SetFrameOwnerProperties( |
| 962 render_frame_host_->GetRoutingID(), properties)); |
| 963 } |
| 964 |
| 965 // Notify this frame's proxies if they live in a different process from its |
| 966 // parent. This is only currently needed for the allowFullscreen property, |
| 967 // since that can be queried on RemoteFrame ancestors. |
| 968 // |
| 969 // TODO(alexmos): It would be sufficient to only send this update to proxies |
| 970 // in the current FrameTree. |
| 971 for (const auto& pair : proxy_hosts_) { |
| 972 if (pair.second->GetSiteInstance() != parent_instance) { |
| 973 pair.second->Send(new FrameMsg_SetFrameOwnerProperties( |
| 974 pair.second->GetRoutingID(), properties)); |
| 975 } |
| 976 } |
| 977 } |
| 978 |
949 void RenderFrameHostManager::OnDidUpdateOrigin( | 979 void RenderFrameHostManager::OnDidUpdateOrigin( |
950 const url::Origin& origin, | 980 const url::Origin& origin, |
951 bool is_potentially_trustworthy_unique_origin) { | 981 bool is_potentially_trustworthy_unique_origin) { |
952 for (const auto& pair : proxy_hosts_) { | 982 for (const auto& pair : proxy_hosts_) { |
953 pair.second->Send( | 983 pair.second->Send( |
954 new FrameMsg_DidUpdateOrigin(pair.second->GetRoutingID(), origin, | 984 new FrameMsg_DidUpdateOrigin(pair.second->GetRoutingID(), origin, |
955 is_potentially_trustworthy_unique_origin)); | 985 is_potentially_trustworthy_unique_origin)); |
956 } | 986 } |
957 } | 987 } |
958 | 988 |
(...skipping 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2565 resolved_url)) { | 2595 resolved_url)) { |
2566 DCHECK(!dest_instance || | 2596 DCHECK(!dest_instance || |
2567 dest_instance == render_frame_host_->GetSiteInstance()); | 2597 dest_instance == render_frame_host_->GetSiteInstance()); |
2568 return false; | 2598 return false; |
2569 } | 2599 } |
2570 | 2600 |
2571 return true; | 2601 return true; |
2572 } | 2602 } |
2573 | 2603 |
2574 } // namespace content | 2604 } // namespace content |
OLD | NEW |