Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: third_party/WebKit/Source/web/LocalFrameClientImpl.cpp

Issue 2764993002: CSP: group policies in didAddContentSecurityPolicy. (Closed)
Patch Set: Rebase. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 m_webFrame->client()->didChangeSandboxFlags( 914 m_webFrame->client()->didChangeSandboxFlags(
915 WebFrame::fromFrame(childFrame), static_cast<WebSandboxFlags>(flags)); 915 WebFrame::fromFrame(childFrame), static_cast<WebSandboxFlags>(flags));
916 } 916 }
917 917
918 void LocalFrameClientImpl::didSetFeaturePolicyHeader( 918 void LocalFrameClientImpl::didSetFeaturePolicyHeader(
919 const WebParsedFeaturePolicy& parsedHeader) { 919 const WebParsedFeaturePolicy& parsedHeader) {
920 if (m_webFrame->client()) 920 if (m_webFrame->client())
921 m_webFrame->client()->didSetFeaturePolicyHeader(parsedHeader); 921 m_webFrame->client()->didSetFeaturePolicyHeader(parsedHeader);
922 } 922 }
923 923
924 void LocalFrameClientImpl::didAddContentSecurityPolicy( 924 void LocalFrameClientImpl::didAddContentSecurityPolicies(
925 const String& headerValue, 925 const blink::WebVector<WebContentSecurityPolicy>& policies) {
926 ContentSecurityPolicyHeaderType type, 926 if (m_webFrame->client())
927 ContentSecurityPolicyHeaderSource source, 927 m_webFrame->client()->didAddContentSecurityPolicies(policies);
928 const std::vector<WebContentSecurityPolicy>& policies) {
929 if (m_webFrame->client()) {
930 m_webFrame->client()->didAddContentSecurityPolicy(
931 headerValue, static_cast<WebContentSecurityPolicyType>(type),
932 static_cast<WebContentSecurityPolicySource>(source), policies);
933 }
934 } 928 }
935 929
936 void LocalFrameClientImpl::didChangeFrameOwnerProperties( 930 void LocalFrameClientImpl::didChangeFrameOwnerProperties(
937 HTMLFrameElementBase* frameElement) { 931 HTMLFrameElementBase* frameElement) {
938 if (!m_webFrame->client()) 932 if (!m_webFrame->client())
939 return; 933 return;
940 934
941 m_webFrame->client()->didChangeFrameOwnerProperties( 935 m_webFrame->client()->didChangeFrameOwnerProperties(
942 WebFrame::fromFrame(frameElement->contentFrame()), 936 WebFrame::fromFrame(frameElement->contentFrame()),
943 WebFrameOwnerProperties( 937 WebFrameOwnerProperties(
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 if (m_webFrame->client()) 1033 if (m_webFrame->client())
1040 m_webFrame->client()->setHasReceivedUserGesture(); 1034 m_webFrame->client()->setHasReceivedUserGesture();
1041 } 1035 }
1042 1036
1043 void LocalFrameClientImpl::abortClientNavigation() { 1037 void LocalFrameClientImpl::abortClientNavigation() {
1044 if (m_webFrame->client()) 1038 if (m_webFrame->client())
1045 m_webFrame->client()->abortClientNavigation(); 1039 m_webFrame->client()->abortClientNavigation();
1046 } 1040 }
1047 1041
1048 } // namespace blink 1042 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/LocalFrameClientImpl.h ('k') | third_party/WebKit/public/web/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698