Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(586)

Unified Diff: content/browser/frame_host/render_frame_host_manager.cc

Issue 1938753002: OOPIF: Replicate allowFullscreen flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Only send non-default FrameOwnerProperties to new proxies Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_frame_host_manager.cc
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index 2b8794e052f62f6ae570f704ad6d84722e3bf149..dfa3882cf858cb8f2e655980fcb19056fb4f297e 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -946,6 +946,35 @@ void RenderFrameHostManager::OnEnforceStrictMixedContentChecking(
}
}
+void RenderFrameHostManager::OnDidUpdateFrameOwnerProperties(
+ const blink::WebFrameOwnerProperties& properties) {
+ if (!SiteIsolationPolicy::AreCrossProcessFramesPossible())
+ return;
+
+ // WebFrameOwnerProperties exist only for frames that have a parent.
+ CHECK(frame_tree_node_->parent());
+ SiteInstance* parent_instance =
+ frame_tree_node_->parent()->current_frame_host()->GetSiteInstance();
+
+ // Notify the RenderFrame if it lives in a different process from its parent.
+ if (render_frame_host_->GetSiteInstance() != parent_instance) {
+ render_frame_host_->Send(new FrameMsg_SetFrameOwnerProperties(
+ render_frame_host_->GetRoutingID(), properties));
+ }
+
+ // Notify this frame's proxies if they live in a different process from its
+ // 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.
+ //
+ // TODO(alexmos): It would be sufficient to only send this update to proxies
+ // in the current FrameTree.
+ for (const auto& pair : proxy_hosts_) {
+ if (pair.second->GetSiteInstance() != parent_instance) {
+ pair.second->Send(new FrameMsg_SetFrameOwnerProperties(
+ pair.second->GetRoutingID(), properties));
+ }
+ }
+}
+
void RenderFrameHostManager::OnDidUpdateOrigin(
const url::Origin& origin,
bool is_potentially_trustworthy_unique_origin) {

Powered by Google App Engine
This is Rietveld 408576698