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

Side by Side Diff: content/browser/frame_host/render_frame_host_manager.cc

Issue 1635873003: Replicating WebFrame::uniqueName across renderers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dump-render-tree3
Patch Set: Fixing fallout from the new assert in FrameTree.cpp. Created 4 years, 10 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 unified diff | Download patch
OLDNEW
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 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 new FrameMsg_DidStartLoading(pair.second->GetRoutingID())); 930 new FrameMsg_DidStartLoading(pair.second->GetRoutingID()));
931 } 931 }
932 } 932 }
933 933
934 void RenderFrameHostManager::OnDidStopLoading() { 934 void RenderFrameHostManager::OnDidStopLoading() {
935 for (const auto& pair : proxy_hosts_) { 935 for (const auto& pair : proxy_hosts_) {
936 pair.second->Send(new FrameMsg_DidStopLoading(pair.second->GetRoutingID())); 936 pair.second->Send(new FrameMsg_DidStopLoading(pair.second->GetRoutingID()));
937 } 937 }
938 } 938 }
939 939
940 void RenderFrameHostManager::OnDidUpdateName(const std::string& name) { 940 void RenderFrameHostManager::OnDidUpdateName(const std::string& name,
941 const std::string& unique_name) {
941 // The window.name message may be sent outside of --site-per-process when 942 // The window.name message may be sent outside of --site-per-process when
942 // report_frame_name_changes renderer preference is set (used by 943 // report_frame_name_changes renderer preference is set (used by
943 // WebView). Don't send the update to proxies in those cases. 944 // WebView). Don't send the update to proxies in those cases.
944 // TODO(nick,nasko): Should this be IsSwappedOutStateForbidden, to match 945 // TODO(nick,nasko): Should this be IsSwappedOutStateForbidden, to match
945 // OnDidUpdateOrigin? 946 // OnDidUpdateOrigin?
946 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) 947 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible())
947 return; 948 return;
948 949
949 for (const auto& pair : proxy_hosts_) { 950 for (const auto& pair : proxy_hosts_) {
950 pair.second->Send( 951 pair.second->Send(new FrameMsg_DidUpdateName(pair.second->GetRoutingID(),
951 new FrameMsg_DidUpdateName(pair.second->GetRoutingID(), name)); 952 name, unique_name));
952 } 953 }
953 } 954 }
954 955
955 void RenderFrameHostManager::OnEnforceStrictMixedContentChecking( 956 void RenderFrameHostManager::OnEnforceStrictMixedContentChecking(
956 bool should_enforce) { 957 bool should_enforce) {
957 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) 958 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible())
958 return; 959 return;
959 960
960 for (const auto& pair : proxy_hosts_) { 961 for (const auto& pair : proxy_hosts_) {
961 pair.second->Send(new FrameMsg_EnforceStrictMixedContentChecking( 962 pair.second->Send(new FrameMsg_EnforceStrictMixedContentChecking(
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
1791 // Swap the outer WebContents's frame with the proxy to inner WebContents. 1792 // Swap the outer WebContents's frame with the proxy to inner WebContents.
1792 // 1793 //
1793 // We are in the outer WebContents, and its FrameTree would never see 1794 // We are in the outer WebContents, and its FrameTree would never see
1794 // a load start for any of its inner WebContents. Eventually, that also makes 1795 // a load start for any of its inner WebContents. Eventually, that also makes
1795 // the FrameTree never see the matching load stop. Therefore, we always pass 1796 // the FrameTree never see the matching load stop. Therefore, we always pass
1796 // false to |is_loading| below. 1797 // false to |is_loading| below.
1797 // TODO(lazyboy): This |is_loading| behavior might not be what we want, 1798 // TODO(lazyboy): This |is_loading| behavior might not be what we want,
1798 // investigate and fix. 1799 // investigate and fix.
1799 render_frame_host->Send(new FrameMsg_SwapOut( 1800 render_frame_host->Send(new FrameMsg_SwapOut(
1800 render_frame_host->GetRoutingID(), proxy->GetRoutingID(), 1801 render_frame_host->GetRoutingID(), proxy->GetRoutingID(),
1801 false /* is_loading */, FrameReplicationState())); 1802 false /* is_loading */,
1803 render_frame_host->frame_tree_node()->current_replication_state()));
Charlie Reis 2016/02/11 22:02:14 Yes, this looks reasonable to me. I can't think o
Łukasz Anforowicz 2016/02/11 23:23:56 Acknowledged.
1802 proxy->set_render_frame_proxy_created(true); 1804 proxy->set_render_frame_proxy_created(true);
1803 } 1805 }
1804 1806
1805 void RenderFrameHostManager::SetRWHViewForInnerContents( 1807 void RenderFrameHostManager::SetRWHViewForInnerContents(
1806 RenderWidgetHostView* child_rwhv) { 1808 RenderWidgetHostView* child_rwhv) {
1807 DCHECK(ForInnerDelegate() && frame_tree_node_->IsMainFrame()); 1809 DCHECK(ForInnerDelegate() && frame_tree_node_->IsMainFrame());
1808 GetProxyToOuterDelegate()->SetChildRWHView(child_rwhv); 1810 GetProxyToOuterDelegate()->SetChildRWHView(child_rwhv);
1809 } 1811 }
1810 1812
1811 bool RenderFrameHostManager::InitRenderView( 1813 bool RenderFrameHostManager::InitRenderView(
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
2480 int RenderFrameHostManager::GetOpenerRoutingID(SiteInstance* instance) { 2482 int RenderFrameHostManager::GetOpenerRoutingID(SiteInstance* instance) {
2481 if (!frame_tree_node_->opener()) 2483 if (!frame_tree_node_->opener())
2482 return MSG_ROUTING_NONE; 2484 return MSG_ROUTING_NONE;
2483 2485
2484 return frame_tree_node_->opener() 2486 return frame_tree_node_->opener()
2485 ->render_manager() 2487 ->render_manager()
2486 ->GetRoutingIdForSiteInstance(instance); 2488 ->GetRoutingIdForSiteInstance(instance);
2487 } 2489 }
2488 2490
2489 } // namespace content 2491 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698