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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 1957783002: Replicate Content-Security-Policy into remote frame proxies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing CSP inheritance for srcdoc. Created 4 years, 7 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 // 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/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "content/child/service_worker/service_worker_provider_context.h" 43 #include "content/child/service_worker/service_worker_provider_context.h"
44 #include "content/child/service_worker/web_service_worker_provider_impl.h" 44 #include "content/child/service_worker/web_service_worker_provider_impl.h"
45 #include "content/child/v8_value_converter_impl.h" 45 #include "content/child/v8_value_converter_impl.h"
46 #include "content/child/web_url_loader_impl.h" 46 #include "content/child/web_url_loader_impl.h"
47 #include "content/child/web_url_request_util.h" 47 #include "content/child/web_url_request_util.h"
48 #include "content/child/webmessageportchannel_impl.h" 48 #include "content/child/webmessageportchannel_impl.h"
49 #include "content/child/websocket_bridge.h" 49 #include "content/child/websocket_bridge.h"
50 #include "content/child/weburlresponse_extradata_impl.h" 50 #include "content/child/weburlresponse_extradata_impl.h"
51 #include "content/common/accessibility_messages.h" 51 #include "content/common/accessibility_messages.h"
52 #include "content/common/clipboard_messages.h" 52 #include "content/common/clipboard_messages.h"
53 #include "content/common/content_security_policy_header.h"
53 #include "content/common/frame_messages.h" 54 #include "content/common/frame_messages.h"
54 #include "content/common/frame_replication_state.h" 55 #include "content/common/frame_replication_state.h"
55 #include "content/common/gpu/client/context_provider_command_buffer.h" 56 #include "content/common/gpu/client/context_provider_command_buffer.h"
56 #include "content/common/input_messages.h" 57 #include "content/common/input_messages.h"
57 #include "content/common/navigation_params.h" 58 #include "content/common/navigation_params.h"
58 #include "content/common/page_messages.h" 59 #include "content/common/page_messages.h"
59 #include "content/common/savable_subframe.h" 60 #include "content/common/savable_subframe.h"
60 #include "content/common/service_worker/service_worker_types.h" 61 #include "content/common/service_worker/service_worker_types.h"
61 #include "content/common/site_isolation_policy.h" 62 #include "content/common/site_isolation_policy.h"
62 #include "content/common/ssl_status_serialization.h" 63 #include "content/common/ssl_status_serialization.h"
(...skipping 2744 matching lines...) Expand 10 before | Expand all | Expand 10 after
2807 Send(new FrameHostMsg_UpdateToUniqueOrigin( 2808 Send(new FrameHostMsg_UpdateToUniqueOrigin(
2808 routing_id_, is_potentially_trustworthy_unique_origin)); 2809 routing_id_, is_potentially_trustworthy_unique_origin));
2809 } 2810 }
2810 2811
2811 void RenderFrameImpl::didChangeSandboxFlags(blink::WebFrame* child_frame, 2812 void RenderFrameImpl::didChangeSandboxFlags(blink::WebFrame* child_frame,
2812 blink::WebSandboxFlags flags) { 2813 blink::WebSandboxFlags flags) {
2813 Send(new FrameHostMsg_DidChangeSandboxFlags( 2814 Send(new FrameHostMsg_DidChangeSandboxFlags(
2814 routing_id_, GetRoutingIdForFrameOrProxy(child_frame), flags)); 2815 routing_id_, GetRoutingIdForFrameOrProxy(child_frame), flags));
2815 } 2816 }
2816 2817
2818 void RenderFrameImpl::didAddContentSecurityPolicy(
2819 const blink::WebString& header_value,
2820 blink::WebContentSecurityPolicyType type,
2821 blink::WebContentSecurityPolicySource source) {
2822 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible())
2823 return;
2824
2825 ContentSecurityPolicyHeader header;
2826 header.header_value = base::UTF16ToUTF8(base::StringPiece16(header_value));
2827 header.type = type;
2828 header.source = source;
2829 Send(new FrameHostMsg_DidAddContentSecurityPolicy(routing_id_, header));
2830 }
2831
2817 void RenderFrameImpl::didChangeFrameOwnerProperties( 2832 void RenderFrameImpl::didChangeFrameOwnerProperties(
2818 blink::WebFrame* child_frame, 2833 blink::WebFrame* child_frame,
2819 const blink::WebFrameOwnerProperties& frame_owner_properties) { 2834 const blink::WebFrameOwnerProperties& frame_owner_properties) {
2820 Send(new FrameHostMsg_DidChangeFrameOwnerProperties( 2835 Send(new FrameHostMsg_DidChangeFrameOwnerProperties(
2821 routing_id_, GetRoutingIdForFrameOrProxy(child_frame), 2836 routing_id_, GetRoutingIdForFrameOrProxy(child_frame),
2822 frame_owner_properties)); 2837 frame_owner_properties));
2823 } 2838 }
2824 2839
2825 void RenderFrameImpl::didMatchCSS( 2840 void RenderFrameImpl::didMatchCSS(
2826 blink::WebLocalFrame* frame, 2841 blink::WebLocalFrame* frame,
(...skipping 3317 matching lines...) Expand 10 before | Expand all | Expand 10 after
6144 // event target. Potentially a Pepper plugin will receive the event. 6159 // event target. Potentially a Pepper plugin will receive the event.
6145 // In order to tell whether a plugin gets the last mouse event and which it 6160 // In order to tell whether a plugin gets the last mouse event and which it
6146 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6161 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6147 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6162 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6148 // |pepper_last_mouse_event_target_|. 6163 // |pepper_last_mouse_event_target_|.
6149 pepper_last_mouse_event_target_ = nullptr; 6164 pepper_last_mouse_event_target_ = nullptr;
6150 #endif 6165 #endif
6151 } 6166 }
6152 6167
6153 } // namespace content 6168 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698