OLD | NEW |
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_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1604 // navigates and the new sandbox flags take effect. | 1604 // navigates and the new sandbox flags take effect. |
1605 RenderFrameHost* child_rfh = child->current_frame_host(); | 1605 RenderFrameHost* child_rfh = child->current_frame_host(); |
1606 if (child_rfh->GetSiteInstance() != GetSiteInstance()) { | 1606 if (child_rfh->GetSiteInstance() != GetSiteInstance()) { |
1607 child_rfh->Send( | 1607 child_rfh->Send( |
1608 new FrameMsg_DidUpdateSandboxFlags(child_rfh->GetRoutingID(), flags)); | 1608 new FrameMsg_DidUpdateSandboxFlags(child_rfh->GetRoutingID(), flags)); |
1609 } | 1609 } |
1610 } | 1610 } |
1611 | 1611 |
1612 void RenderFrameHostImpl::OnDidChangeFrameOwnerProperties( | 1612 void RenderFrameHostImpl::OnDidChangeFrameOwnerProperties( |
1613 int32_t frame_routing_id, | 1613 int32_t frame_routing_id, |
1614 const blink::WebFrameOwnerProperties& frame_owner_properties) { | 1614 const blink::WebFrameOwnerProperties& properties) { |
1615 FrameTreeNode* child = FindAndVerifyChild( | 1615 FrameTreeNode* child = FindAndVerifyChild( |
1616 frame_routing_id, bad_message::RFH_OWNER_PROPERTY); | 1616 frame_routing_id, bad_message::RFH_OWNER_PROPERTY); |
1617 if (!child) | 1617 if (!child) |
1618 return; | 1618 return; |
1619 | 1619 |
1620 child->set_frame_owner_properties(frame_owner_properties); | 1620 child->set_frame_owner_properties(properties); |
1621 | 1621 |
1622 // Notify the RenderFrame if it lives in a different process from its parent. | 1622 child->render_manager()->OnDidUpdateFrameOwnerProperties(properties); |
1623 // These properties only affect the RenderFrame and live in its parent | |
1624 // (HTMLFrameOwnerElement). Therefore, we do not need to notify this frame's | |
1625 // proxies. | |
1626 RenderFrameHost* child_rfh = child->current_frame_host(); | |
1627 if (child_rfh->GetSiteInstance() != GetSiteInstance()) { | |
1628 child_rfh->Send(new FrameMsg_SetFrameOwnerProperties( | |
1629 child_rfh->GetRoutingID(), frame_owner_properties)); | |
1630 } | |
1631 } | 1623 } |
1632 | 1624 |
1633 void RenderFrameHostImpl::OnUpdateTitle( | 1625 void RenderFrameHostImpl::OnUpdateTitle( |
1634 const base::string16& title, | 1626 const base::string16& title, |
1635 blink::WebTextDirection title_direction) { | 1627 blink::WebTextDirection title_direction) { |
1636 // This message should only be sent for top-level frames. | 1628 // This message should only be sent for top-level frames. |
1637 if (frame_tree_node_->parent()) | 1629 if (frame_tree_node_->parent()) |
1638 return; | 1630 return; |
1639 | 1631 |
1640 if (title.length() > kMaxTitleChars) { | 1632 if (title.length() > kMaxTitleChars) { |
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2849 // handler after it's destroyed so it can't run after the RFHI is destroyed. | 2841 // handler after it's destroyed so it can't run after the RFHI is destroyed. |
2850 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 2842 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
2851 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 2843 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
2852 } | 2844 } |
2853 | 2845 |
2854 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 2846 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
2855 web_bluetooth_service_.reset(); | 2847 web_bluetooth_service_.reset(); |
2856 } | 2848 } |
2857 | 2849 |
2858 } // namespace content | 2850 } // namespace content |
OLD | NEW |