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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
669 OnVisualStateResponse) | 669 OnVisualStateResponse) |
670 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage, | 670 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage, |
671 OnRunJavaScriptMessage) | 671 OnRunJavaScriptMessage) |
672 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm, | 672 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm, |
673 OnRunBeforeUnloadConfirm) | 673 OnRunBeforeUnloadConfirm) |
674 IPC_MESSAGE_HANDLER(FrameHostMsg_RunFileChooser, OnRunFileChooser) | 674 IPC_MESSAGE_HANDLER(FrameHostMsg_RunFileChooser, OnRunFileChooser) |
675 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument, | 675 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument, |
676 OnDidAccessInitialDocument) | 676 OnDidAccessInitialDocument) |
677 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener) | 677 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener) |
678 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName) | 678 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName) |
| 679 IPC_MESSAGE_HANDLER(FrameHostMsg_DidSetFeaturePolicyHeader, |
| 680 OnDidSetFeaturePolicyHeader) |
679 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAddContentSecurityPolicy, | 681 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAddContentSecurityPolicy, |
680 OnDidAddContentSecurityPolicy) | 682 OnDidAddContentSecurityPolicy) |
681 IPC_MESSAGE_HANDLER(FrameHostMsg_EnforceInsecureRequestPolicy, | 683 IPC_MESSAGE_HANDLER(FrameHostMsg_EnforceInsecureRequestPolicy, |
682 OnEnforceInsecureRequestPolicy) | 684 OnEnforceInsecureRequestPolicy) |
683 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateToUniqueOrigin, | 685 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateToUniqueOrigin, |
684 OnUpdateToUniqueOrigin) | 686 OnUpdateToUniqueOrigin) |
685 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, | 687 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, |
686 OnDidChangeSandboxFlags) | 688 OnDidChangeSandboxFlags) |
687 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, | 689 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, |
688 OnDidChangeFrameOwnerProperties) | 690 OnDidChangeFrameOwnerProperties) |
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1721 DCHECK(!unique_name.empty()); | 1723 DCHECK(!unique_name.empty()); |
1722 } | 1724 } |
1723 | 1725 |
1724 std::string old_name = frame_tree_node()->frame_name(); | 1726 std::string old_name = frame_tree_node()->frame_name(); |
1725 frame_tree_node()->SetFrameName(name, unique_name); | 1727 frame_tree_node()->SetFrameName(name, unique_name); |
1726 if (old_name.empty() && !name.empty()) | 1728 if (old_name.empty() && !name.empty()) |
1727 frame_tree_node_->render_manager()->CreateProxiesForNewNamedFrame(); | 1729 frame_tree_node_->render_manager()->CreateProxiesForNewNamedFrame(); |
1728 delegate_->DidChangeName(this, name); | 1730 delegate_->DidChangeName(this, name); |
1729 } | 1731 } |
1730 | 1732 |
| 1733 void RenderFrameHostImpl::OnDidSetFeaturePolicyHeader( |
| 1734 const std::string& header) { |
| 1735 frame_tree_node()->SetFeaturePolicyHeader(header); |
| 1736 } |
| 1737 |
1731 void RenderFrameHostImpl::OnDidAddContentSecurityPolicy( | 1738 void RenderFrameHostImpl::OnDidAddContentSecurityPolicy( |
1732 const ContentSecurityPolicyHeader& header) { | 1739 const ContentSecurityPolicyHeader& header) { |
1733 frame_tree_node()->AddContentSecurityPolicy(header); | 1740 frame_tree_node()->AddContentSecurityPolicy(header); |
1734 } | 1741 } |
1735 | 1742 |
1736 void RenderFrameHostImpl::OnEnforceInsecureRequestPolicy( | 1743 void RenderFrameHostImpl::OnEnforceInsecureRequestPolicy( |
1737 blink::WebInsecureRequestPolicy policy) { | 1744 blink::WebInsecureRequestPolicy policy) { |
1738 frame_tree_node()->SetInsecureRequestPolicy(policy); | 1745 frame_tree_node()->SetInsecureRequestPolicy(policy); |
1739 } | 1746 } |
1740 | 1747 |
(...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3204 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3211 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
3205 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3212 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
3206 return web_bluetooth_service_.get(); | 3213 return web_bluetooth_service_.get(); |
3207 } | 3214 } |
3208 | 3215 |
3209 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3216 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
3210 web_bluetooth_service_.reset(); | 3217 web_bluetooth_service_.reset(); |
3211 } | 3218 } |
3212 | 3219 |
3213 } // namespace content | 3220 } // namespace content |
OLD | NEW |