OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_proxy_host.h" | 5 #include "content/browser/frame_host/render_frame_proxy_host.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "content/browser/bad_message.h" | 8 #include "content/browser/bad_message.h" |
9 #include "content/browser/frame_host/cross_process_frame_connector.h" | 9 #include "content/browser/frame_host/cross_process_frame_connector.h" |
10 #include "content/browser/frame_host/frame_tree.h" | 10 #include "content/browser/frame_host/frame_tree.h" |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 render_frame_proxy_created_ = true; | 196 render_frame_proxy_created_ = true; |
197 return true; | 197 return true; |
198 } | 198 } |
199 | 199 |
200 void RenderFrameProxyHost::UpdateOpener() { | 200 void RenderFrameProxyHost::UpdateOpener() { |
201 // Another frame in this proxy's SiteInstance may reach the new opener by | 201 // Another frame in this proxy's SiteInstance may reach the new opener by |
202 // first reaching this proxy and then referencing its window.opener. Ensure | 202 // first reaching this proxy and then referencing its window.opener. Ensure |
203 // the new opener's proxy exists in this case. | 203 // the new opener's proxy exists in this case. |
204 if (frame_tree_node_->opener()) { | 204 if (frame_tree_node_->opener()) { |
205 frame_tree_node_->opener()->render_manager()->CreateOpenerProxies( | 205 frame_tree_node_->opener()->render_manager()->CreateOpenerProxies( |
206 GetSiteInstance()); | 206 GetSiteInstance(), frame_tree_node_); |
207 } | 207 } |
208 | 208 |
209 int opener_routing_id = | 209 int opener_routing_id = |
210 frame_tree_node_->render_manager()->GetOpenerRoutingID(GetSiteInstance()); | 210 frame_tree_node_->render_manager()->GetOpenerRoutingID(GetSiteInstance()); |
211 Send(new FrameMsg_UpdateOpener(GetRoutingID(), opener_routing_id)); | 211 Send(new FrameMsg_UpdateOpener(GetRoutingID(), opener_routing_id)); |
212 } | 212 } |
213 | 213 |
214 void RenderFrameProxyHost::OnDetach() { | 214 void RenderFrameProxyHost::OnDetach() { |
215 if (frame_tree_node_->render_manager()->ForInnerDelegate()) { | 215 if (frame_tree_node_->render_manager()->ForInnerDelegate()) { |
216 // Only main frame proxy can detach for inner WebContents. | 216 // Only main frame proxy can detach for inner WebContents. |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 new FrameMsg_PostMessageEvent(target_rfh->GetRoutingID(), new_params)); | 308 new FrameMsg_PostMessageEvent(target_rfh->GetRoutingID(), new_params)); |
309 } | 309 } |
310 } | 310 } |
311 | 311 |
312 void RenderFrameProxyHost::OnDidChangeOpener(int32 opener_routing_id) { | 312 void RenderFrameProxyHost::OnDidChangeOpener(int32 opener_routing_id) { |
313 frame_tree_node_->render_manager()->DidChangeOpener(opener_routing_id, | 313 frame_tree_node_->render_manager()->DidChangeOpener(opener_routing_id, |
314 GetSiteInstance()); | 314 GetSiteInstance()); |
315 } | 315 } |
316 | 316 |
317 } // namespace content | 317 } // namespace content |
OLD | NEW |