OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_proxy.h" | 5 #include "content/renderer/render_frame_proxy.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <map> | 8 #include <map> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
13 #include "content/child/web_url_request_util.h" | 13 #include "content/child/web_url_request_util.h" |
14 #include "content/child/webmessageportchannel_impl.h" | 14 #include "content/child/webmessageportchannel_impl.h" |
15 #include "content/common/content_security_policy_header.h" | 15 #include "content/common/content_security_policy_structs.h" |
16 #include "content/common/frame_messages.h" | 16 #include "content/common/frame_messages.h" |
17 #include "content/common/frame_owner_properties.h" | 17 #include "content/common/frame_owner_properties.h" |
18 #include "content/common/frame_replication_state.h" | 18 #include "content/common/frame_replication_state.h" |
19 #include "content/common/input_messages.h" | 19 #include "content/common/input_messages.h" |
20 #include "content/common/page_messages.h" | 20 #include "content/common/page_messages.h" |
21 #include "content/common/site_isolation_policy.h" | 21 #include "content/common/site_isolation_policy.h" |
22 #include "content/common/swapped_out_messages.h" | 22 #include "content/common/swapped_out_messages.h" |
23 #include "content/common/view_messages.h" | 23 #include "content/common/view_messages.h" |
24 #include "content/renderer/child_frame_compositing_helper.h" | 24 #include "content/renderer/child_frame_compositing_helper.h" |
25 #include "content/renderer/render_frame_impl.h" | 25 #include "content/renderer/render_frame_impl.h" |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 void RenderFrameProxy::advanceFocus(blink::WebFocusType type, | 493 void RenderFrameProxy::advanceFocus(blink::WebFocusType type, |
494 blink::WebLocalFrame* source) { | 494 blink::WebLocalFrame* source) { |
495 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); | 495 int source_routing_id = RenderFrameImpl::FromWebFrame(source)->GetRoutingID(); |
496 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); | 496 Send(new FrameHostMsg_AdvanceFocus(routing_id_, type, source_routing_id)); |
497 } | 497 } |
498 | 498 |
499 void RenderFrameProxy::frameFocused() { | 499 void RenderFrameProxy::frameFocused() { |
500 Send(new FrameHostMsg_FrameFocused(routing_id_)); | 500 Send(new FrameHostMsg_FrameFocused(routing_id_)); |
501 } | 501 } |
502 | 502 |
| 503 void RenderFrameProxy::forwardContentSecurityPolicyViolation( |
| 504 const blink::WebString& directive_text, |
| 505 const blink::WebString& effective_directive, |
| 506 const blink::WebString& console_message, |
| 507 const blink::WebURL& blocked_url, |
| 508 const blink::WebVector<blink::WebString>& report_endpoints, |
| 509 const blink::WebString& header, |
| 510 blink::WebContentSecurityPolicyViolationType violation_type, |
| 511 bool followed_redirect) { |
| 512 content::ContentSecurityPolicyViolation violation; |
| 513 violation.directive_text = directive_text.utf8(); |
| 514 violation.effective_directive = effective_directive.utf8(); |
| 515 violation.console_message = console_message.utf8(); |
| 516 violation.blocked_url = blocked_url; |
| 517 |
| 518 violation.report_endpoints.reserve(report_endpoints.size()); |
| 519 for (const blink::WebString& report_endpoint : report_endpoints) |
| 520 violation.report_endpoints.push_back(report_endpoint.utf8()); |
| 521 |
| 522 violation.header = header.utf8(); |
| 523 violation.violation_type = violation_type; |
| 524 violation.followed_redirect = followed_redirect; |
| 525 |
| 526 Send(new FrameHostMsg_ForwardContentSecurityPolicyViolation( |
| 527 routing_id_, web_frame_->getSecurityOrigin(), violation)); |
| 528 } |
| 529 |
503 } // namespace | 530 } // namespace |
OLD | NEW |