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 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1560 // navigates and the new sandbox flags take effect. | 1560 // navigates and the new sandbox flags take effect. |
1561 RenderFrameHost* child_rfh = child->current_frame_host(); | 1561 RenderFrameHost* child_rfh = child->current_frame_host(); |
1562 if (child_rfh->GetSiteInstance() != GetSiteInstance()) { | 1562 if (child_rfh->GetSiteInstance() != GetSiteInstance()) { |
1563 child_rfh->Send( | 1563 child_rfh->Send( |
1564 new FrameMsg_DidUpdateSandboxFlags(child_rfh->GetRoutingID(), flags)); | 1564 new FrameMsg_DidUpdateSandboxFlags(child_rfh->GetRoutingID(), flags)); |
1565 } | 1565 } |
1566 } | 1566 } |
1567 | 1567 |
1568 void RenderFrameHostImpl::OnDidChangeFrameOwnerProperties( | 1568 void RenderFrameHostImpl::OnDidChangeFrameOwnerProperties( |
1569 int32_t frame_routing_id, | 1569 int32_t frame_routing_id, |
1570 const blink::WebFrameOwnerProperties& frame_owner_properties) { | 1570 const blink::WebFrameOwnerProperties& properties) { |
1571 FrameTreeNode* child = FindAndVerifyChild( | 1571 FrameTreeNode* child = FindAndVerifyChild( |
1572 frame_routing_id, bad_message::RFH_OWNER_PROPERTY); | 1572 frame_routing_id, bad_message::RFH_OWNER_PROPERTY); |
1573 if (!child) | 1573 if (!child) |
1574 return; | 1574 return; |
1575 | 1575 |
1576 child->set_frame_owner_properties(frame_owner_properties); | 1576 child->set_frame_owner_properties(properties); |
1577 | 1577 |
1578 // Notify the RenderFrame if it lives in a different process from its parent. | 1578 child->render_manager()->OnDidUpdateFrameOwnerProperties(properties); |
1579 // These properties only affect the RenderFrame and live in its parent | |
1580 // (HTMLFrameOwnerElement). Therefore, we do not need to notify this frame's | |
1581 // proxies. | |
alexmos
2016/05/02 17:44:06
This isn't true for allowFullscreen, so I modified
| |
1582 RenderFrameHost* child_rfh = child->current_frame_host(); | |
1583 if (child_rfh->GetSiteInstance() != GetSiteInstance()) { | |
1584 child_rfh->Send(new FrameMsg_SetFrameOwnerProperties( | |
1585 child_rfh->GetRoutingID(), frame_owner_properties)); | |
1586 } | |
1587 } | 1579 } |
1588 | 1580 |
1589 void RenderFrameHostImpl::OnUpdateTitle( | 1581 void RenderFrameHostImpl::OnUpdateTitle( |
1590 const base::string16& title, | 1582 const base::string16& title, |
1591 blink::WebTextDirection title_direction) { | 1583 blink::WebTextDirection title_direction) { |
1592 // This message should only be sent for top-level frames. | 1584 // This message should only be sent for top-level frames. |
1593 if (frame_tree_node_->parent()) | 1585 if (frame_tree_node_->parent()) |
1594 return; | 1586 return; |
1595 | 1587 |
1596 if (title.length() > kMaxTitleChars) { | 1588 if (title.length() > kMaxTitleChars) { |
(...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2766 // handler after it's destroyed so it can't run after the RFHI is destroyed. | 2758 // handler after it's destroyed so it can't run after the RFHI is destroyed. |
2767 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 2759 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
2768 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 2760 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
2769 } | 2761 } |
2770 | 2762 |
2771 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 2763 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
2772 web_bluetooth_service_.reset(); | 2764 web_bluetooth_service_.reset(); |
2773 } | 2765 } |
2774 | 2766 |
2775 } // namespace content | 2767 } // namespace content |
OLD | NEW |