Chromium Code Reviews| 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 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 762 OnRunJavaScriptDialog) | 762 OnRunJavaScriptDialog) |
| 763 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm, | 763 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm, |
| 764 OnRunBeforeUnloadConfirm) | 764 OnRunBeforeUnloadConfirm) |
| 765 IPC_MESSAGE_HANDLER(FrameHostMsg_RunFileChooser, OnRunFileChooser) | 765 IPC_MESSAGE_HANDLER(FrameHostMsg_RunFileChooser, OnRunFileChooser) |
| 766 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument, | 766 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument, |
| 767 OnDidAccessInitialDocument) | 767 OnDidAccessInitialDocument) |
| 768 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener) | 768 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener) |
| 769 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName) | 769 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName) |
| 770 IPC_MESSAGE_HANDLER(FrameHostMsg_DidSetFeaturePolicyHeader, | 770 IPC_MESSAGE_HANDLER(FrameHostMsg_DidSetFeaturePolicyHeader, |
| 771 OnDidSetFeaturePolicyHeader) | 771 OnDidSetFeaturePolicyHeader) |
| 772 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAddContentSecurityPolicy, | 772 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAddContentSecurityPolicies, |
| 773 OnDidAddContentSecurityPolicy) | 773 OnDidAddContentSecurityPolicies) |
| 774 IPC_MESSAGE_HANDLER(FrameHostMsg_EnforceInsecureRequestPolicy, | 774 IPC_MESSAGE_HANDLER(FrameHostMsg_EnforceInsecureRequestPolicy, |
| 775 OnEnforceInsecureRequestPolicy) | 775 OnEnforceInsecureRequestPolicy) |
| 776 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateToUniqueOrigin, | 776 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateToUniqueOrigin, |
| 777 OnUpdateToUniqueOrigin) | 777 OnUpdateToUniqueOrigin) |
| 778 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, | 778 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, |
| 779 OnDidChangeSandboxFlags) | 779 OnDidChangeSandboxFlags) |
| 780 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, | 780 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, |
| 781 OnDidChangeFrameOwnerProperties) | 781 OnDidChangeFrameOwnerProperties) |
| 782 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle) | 782 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle) |
| 783 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding) | 783 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateEncoding, OnUpdateEncoding) |
| (...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1920 delegate_->DidChangeName(this, name); | 1920 delegate_->DidChangeName(this, name); |
| 1921 } | 1921 } |
| 1922 | 1922 |
| 1923 void RenderFrameHostImpl::OnDidSetFeaturePolicyHeader( | 1923 void RenderFrameHostImpl::OnDidSetFeaturePolicyHeader( |
| 1924 const ParsedFeaturePolicyHeader& parsed_header) { | 1924 const ParsedFeaturePolicyHeader& parsed_header) { |
| 1925 frame_tree_node()->SetFeaturePolicyHeader(parsed_header); | 1925 frame_tree_node()->SetFeaturePolicyHeader(parsed_header); |
| 1926 ResetFeaturePolicy(); | 1926 ResetFeaturePolicy(); |
| 1927 feature_policy_->SetHeaderPolicy(parsed_header); | 1927 feature_policy_->SetHeaderPolicy(parsed_header); |
| 1928 } | 1928 } |
| 1929 | 1929 |
| 1930 void RenderFrameHostImpl::OnDidAddContentSecurityPolicy( | 1930 void RenderFrameHostImpl::OnDidAddContentSecurityPolicies( |
| 1931 const ContentSecurityPolicyHeader& header, | |
| 1932 const std::vector<ContentSecurityPolicy>& policies) { | 1931 const std::vector<ContentSecurityPolicy>& policies) { |
| 1933 frame_tree_node()->AddContentSecurityPolicy(header); | 1932 std::vector<ContentSecurityPolicyHeader> headers; |
| 1934 for (const ContentSecurityPolicy& policy : policies) | 1933 for (const ContentSecurityPolicy& policy : policies) { |
| 1935 AddContentSecurityPolicy(policy); | 1934 AddContentSecurityPolicy(policy); |
| 1935 headers.push_back(policy.header); | |
|
alexmos
2017/03/25 01:46:27
Sanity check: your old comment on RFHI::OnDidAddCo
arthursonzogni
2017/03/27 12:03:52
The headers that contains multiple policies are sp
alexmos
2017/03/27 18:27:22
Acknowledged.
| |
| 1936 } | |
| 1937 frame_tree_node()->AddContentSecurityPolicies(headers); | |
| 1936 } | 1938 } |
| 1937 | 1939 |
| 1938 void RenderFrameHostImpl::OnEnforceInsecureRequestPolicy( | 1940 void RenderFrameHostImpl::OnEnforceInsecureRequestPolicy( |
| 1939 blink::WebInsecureRequestPolicy policy) { | 1941 blink::WebInsecureRequestPolicy policy) { |
| 1940 frame_tree_node()->SetInsecureRequestPolicy(policy); | 1942 frame_tree_node()->SetInsecureRequestPolicy(policy); |
| 1941 } | 1943 } |
| 1942 | 1944 |
| 1943 void RenderFrameHostImpl::OnUpdateToUniqueOrigin( | 1945 void RenderFrameHostImpl::OnUpdateToUniqueOrigin( |
| 1944 bool is_potentially_trustworthy_unique_origin) { | 1946 bool is_potentially_trustworthy_unique_origin) { |
| 1945 url::Origin origin; | 1947 url::Origin origin; |
| (...skipping 1683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3629 service_manager::mojom::InterfaceProviderPtr provider; | 3631 service_manager::mojom::InterfaceProviderPtr provider; |
| 3630 BindInterfaceRegistryForRenderFrameHost(mojo::MakeRequest(&provider), this); | 3632 BindInterfaceRegistryForRenderFrameHost(mojo::MakeRequest(&provider), this); |
| 3631 java_interfaces_.reset(new service_manager::InterfaceProvider); | 3633 java_interfaces_.reset(new service_manager::InterfaceProvider); |
| 3632 java_interfaces_->Bind(std::move(provider)); | 3634 java_interfaces_->Bind(std::move(provider)); |
| 3633 } | 3635 } |
| 3634 return java_interfaces_.get(); | 3636 return java_interfaces_.get(); |
| 3635 } | 3637 } |
| 3636 #endif | 3638 #endif |
| 3637 | 3639 |
| 3638 } // namespace content | 3640 } // namespace content |
| OLD | NEW |