| 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 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 971 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) | 971 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) |
| 972 return; | 972 return; |
| 973 | 973 |
| 974 for (const auto& pair : proxy_hosts_) { | 974 for (const auto& pair : proxy_hosts_) { |
| 975 pair.second->Send(new FrameMsg_EnforceInsecureRequestPolicy( | 975 pair.second->Send(new FrameMsg_EnforceInsecureRequestPolicy( |
| 976 pair.second->GetRoutingID(), policy)); | 976 pair.second->GetRoutingID(), policy)); |
| 977 } | 977 } |
| 978 } | 978 } |
| 979 | 979 |
| 980 void RenderFrameHostManager::OnDidUpdateFrameOwnerProperties( | 980 void RenderFrameHostManager::OnDidUpdateFrameOwnerProperties( |
| 981 const blink::WebFrameOwnerProperties& properties) { | 981 const FrameOwnerProperties& properties) { |
| 982 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) | 982 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) |
| 983 return; | 983 return; |
| 984 | 984 |
| 985 // WebFrameOwnerProperties exist only for frames that have a parent. | 985 // FrameOwnerProperties exist only for frames that have a parent. |
| 986 CHECK(frame_tree_node_->parent()); | 986 CHECK(frame_tree_node_->parent()); |
| 987 SiteInstance* parent_instance = | 987 SiteInstance* parent_instance = |
| 988 frame_tree_node_->parent()->current_frame_host()->GetSiteInstance(); | 988 frame_tree_node_->parent()->current_frame_host()->GetSiteInstance(); |
| 989 | 989 |
| 990 // Notify the RenderFrame if it lives in a different process from its parent. | 990 // Notify the RenderFrame if it lives in a different process from its parent. |
| 991 if (render_frame_host_->GetSiteInstance() != parent_instance) { | 991 if (render_frame_host_->GetSiteInstance() != parent_instance) { |
| 992 render_frame_host_->Send(new FrameMsg_SetFrameOwnerProperties( | 992 render_frame_host_->Send(new FrameMsg_SetFrameOwnerProperties( |
| 993 render_frame_host_->GetRoutingID(), FrameOwnerProperties(properties))); | 993 render_frame_host_->GetRoutingID(), properties)); |
| 994 } | 994 } |
| 995 | 995 |
| 996 // Notify this frame's proxies if they live in a different process from its | 996 // Notify this frame's proxies if they live in a different process from its |
| 997 // parent. This is only currently needed for the allowFullscreen property, | 997 // parent. This is only currently needed for the allowFullscreen property, |
| 998 // since that can be queried on RemoteFrame ancestors. | 998 // since that can be queried on RemoteFrame ancestors. |
| 999 // | 999 // |
| 1000 // TODO(alexmos): It would be sufficient to only send this update to proxies | 1000 // TODO(alexmos): It would be sufficient to only send this update to proxies |
| 1001 // in the current FrameTree. | 1001 // in the current FrameTree. |
| 1002 for (const auto& pair : proxy_hosts_) { | 1002 for (const auto& pair : proxy_hosts_) { |
| 1003 if (pair.second->GetSiteInstance() != parent_instance) { | 1003 if (pair.second->GetSiteInstance() != parent_instance) { |
| 1004 pair.second->Send(new FrameMsg_SetFrameOwnerProperties( | 1004 pair.second->Send(new FrameMsg_SetFrameOwnerProperties( |
| 1005 pair.second->GetRoutingID(), FrameOwnerProperties(properties))); | 1005 pair.second->GetRoutingID(), properties)); |
| 1006 } | 1006 } |
| 1007 } | 1007 } |
| 1008 } | 1008 } |
| 1009 | 1009 |
| 1010 void RenderFrameHostManager::OnDidUpdateOrigin( | 1010 void RenderFrameHostManager::OnDidUpdateOrigin( |
| 1011 const url::Origin& origin, | 1011 const url::Origin& origin, |
| 1012 bool is_potentially_trustworthy_unique_origin) { | 1012 bool is_potentially_trustworthy_unique_origin) { |
| 1013 for (const auto& pair : proxy_hosts_) { | 1013 for (const auto& pair : proxy_hosts_) { |
| 1014 pair.second->Send( | 1014 pair.second->Send( |
| 1015 new FrameMsg_DidUpdateOrigin(pair.second->GetRoutingID(), origin, | 1015 new FrameMsg_DidUpdateOrigin(pair.second->GetRoutingID(), origin, |
| (...skipping 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2604 resolved_url)) { | 2604 resolved_url)) { |
| 2605 DCHECK(!dest_instance || | 2605 DCHECK(!dest_instance || |
| 2606 dest_instance == render_frame_host_->GetSiteInstance()); | 2606 dest_instance == render_frame_host_->GetSiteInstance()); |
| 2607 return false; | 2607 return false; |
| 2608 } | 2608 } |
| 2609 | 2609 |
| 2610 return true; | 2610 return true; |
| 2611 } | 2611 } |
| 2612 | 2612 |
| 2613 } // namespace content | 2613 } // namespace content |
| OLD | NEW |