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 <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. | |
|
Charlie Reis
2016/05/13 21:18:42
Maybe it's worth mentioning that this is only curr
alexmos
2016/05/14 01:12:37
Done.
| |
| 967 // | |
| 968 // TODO(alexmos): It would be sufficient to only send this update to proxies | |
| 969 // in the current FrameTree. | |
| 970 for (const auto& pair : proxy_hosts_) { | |
| 971 if (pair.second->GetSiteInstance() != parent_instance) { | |
| 972 pair.second->Send(new FrameMsg_SetFrameOwnerProperties( | |
| 973 pair.second->GetRoutingID(), properties)); | |
| 974 } | |
| 975 } | |
| 976 } | |
| 977 | |
| 949 void RenderFrameHostManager::OnDidUpdateOrigin( | 978 void RenderFrameHostManager::OnDidUpdateOrigin( |
| 950 const url::Origin& origin, | 979 const url::Origin& origin, |
| 951 bool is_potentially_trustworthy_unique_origin) { | 980 bool is_potentially_trustworthy_unique_origin) { |
| 952 for (const auto& pair : proxy_hosts_) { | 981 for (const auto& pair : proxy_hosts_) { |
| 953 pair.second->Send( | 982 pair.second->Send( |
| 954 new FrameMsg_DidUpdateOrigin(pair.second->GetRoutingID(), origin, | 983 new FrameMsg_DidUpdateOrigin(pair.second->GetRoutingID(), origin, |
| 955 is_potentially_trustworthy_unique_origin)); | 984 is_potentially_trustworthy_unique_origin)); |
| 956 } | 985 } |
| 957 } | 986 } |
| 958 | 987 |
| (...skipping 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2565 resolved_url)) { | 2594 resolved_url)) { |
| 2566 DCHECK(!dest_instance || | 2595 DCHECK(!dest_instance || |
| 2567 dest_instance == render_frame_host_->GetSiteInstance()); | 2596 dest_instance == render_frame_host_->GetSiteInstance()); |
| 2568 return false; | 2597 return false; |
| 2569 } | 2598 } |
| 2570 | 2599 |
| 2571 return true; | 2600 return true; |
| 2572 } | 2601 } |
| 2573 | 2602 |
| 2574 } // namespace content | 2603 } // namespace content |
| OLD | NEW |