| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "content/browser/bad_message.h" | 10 #include "content/browser/bad_message.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 frame_tree_node_->frame_tree() | 188 frame_tree_node_->frame_tree() |
| 189 ->GetRenderViewHost(site_instance_.get()) | 189 ->GetRenderViewHost(site_instance_.get()) |
| 190 ->GetRoutingID(), | 190 ->GetRoutingID(), |
| 191 opener_routing_id, | 191 opener_routing_id, |
| 192 parent_routing_id, | 192 parent_routing_id, |
| 193 frame_tree_node_ | 193 frame_tree_node_ |
| 194 ->current_replication_state())); | 194 ->current_replication_state())); |
| 195 | 195 |
| 196 render_frame_proxy_created_ = true; | 196 render_frame_proxy_created_ = true; |
| 197 | 197 |
| 198 // For subframes, initialize the proxy's WebFrameOwnerProperties only if they | 198 // For subframes, initialize the proxy's FrameOwnerProperties only if they |
| 199 // differ from default values. | 199 // differ from default values. |
| 200 bool should_send_properties = frame_tree_node_->frame_owner_properties() != | 200 bool should_send_properties = |
| 201 blink::WebFrameOwnerProperties(); | 201 frame_tree_node_->frame_owner_properties() != FrameOwnerProperties(); |
| 202 if (frame_tree_node_->parent() && should_send_properties) { | 202 if (frame_tree_node_->parent() && should_send_properties) { |
| 203 Send(new FrameMsg_SetFrameOwnerProperties( | 203 Send(new FrameMsg_SetFrameOwnerProperties( |
| 204 routing_id_, | 204 routing_id_, frame_tree_node_->frame_owner_properties())); |
| 205 FrameOwnerProperties(frame_tree_node_->frame_owner_properties()))); | |
| 206 } | 205 } |
| 207 | 206 |
| 208 return true; | 207 return true; |
| 209 } | 208 } |
| 210 | 209 |
| 211 void RenderFrameProxyHost::UpdateOpener() { | 210 void RenderFrameProxyHost::UpdateOpener() { |
| 212 // Another frame in this proxy's SiteInstance may reach the new opener by | 211 // Another frame in this proxy's SiteInstance may reach the new opener by |
| 213 // first reaching this proxy and then referencing its window.opener. Ensure | 212 // first reaching this proxy and then referencing its window.opener. Ensure |
| 214 // the new opener's proxy exists in this case. | 213 // the new opener's proxy exists in this case. |
| 215 if (frame_tree_node_->opener()) { | 214 if (frame_tree_node_->opener()) { |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 target_rfh->Send(new FrameMsg_AdvanceFocus(target_rfh->GetRoutingID(), type, | 369 target_rfh->Send(new FrameMsg_AdvanceFocus(target_rfh->GetRoutingID(), type, |
| 371 source_proxy_routing_id)); | 370 source_proxy_routing_id)); |
| 372 } | 371 } |
| 373 | 372 |
| 374 void RenderFrameProxyHost::OnFrameFocused() { | 373 void RenderFrameProxyHost::OnFrameFocused() { |
| 375 frame_tree_node_->frame_tree()->SetFocusedFrame(frame_tree_node_, | 374 frame_tree_node_->frame_tree()->SetFocusedFrame(frame_tree_node_, |
| 376 GetSiteInstance()); | 375 GetSiteInstance()); |
| 377 } | 376 } |
| 378 | 377 |
| 379 } // namespace content | 378 } // namespace content |
| OLD | NEW |