| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 } | 179 } |
| 180 | 180 |
| 181 int opener_routing_id = MSG_ROUTING_NONE; | 181 int opener_routing_id = MSG_ROUTING_NONE; |
| 182 if (frame_tree_node_->opener()) { | 182 if (frame_tree_node_->opener()) { |
| 183 opener_routing_id = frame_tree_node_->render_manager()->GetOpenerRoutingID( | 183 opener_routing_id = frame_tree_node_->render_manager()->GetOpenerRoutingID( |
| 184 site_instance_.get()); | 184 site_instance_.get()); |
| 185 } | 185 } |
| 186 | 186 |
| 187 int view_routing_id = frame_tree_node_->frame_tree() | 187 int view_routing_id = frame_tree_node_->frame_tree() |
| 188 ->GetRenderViewHost(site_instance_.get())->GetRoutingID(); | 188 ->GetRenderViewHost(site_instance_.get())->GetRoutingID(); |
| 189 RenderProcessHostImpl::GetRendererInterface(GetProcess())->CreateFrameProxy( | 189 GetProcess()->GetRendererInterface()->CreateFrameProxy( |
| 190 routing_id_, view_routing_id, opener_routing_id, parent_routing_id, | 190 routing_id_, view_routing_id, opener_routing_id, parent_routing_id, |
| 191 frame_tree_node_->current_replication_state()); | 191 frame_tree_node_->current_replication_state()); |
| 192 | 192 |
| 193 render_frame_proxy_created_ = true; | 193 render_frame_proxy_created_ = true; |
| 194 | 194 |
| 195 // For subframes, initialize the proxy's FrameOwnerProperties only if they | 195 // For subframes, initialize the proxy's FrameOwnerProperties only if they |
| 196 // differ from default values. | 196 // differ from default values. |
| 197 bool should_send_properties = | 197 bool should_send_properties = |
| 198 frame_tree_node_->frame_owner_properties() != FrameOwnerProperties(); | 198 frame_tree_node_->frame_owner_properties() != FrameOwnerProperties(); |
| 199 if (frame_tree_node_->parent() && should_send_properties) { | 199 if (frame_tree_node_->parent() && should_send_properties) { |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 target_rfh->Send(new FrameMsg_AdvanceFocus(target_rfh->GetRoutingID(), type, | 366 target_rfh->Send(new FrameMsg_AdvanceFocus(target_rfh->GetRoutingID(), type, |
| 367 source_proxy_routing_id)); | 367 source_proxy_routing_id)); |
| 368 } | 368 } |
| 369 | 369 |
| 370 void RenderFrameProxyHost::OnFrameFocused() { | 370 void RenderFrameProxyHost::OnFrameFocused() { |
| 371 frame_tree_node_->current_frame_host()->delegate()->SetFocusedFrame( | 371 frame_tree_node_->current_frame_host()->delegate()->SetFocusedFrame( |
| 372 frame_tree_node_, GetSiteInstance()); | 372 frame_tree_node_, GetSiteInstance()); |
| 373 } | 373 } |
| 374 | 374 |
| 375 } // namespace content | 375 } // namespace content |
| OLD | NEW |