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 <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 OnRunJavaScriptDialog) | 763 OnRunJavaScriptDialog) |
764 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm, | 764 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm, |
765 OnRunBeforeUnloadConfirm) | 765 OnRunBeforeUnloadConfirm) |
766 IPC_MESSAGE_HANDLER(FrameHostMsg_RunFileChooser, OnRunFileChooser) | 766 IPC_MESSAGE_HANDLER(FrameHostMsg_RunFileChooser, OnRunFileChooser) |
767 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument, | 767 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument, |
768 OnDidAccessInitialDocument) | 768 OnDidAccessInitialDocument) |
769 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener) | 769 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener) |
770 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName) | 770 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName) |
771 IPC_MESSAGE_HANDLER(FrameHostMsg_DidSetFeaturePolicyHeader, | 771 IPC_MESSAGE_HANDLER(FrameHostMsg_DidSetFeaturePolicyHeader, |
772 OnDidSetFeaturePolicyHeader) | 772 OnDidSetFeaturePolicyHeader) |
773 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAddContentSecurityPolicy, | 773 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAddContentSecurityPolicies, |
774 OnDidAddContentSecurityPolicy) | 774 OnDidAddContentSecurityPolicies) |
775 IPC_MESSAGE_HANDLER(FrameHostMsg_EnforceInsecureRequestPolicy, | 775 IPC_MESSAGE_HANDLER(FrameHostMsg_EnforceInsecureRequestPolicy, |
776 OnEnforceInsecureRequestPolicy) | 776 OnEnforceInsecureRequestPolicy) |
777 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateToUniqueOrigin, | 777 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateToUniqueOrigin, |
778 OnUpdateToUniqueOrigin) | 778 OnUpdateToUniqueOrigin) |
779 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, | 779 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, |
780 OnDidChangeSandboxFlags) | 780 OnDidChangeSandboxFlags) |
781 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, | 781 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, |
782 OnDidChangeFrameOwnerProperties) | 782 OnDidChangeFrameOwnerProperties) |
783 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle) | 783 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle) |
784 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding) | 784 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding) |
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1919 delegate_->DidChangeName(this, name); | 1919 delegate_->DidChangeName(this, name); |
1920 } | 1920 } |
1921 | 1921 |
1922 void RenderFrameHostImpl::OnDidSetFeaturePolicyHeader( | 1922 void RenderFrameHostImpl::OnDidSetFeaturePolicyHeader( |
1923 const ParsedFeaturePolicyHeader& parsed_header) { | 1923 const ParsedFeaturePolicyHeader& parsed_header) { |
1924 frame_tree_node()->SetFeaturePolicyHeader(parsed_header); | 1924 frame_tree_node()->SetFeaturePolicyHeader(parsed_header); |
1925 ResetFeaturePolicy(); | 1925 ResetFeaturePolicy(); |
1926 feature_policy_->SetHeaderPolicy(parsed_header); | 1926 feature_policy_->SetHeaderPolicy(parsed_header); |
1927 } | 1927 } |
1928 | 1928 |
1929 void RenderFrameHostImpl::OnDidAddContentSecurityPolicy( | 1929 void RenderFrameHostImpl::OnDidAddContentSecurityPolicies( |
1930 const ContentSecurityPolicyHeader& header, | |
1931 const std::vector<ContentSecurityPolicy>& policies) { | 1930 const std::vector<ContentSecurityPolicy>& policies) { |
1932 frame_tree_node()->AddContentSecurityPolicy(header); | 1931 std::vector<ContentSecurityPolicyHeader> headers; |
1933 for (const ContentSecurityPolicy& policy : policies) | 1932 for (const ContentSecurityPolicy& policy : policies) { |
1934 AddContentSecurityPolicy(policy); | 1933 AddContentSecurityPolicy(policy); |
| 1934 headers.push_back(policy.header); |
| 1935 } |
| 1936 frame_tree_node()->AddContentSecurityPolicies(headers); |
1935 } | 1937 } |
1936 | 1938 |
1937 void RenderFrameHostImpl::OnEnforceInsecureRequestPolicy( | 1939 void RenderFrameHostImpl::OnEnforceInsecureRequestPolicy( |
1938 blink::WebInsecureRequestPolicy policy) { | 1940 blink::WebInsecureRequestPolicy policy) { |
1939 frame_tree_node()->SetInsecureRequestPolicy(policy); | 1941 frame_tree_node()->SetInsecureRequestPolicy(policy); |
1940 } | 1942 } |
1941 | 1943 |
1942 void RenderFrameHostImpl::OnUpdateToUniqueOrigin( | 1944 void RenderFrameHostImpl::OnUpdateToUniqueOrigin( |
1943 bool is_potentially_trustworthy_unique_origin) { | 1945 bool is_potentially_trustworthy_unique_origin) { |
1944 url::Origin origin; | 1946 url::Origin origin; |
(...skipping 1683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3628 service_manager::mojom::InterfaceProviderPtr provider; | 3630 service_manager::mojom::InterfaceProviderPtr provider; |
3629 BindInterfaceRegistryForRenderFrameHost(mojo::MakeRequest(&provider), this); | 3631 BindInterfaceRegistryForRenderFrameHost(mojo::MakeRequest(&provider), this); |
3630 java_interfaces_.reset(new service_manager::InterfaceProvider); | 3632 java_interfaces_.reset(new service_manager::InterfaceProvider); |
3631 java_interfaces_->Bind(std::move(provider)); | 3633 java_interfaces_->Bind(std::move(provider)); |
3632 } | 3634 } |
3633 return java_interfaces_.get(); | 3635 return java_interfaces_.get(); |
3634 } | 3636 } |
3635 #endif | 3637 #endif |
3636 | 3638 |
3637 } // namespace content | 3639 } // namespace content |
OLD | NEW |