Index: content/browser/frame_host/render_frame_host_impl.h |
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h |
index 60f86949addab8092bfb07a1b4f0e022c0babfcc..2e790765daba434facf98e955f5a2be5aeb87afb 100644 |
--- a/content/browser/frame_host/render_frame_host_impl.h |
+++ b/content/browser/frame_host/render_frame_host_impl.h |
@@ -30,7 +30,7 @@ |
#include "content/common/accessibility_mode_enums.h" |
#include "content/common/ax_content_node_data.h" |
#include "content/common/content_export.h" |
-#include "content/common/content_security_policy/content_security_policy.h" |
+#include "content/common/content_security_policy/csp_context.h" |
#include "content/common/download/mhtml_save_status.h" |
#include "content/common/frame.mojom.h" |
#include "content/common/frame_message_enums.h" |
@@ -116,7 +116,8 @@ class CONTENT_EXPORT RenderFrameHostImpl |
public BrowserAccessibilityDelegate, |
public SiteInstanceImpl::Observer, |
public NON_EXPORTED_BASE( |
- service_manager::InterfaceFactory<media::mojom::InterfaceFactory>) { |
+ service_manager::InterfaceFactory<media::mojom::InterfaceFactory>), |
+ public CSPContext { |
public: |
using AXTreeSnapshotCallback = |
base::Callback<void( |
@@ -209,6 +210,12 @@ class CONTENT_EXPORT RenderFrameHostImpl |
// SiteInstanceImpl::Observer |
void RenderProcessGone(SiteInstanceImpl* site_instance) override; |
+ // CSPContext |
+ void LogToConsole(const std::string& message) override; |
+ void ReportContentSecurityPolicyViolation( |
+ const CSPViolationParams& violation_params) override; |
+ bool SchemeShouldBypassCSP(const base::StringPiece& scheme) override; |
+ |
// Creates a RenderFrame in the renderer process. |
bool CreateRenderFrame(int proxy_routing_id, |
int opener_routing_id, |
@@ -270,6 +277,7 @@ class CONTENT_EXPORT RenderFrameHostImpl |
// Update this frame's last committed origin. |
void set_last_committed_origin(const url::Origin& origin) { |
last_committed_origin_ = origin; |
+ CSPContext::SetSelf(origin); |
} |
// Returns the associated WebUI or null if none applies. |