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 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 OnVisualStateResponse) | 707 OnVisualStateResponse) |
708 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage, | 708 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage, |
709 OnRunJavaScriptMessage) | 709 OnRunJavaScriptMessage) |
710 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm, | 710 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm, |
711 OnRunBeforeUnloadConfirm) | 711 OnRunBeforeUnloadConfirm) |
712 IPC_MESSAGE_HANDLER(FrameHostMsg_RunFileChooser, OnRunFileChooser) | 712 IPC_MESSAGE_HANDLER(FrameHostMsg_RunFileChooser, OnRunFileChooser) |
713 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument, | 713 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument, |
714 OnDidAccessInitialDocument) | 714 OnDidAccessInitialDocument) |
715 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener) | 715 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener) |
716 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName) | 716 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName) |
| 717 IPC_MESSAGE_HANDLER(FrameHostMsg_DidSetFeaturePolicyHeader, |
| 718 OnDidSetFeaturePolicyHeader) |
717 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAddContentSecurityPolicy, | 719 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAddContentSecurityPolicy, |
718 OnDidAddContentSecurityPolicy) | 720 OnDidAddContentSecurityPolicy) |
719 IPC_MESSAGE_HANDLER(FrameHostMsg_EnforceInsecureRequestPolicy, | 721 IPC_MESSAGE_HANDLER(FrameHostMsg_EnforceInsecureRequestPolicy, |
720 OnEnforceInsecureRequestPolicy) | 722 OnEnforceInsecureRequestPolicy) |
721 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateToUniqueOrigin, | 723 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateToUniqueOrigin, |
722 OnUpdateToUniqueOrigin) | 724 OnUpdateToUniqueOrigin) |
723 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, | 725 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, |
724 OnDidChangeSandboxFlags) | 726 OnDidChangeSandboxFlags) |
725 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, | 727 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, |
726 OnDidChangeFrameOwnerProperties) | 728 OnDidChangeFrameOwnerProperties) |
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1732 DCHECK(!unique_name.empty()); | 1734 DCHECK(!unique_name.empty()); |
1733 } | 1735 } |
1734 | 1736 |
1735 std::string old_name = frame_tree_node()->frame_name(); | 1737 std::string old_name = frame_tree_node()->frame_name(); |
1736 frame_tree_node()->SetFrameName(name, unique_name); | 1738 frame_tree_node()->SetFrameName(name, unique_name); |
1737 if (old_name.empty() && !name.empty()) | 1739 if (old_name.empty() && !name.empty()) |
1738 frame_tree_node_->render_manager()->CreateProxiesForNewNamedFrame(); | 1740 frame_tree_node_->render_manager()->CreateProxiesForNewNamedFrame(); |
1739 delegate_->DidChangeName(this, name); | 1741 delegate_->DidChangeName(this, name); |
1740 } | 1742 } |
1741 | 1743 |
| 1744 void RenderFrameHostImpl::OnDidSetFeaturePolicyHeader( |
| 1745 const std::string& header) { |
| 1746 frame_tree_node()->SetFeaturePolicyHeader(header); |
| 1747 } |
| 1748 |
1742 void RenderFrameHostImpl::OnDidAddContentSecurityPolicy( | 1749 void RenderFrameHostImpl::OnDidAddContentSecurityPolicy( |
1743 const ContentSecurityPolicyHeader& header) { | 1750 const ContentSecurityPolicyHeader& header) { |
1744 frame_tree_node()->AddContentSecurityPolicy(header); | 1751 frame_tree_node()->AddContentSecurityPolicy(header); |
1745 } | 1752 } |
1746 | 1753 |
1747 void RenderFrameHostImpl::OnEnforceInsecureRequestPolicy( | 1754 void RenderFrameHostImpl::OnEnforceInsecureRequestPolicy( |
1748 blink::WebInsecureRequestPolicy policy) { | 1755 blink::WebInsecureRequestPolicy policy) { |
1749 frame_tree_node()->SetInsecureRequestPolicy(policy); | 1756 frame_tree_node()->SetInsecureRequestPolicy(policy); |
1750 } | 1757 } |
1751 | 1758 |
(...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3304 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3311 // There is no pending NavigationEntry in these cases, so pass 0 as the |
3305 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3312 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
3306 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3313 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
3307 return NavigationHandleImpl::Create( | 3314 return NavigationHandleImpl::Create( |
3308 params.url, frame_tree_node_, is_renderer_initiated, | 3315 params.url, frame_tree_node_, is_renderer_initiated, |
3309 params.was_within_same_page, params.is_srcdoc, base::TimeTicks::Now(), | 3316 params.was_within_same_page, params.is_srcdoc, base::TimeTicks::Now(), |
3310 entry_id_for_data_nav, false); // started_from_context_menu | 3317 entry_id_for_data_nav, false); // started_from_context_menu |
3311 } | 3318 } |
3312 | 3319 |
3313 } // namespace content | 3320 } // namespace content |
OLD | NEW |