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

Side by Side Diff: content/common/frame_messages.h

Issue 2190183002: Forward CSP violation reporting from RenderFrameProxy to RenderFrameImpl. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing how virtual method is declared. Created 4 years, 4 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 // IPC messages for interacting with frames. 5 // IPC messages for interacting with frames.
6 // Multiply-included message file, hence no include guard. 6 // Multiply-included message file, hence no include guard.
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <map> 11 #include <map>
12 #include <set> 12 #include <set>
13 #include <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 15
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "cc/surfaces/surface_id.h" 17 #include "cc/surfaces/surface_id.h"
18 #include "cc/surfaces/surface_sequence.h" 18 #include "cc/surfaces/surface_sequence.h"
19 #include "content/common/content_export.h" 19 #include "content/common/content_export.h"
20 #include "content/common/content_param_traits.h" 20 #include "content/common/content_param_traits.h"
21 #include "content/common/content_security_policy_header.h" 21 #include "content/common/content_security_policy_structs.h"
22 #include "content/common/frame_message_enums.h" 22 #include "content/common/frame_message_enums.h"
23 #include "content/common/frame_owner_properties.h" 23 #include "content/common/frame_owner_properties.h"
24 #include "content/common/frame_replication_state.h" 24 #include "content/common/frame_replication_state.h"
25 #include "content/common/navigation_gesture.h" 25 #include "content/common/navigation_gesture.h"
26 #include "content/common/navigation_params.h" 26 #include "content/common/navigation_params.h"
27 #include "content/common/savable_subframe.h" 27 #include "content/common/savable_subframe.h"
28 #include "content/public/common/color_suggestion.h" 28 #include "content/public/common/color_suggestion.h"
29 #include "content/public/common/common_param_traits.h" 29 #include "content/public/common/common_param_traits.h"
30 #include "content/public/common/console_message_level.h" 30 #include "content/public/common/console_message_level.h"
31 #include "content/public/common/context_menu_params.h" 31 #include "content/public/common/context_menu_params.h"
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 550
551 IPC_STRUCT_BEGIN(FrameHostMsg_CreateChildFrame_Params) 551 IPC_STRUCT_BEGIN(FrameHostMsg_CreateChildFrame_Params)
552 IPC_STRUCT_MEMBER(int32_t, parent_routing_id) 552 IPC_STRUCT_MEMBER(int32_t, parent_routing_id)
553 IPC_STRUCT_MEMBER(blink::WebTreeScopeType, scope) 553 IPC_STRUCT_MEMBER(blink::WebTreeScopeType, scope)
554 IPC_STRUCT_MEMBER(std::string, frame_name) 554 IPC_STRUCT_MEMBER(std::string, frame_name)
555 IPC_STRUCT_MEMBER(std::string, frame_unique_name) 555 IPC_STRUCT_MEMBER(std::string, frame_unique_name)
556 IPC_STRUCT_MEMBER(blink::WebSandboxFlags, sandbox_flags) 556 IPC_STRUCT_MEMBER(blink::WebSandboxFlags, sandbox_flags)
557 IPC_STRUCT_MEMBER(content::FrameOwnerProperties, frame_owner_properties) 557 IPC_STRUCT_MEMBER(content::FrameOwnerProperties, frame_owner_properties)
558 IPC_STRUCT_END() 558 IPC_STRUCT_END()
559 559
560 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicyViolation)
561 IPC_STRUCT_TRAITS_MEMBER(directive_text)
562 IPC_STRUCT_TRAITS_MEMBER(effective_directive)
563 IPC_STRUCT_TRAITS_MEMBER(console_message)
564 IPC_STRUCT_TRAITS_MEMBER(blocked_url)
565 IPC_STRUCT_TRAITS_MEMBER(header)
566 IPC_STRUCT_TRAITS_MEMBER(violation_type)
567 IPC_STRUCT_TRAITS_MEMBER(followed_redirect)
568 IPC_STRUCT_TRAITS_MEMBER(context_line)
569 IPC_STRUCT_TRAITS_END()
570
560 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicyHeader) 571 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicyHeader)
561 IPC_STRUCT_TRAITS_MEMBER(header_value) 572 IPC_STRUCT_TRAITS_MEMBER(header_value)
562 IPC_STRUCT_TRAITS_MEMBER(type) 573 IPC_STRUCT_TRAITS_MEMBER(type)
563 IPC_STRUCT_TRAITS_MEMBER(source) 574 IPC_STRUCT_TRAITS_MEMBER(source)
564 IPC_STRUCT_TRAITS_END() 575 IPC_STRUCT_TRAITS_END()
565 576
566 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserFileInfo) 577 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserFileInfo)
567 IPC_STRUCT_TRAITS_MEMBER(file_path) 578 IPC_STRUCT_TRAITS_MEMBER(file_path)
568 IPC_STRUCT_TRAITS_MEMBER(display_name) 579 IPC_STRUCT_TRAITS_MEMBER(display_name)
569 IPC_STRUCT_TRAITS_MEMBER(file_system_url) 580 IPC_STRUCT_TRAITS_MEMBER(file_system_url)
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 std::string /* name */, 815 std::string /* name */,
805 std::string /* unique_name */) 816 std::string /* unique_name */)
806 817
807 // Updates replicated ContentSecurityPolicy in a frame proxy. 818 // Updates replicated ContentSecurityPolicy in a frame proxy.
808 IPC_MESSAGE_ROUTED1(FrameMsg_AddContentSecurityPolicy, 819 IPC_MESSAGE_ROUTED1(FrameMsg_AddContentSecurityPolicy,
809 content::ContentSecurityPolicyHeader) 820 content::ContentSecurityPolicyHeader)
810 821
811 // Resets ContentSecurityPolicy in a frame proxy / in RemoteSecurityContext. 822 // Resets ContentSecurityPolicy in a frame proxy / in RemoteSecurityContext.
812 IPC_MESSAGE_ROUTED0(FrameMsg_ResetContentSecurityPolicy) 823 IPC_MESSAGE_ROUTED0(FrameMsg_ResetContentSecurityPolicy)
813 824
825 // Reports Content Security Policy violation from within the target frame.
826 // This is useful if the CSP violation has been detected in another process
827 // (e.g. in another renderer process - https://crbug.com/611232 or [in the
828 // future] in the browser process - https://crbug.com/376522). In this case
829 // we need to notify the frame where Content Security Policy originated from
830 // so that *this* frame can raise SecurityPolicyViolationEvent event (and do
831 // other things needed to finish reporting the violation).
832 IPC_MESSAGE_ROUTED1(FrameMsg_ReportContentSecurityPolicyViolation,
833 content::ContentSecurityPolicyViolation)
834
814 // Update a proxy's replicated enforcement of insecure request policy. 835 // Update a proxy's replicated enforcement of insecure request policy.
815 // Used when the frame's policy is changed in another process. 836 // Used when the frame's policy is changed in another process.
816 IPC_MESSAGE_ROUTED1(FrameMsg_EnforceInsecureRequestPolicy, 837 IPC_MESSAGE_ROUTED1(FrameMsg_EnforceInsecureRequestPolicy,
817 blink::WebInsecureRequestPolicy) 838 blink::WebInsecureRequestPolicy)
818 839
819 // Update a proxy's replicated origin. Used when the frame is navigated to a 840 // Update a proxy's replicated origin. Used when the frame is navigated to a
820 // new origin. 841 // new origin.
821 IPC_MESSAGE_ROUTED2(FrameMsg_DidUpdateOrigin, 842 IPC_MESSAGE_ROUTED2(FrameMsg_DidUpdateOrigin,
822 url::Origin /* origin */, 843 url::Origin /* origin */,
823 bool /* is potentially trustworthy unique origin */) 844 bool /* is potentially trustworthy unique origin */)
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 1076
1056 // Notifies the browser process about a new Content Security Policy that needs 1077 // Notifies the browser process about a new Content Security Policy that needs
1057 // to be applies to the frame. This message is sent when a frame commits 1078 // to be applies to the frame. This message is sent when a frame commits
1058 // navigation to a new location (reporting accumulated policies from HTTP 1079 // navigation to a new location (reporting accumulated policies from HTTP
1059 // headers and/or policies that might have been inherited from the parent frame) 1080 // headers and/or policies that might have been inherited from the parent frame)
1060 // or when a new policy has been discovered afterwards (i.e. found in a 1081 // or when a new policy has been discovered afterwards (i.e. found in a
1061 // dynamically added or a static <meta> element). 1082 // dynamically added or a static <meta> element).
1062 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidAddContentSecurityPolicy, 1083 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidAddContentSecurityPolicy,
1063 content::ContentSecurityPolicyHeader) 1084 content::ContentSecurityPolicyHeader)
1064 1085
1086 // Asks the browser to forward a Content Security Policy violation from a frame
1087 // proxy to the real frame. See also
1088 // FrameMsg_ReportContentSecurityPolicyViolation.
1089 IPC_MESSAGE_ROUTED1(FrameHostMsg_ForwardContentSecurityPolicyViolation,
1090 content::ContentSecurityPolicyViolation)
1091
1065 // Sent when the frame starts enforcing an insecure request policy. Sending 1092 // Sent when the frame starts enforcing an insecure request policy. Sending
1066 // this information in DidCommitProvisionalLoad isn't sufficient; this 1093 // this information in DidCommitProvisionalLoad isn't sufficient; this
1067 // message is needed because, for example, a document can dynamically insert 1094 // message is needed because, for example, a document can dynamically insert
1068 // a <meta> tag that causes strict mixed content checking to be enforced. 1095 // a <meta> tag that causes strict mixed content checking to be enforced.
1069 IPC_MESSAGE_ROUTED1(FrameHostMsg_EnforceInsecureRequestPolicy, 1096 IPC_MESSAGE_ROUTED1(FrameHostMsg_EnforceInsecureRequestPolicy,
1070 blink::WebInsecureRequestPolicy) 1097 blink::WebInsecureRequestPolicy)
1071 1098
1072 // Sent when the frame is set to a unique origin. TODO(estark): this IPC 1099 // Sent when the frame is set to a unique origin. TODO(estark): this IPC
1073 // only exists to support dynamic sandboxing via a CSP delivered in a 1100 // only exists to support dynamic sandboxing via a CSP delivered in a
1074 // <meta> tag. This is not supposed to be allowed per the CSP spec and 1101 // <meta> tag. This is not supposed to be allowed per the CSP spec and
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
1568 // nearest find result in the sending frame. 1595 // nearest find result in the sending frame.
1569 IPC_MESSAGE_ROUTED2(FrameHostMsg_GetNearestFindResult_Reply, 1596 IPC_MESSAGE_ROUTED2(FrameHostMsg_GetNearestFindResult_Reply,
1570 int /* nfr_request_id */, 1597 int /* nfr_request_id */,
1571 float /* distance */) 1598 float /* distance */)
1572 #endif 1599 #endif
1573 1600
1574 // Adding a new message? Stick to the sort order above: first platform 1601 // Adding a new message? Stick to the sort order above: first platform
1575 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then 1602 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then
1576 // platform independent FrameHostMsg, then ifdefs for platform specific 1603 // platform independent FrameHostMsg, then ifdefs for platform specific
1577 // FrameHostMsg. 1604 // FrameHostMsg.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698