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

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

Issue 2612793002: Implement ContentSecurityPolicy on the browser-side. (Closed)
Patch Set: Add the TODO and bug ids that was forgotten. Created 3 years, 10 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 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 872
873 void FrameLoaderClientImpl::didSetFeaturePolicyHeader( 873 void FrameLoaderClientImpl::didSetFeaturePolicyHeader(
874 const WebParsedFeaturePolicyHeader& parsedHeader) { 874 const WebParsedFeaturePolicyHeader& parsedHeader) {
875 if (m_webFrame->client()) 875 if (m_webFrame->client())
876 m_webFrame->client()->didSetFeaturePolicyHeader(parsedHeader); 876 m_webFrame->client()->didSetFeaturePolicyHeader(parsedHeader);
877 } 877 }
878 878
879 void FrameLoaderClientImpl::didAddContentSecurityPolicy( 879 void FrameLoaderClientImpl::didAddContentSecurityPolicy(
880 const String& headerValue, 880 const String& headerValue,
881 ContentSecurityPolicyHeaderType type, 881 ContentSecurityPolicyHeaderType type,
882 ContentSecurityPolicyHeaderSource source) { 882 ContentSecurityPolicyHeaderSource source,
883 const std::vector<WebContentSecurityPolicyPolicy>& policies) {
883 if (m_webFrame->client()) { 884 if (m_webFrame->client()) {
884 m_webFrame->client()->didAddContentSecurityPolicy( 885 m_webFrame->client()->didAddContentSecurityPolicy(
885 headerValue, static_cast<WebContentSecurityPolicyType>(type), 886 headerValue, static_cast<WebContentSecurityPolicyType>(type),
886 static_cast<WebContentSecurityPolicySource>(source)); 887 static_cast<WebContentSecurityPolicySource>(source), policies);
887 } 888 }
888 } 889 }
889 890
890 void FrameLoaderClientImpl::didChangeFrameOwnerProperties( 891 void FrameLoaderClientImpl::didChangeFrameOwnerProperties(
891 HTMLFrameElementBase* frameElement) { 892 HTMLFrameElementBase* frameElement) {
892 if (!m_webFrame->client()) 893 if (!m_webFrame->client())
893 return; 894 return;
894 895
895 m_webFrame->client()->didChangeFrameOwnerProperties( 896 m_webFrame->client()->didChangeFrameOwnerProperties(
896 WebFrame::fromFrame(frameElement->contentFrame()), 897 WebFrame::fromFrame(frameElement->contentFrame()),
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { 1003 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) {
1003 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); 1004 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url));
1004 } 1005 }
1005 1006
1006 void FrameLoaderClientImpl::setHasReceivedUserGesture() { 1007 void FrameLoaderClientImpl::setHasReceivedUserGesture() {
1007 if (m_webFrame->client()) 1008 if (m_webFrame->client())
1008 m_webFrame->client()->setHasReceivedUserGesture(); 1009 m_webFrame->client()->setHasReceivedUserGesture();
1009 } 1010 }
1010 1011
1011 } // namespace blink 1012 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698