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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
187 Send(new FrameMsg_NewFrameProxy(routing_id_, | 187 Send(new FrameMsg_NewFrameProxy(routing_id_, |
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 | |
198 // For subframes, initialize the proxy's WebFrameOwnerProperties only if they | |
199 // differ from default values. | |
200 bool should_send_properties = frame_tree_node_->frame_owner_properties() != | |
201 blink::WebFrameOwnerProperties(); | |
202 if (frame_tree_node_->parent() && should_send_properties) { | |
alexmos
2016/05/11 00:15:09
Just a note that after discussing this with Charli
Charlie Reis
2016/05/13 21:18:42
Acknowledged.
| |
203 Send(new FrameMsg_SetFrameOwnerProperties( | |
204 routing_id_, frame_tree_node_->frame_owner_properties())); | |
205 } | |
206 | |
197 return true; | 207 return true; |
198 } | 208 } |
199 | 209 |
200 void RenderFrameProxyHost::UpdateOpener() { | 210 void RenderFrameProxyHost::UpdateOpener() { |
201 // 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 |
202 // first reaching this proxy and then referencing its window.opener. Ensure | 212 // first reaching this proxy and then referencing its window.opener. Ensure |
203 // the new opener's proxy exists in this case. | 213 // the new opener's proxy exists in this case. |
204 if (frame_tree_node_->opener()) { | 214 if (frame_tree_node_->opener()) { |
205 frame_tree_node_->opener()->render_manager()->CreateOpenerProxies( | 215 frame_tree_node_->opener()->render_manager()->CreateOpenerProxies( |
206 GetSiteInstance(), frame_tree_node_); | 216 GetSiteInstance(), frame_tree_node_); |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
358 target_rfh->Send(new FrameMsg_AdvanceFocus(target_rfh->GetRoutingID(), type, | 368 target_rfh->Send(new FrameMsg_AdvanceFocus(target_rfh->GetRoutingID(), type, |
359 source_proxy_routing_id)); | 369 source_proxy_routing_id)); |
360 } | 370 } |
361 | 371 |
362 void RenderFrameProxyHost::OnFrameFocused() { | 372 void RenderFrameProxyHost::OnFrameFocused() { |
363 frame_tree_node_->frame_tree()->SetFocusedFrame(frame_tree_node_, | 373 frame_tree_node_->frame_tree()->SetFocusedFrame(frame_tree_node_, |
364 GetSiteInstance()); | 374 GetSiteInstance()); |
365 } | 375 } |
366 | 376 |
367 } // namespace content | 377 } // namespace content |
OLD | NEW |