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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 OnVisualStateResponse) | 666 OnVisualStateResponse) |
667 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage, | 667 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage, |
668 OnRunJavaScriptMessage) | 668 OnRunJavaScriptMessage) |
669 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm, | 669 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm, |
670 OnRunBeforeUnloadConfirm) | 670 OnRunBeforeUnloadConfirm) |
671 IPC_MESSAGE_HANDLER(FrameHostMsg_RunFileChooser, OnRunFileChooser) | 671 IPC_MESSAGE_HANDLER(FrameHostMsg_RunFileChooser, OnRunFileChooser) |
672 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument, | 672 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument, |
673 OnDidAccessInitialDocument) | 673 OnDidAccessInitialDocument) |
674 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener) | 674 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener) |
675 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName) | 675 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName) |
| 676 IPC_MESSAGE_HANDLER(FrameHostMsg_DidSetFeaturePolicyHeader, |
| 677 OnDidSetFeaturePolicyHeader) |
676 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAddContentSecurityPolicy, | 678 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAddContentSecurityPolicy, |
677 OnDidAddContentSecurityPolicy) | 679 OnDidAddContentSecurityPolicy) |
678 IPC_MESSAGE_HANDLER(FrameHostMsg_EnforceInsecureRequestPolicy, | 680 IPC_MESSAGE_HANDLER(FrameHostMsg_EnforceInsecureRequestPolicy, |
679 OnEnforceInsecureRequestPolicy) | 681 OnEnforceInsecureRequestPolicy) |
680 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateToUniqueOrigin, | 682 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateToUniqueOrigin, |
681 OnUpdateToUniqueOrigin) | 683 OnUpdateToUniqueOrigin) |
682 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, | 684 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, |
683 OnDidChangeSandboxFlags) | 685 OnDidChangeSandboxFlags) |
684 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, | 686 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, |
685 OnDidChangeFrameOwnerProperties) | 687 OnDidChangeFrameOwnerProperties) |
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1704 DCHECK(!unique_name.empty()); | 1706 DCHECK(!unique_name.empty()); |
1705 } | 1707 } |
1706 | 1708 |
1707 std::string old_name = frame_tree_node()->frame_name(); | 1709 std::string old_name = frame_tree_node()->frame_name(); |
1708 frame_tree_node()->SetFrameName(name, unique_name); | 1710 frame_tree_node()->SetFrameName(name, unique_name); |
1709 if (old_name.empty() && !name.empty()) | 1711 if (old_name.empty() && !name.empty()) |
1710 frame_tree_node_->render_manager()->CreateProxiesForNewNamedFrame(); | 1712 frame_tree_node_->render_manager()->CreateProxiesForNewNamedFrame(); |
1711 delegate_->DidChangeName(this, name); | 1713 delegate_->DidChangeName(this, name); |
1712 } | 1714 } |
1713 | 1715 |
| 1716 void RenderFrameHostImpl::OnDidSetFeaturePolicyHeader( |
| 1717 const std::string& header) { |
| 1718 frame_tree_node()->SetFeaturePolicyHeader(header); |
| 1719 } |
| 1720 |
1714 void RenderFrameHostImpl::OnDidAddContentSecurityPolicy( | 1721 void RenderFrameHostImpl::OnDidAddContentSecurityPolicy( |
1715 const ContentSecurityPolicyHeader& header) { | 1722 const ContentSecurityPolicyHeader& header) { |
1716 frame_tree_node()->AddContentSecurityPolicy(header); | 1723 frame_tree_node()->AddContentSecurityPolicy(header); |
1717 } | 1724 } |
1718 | 1725 |
1719 void RenderFrameHostImpl::OnEnforceInsecureRequestPolicy( | 1726 void RenderFrameHostImpl::OnEnforceInsecureRequestPolicy( |
1720 blink::WebInsecureRequestPolicy policy) { | 1727 blink::WebInsecureRequestPolicy policy) { |
1721 frame_tree_node()->SetInsecureRequestPolicy(policy); | 1728 frame_tree_node()->SetInsecureRequestPolicy(policy); |
1722 } | 1729 } |
1723 | 1730 |
(...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3179 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3186 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
3180 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3187 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
3181 return web_bluetooth_service_.get(); | 3188 return web_bluetooth_service_.get(); |
3182 } | 3189 } |
3183 | 3190 |
3184 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3191 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
3185 web_bluetooth_service_.reset(); | 3192 web_bluetooth_service_.reset(); |
3186 } | 3193 } |
3187 | 3194 |
3188 } // namespace content | 3195 } // namespace content |
OLD | NEW |