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

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: s/title.html/title1.html/ 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 2742 matching lines...) Expand 10 before | Expand all | Expand 10 after
2805 Send(new FrameHostMsg_UpdateToUniqueOrigin( 2806 Send(new FrameHostMsg_UpdateToUniqueOrigin(
2806 routing_id_, is_potentially_trustworthy_unique_origin)); 2807 routing_id_, is_potentially_trustworthy_unique_origin));
2807 } 2808 }
2808 2809
2809 void RenderFrameImpl::didChangeSandboxFlags(blink::WebFrame* child_frame, 2810 void RenderFrameImpl::didChangeSandboxFlags(blink::WebFrame* child_frame,
2810 blink::WebSandboxFlags flags) { 2811 blink::WebSandboxFlags flags) {
2811 Send(new FrameHostMsg_DidChangeSandboxFlags( 2812 Send(new FrameHostMsg_DidChangeSandboxFlags(
2812 routing_id_, GetRoutingIdForFrameOrProxy(child_frame), flags)); 2813 routing_id_, GetRoutingIdForFrameOrProxy(child_frame), flags));
2813 } 2814 }
2814 2815
2816 void RenderFrameImpl::didAddContentSecurityPolicy(
2817 const blink::WebString& header_value,
2818 blink::WebContentSecurityPolicyType type,
2819 blink::WebContentSecurityPolicySource source) {
2820 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible())
2821 return;
2822
2823 ContentSecurityPolicyHeader header;
2824 header.header_value = base::UTF16ToUTF8(base::StringPiece16(header_value));
2825 header.type = type;
2826 header.source = source;
2827 Send(new FrameHostMsg_DidAddContentSecurityPolicy(routing_id_, header));
2828 }
2829
2815 void RenderFrameImpl::didChangeFrameOwnerProperties( 2830 void RenderFrameImpl::didChangeFrameOwnerProperties(
2816 blink::WebFrame* child_frame, 2831 blink::WebFrame* child_frame,
2817 const blink::WebFrameOwnerProperties& frame_owner_properties) { 2832 const blink::WebFrameOwnerProperties& frame_owner_properties) {
2818 Send(new FrameHostMsg_DidChangeFrameOwnerProperties( 2833 Send(new FrameHostMsg_DidChangeFrameOwnerProperties(
2819 routing_id_, GetRoutingIdForFrameOrProxy(child_frame), 2834 routing_id_, GetRoutingIdForFrameOrProxy(child_frame),
2820 frame_owner_properties)); 2835 frame_owner_properties));
2821 } 2836 }
2822 2837
2823 void RenderFrameImpl::didMatchCSS( 2838 void RenderFrameImpl::didMatchCSS(
2824 blink::WebLocalFrame* frame, 2839 blink::WebLocalFrame* frame,
(...skipping 3314 matching lines...) Expand 10 before | Expand all | Expand 10 after
6139 // event target. Potentially a Pepper plugin will receive the event. 6154 // event target. Potentially a Pepper plugin will receive the event.
6140 // In order to tell whether a plugin gets the last mouse event and which it 6155 // In order to tell whether a plugin gets the last mouse event and which it
6141 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6156 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6142 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6157 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6143 // |pepper_last_mouse_event_target_|. 6158 // |pepper_last_mouse_event_target_|.
6144 pepper_last_mouse_event_target_ = nullptr; 6159 pepper_last_mouse_event_target_ = nullptr;
6145 #endif 6160 #endif
6146 } 6161 }
6147 6162
6148 } // namespace content 6163 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698