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

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

Issue 1957783002: Replicate Content-Security-Policy into remote frame proxies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 // 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/frame_message_enums.h" 22 #include "content/common/frame_message_enums.h"
22 #include "content/common/frame_replication_state.h" 23 #include "content/common/frame_replication_state.h"
23 #include "content/common/navigation_gesture.h" 24 #include "content/common/navigation_gesture.h"
24 #include "content/common/navigation_params.h" 25 #include "content/common/navigation_params.h"
25 #include "content/common/resource_request_body.h" 26 #include "content/common/resource_request_body.h"
26 #include "content/common/savable_subframe.h" 27 #include "content/common/savable_subframe.h"
27 #include "content/public/common/color_suggestion.h" 28 #include "content/public/common/color_suggestion.h"
28 #include "content/public/common/common_param_traits.h" 29 #include "content/public/common/common_param_traits.h"
29 #include "content/public/common/console_message_level.h" 30 #include "content/public/common/console_message_level.h"
30 #include "content/public/common/context_menu_params.h" 31 #include "content/public/common/context_menu_params.h"
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 #if defined(OS_ANDROID) 381 #if defined(OS_ANDROID)
381 IPC_STRUCT_TRAITS_MEMBER(data_url_as_string) 382 IPC_STRUCT_TRAITS_MEMBER(data_url_as_string)
382 #endif 383 #endif
383 IPC_STRUCT_TRAITS_END() 384 IPC_STRUCT_TRAITS_END()
384 385
385 IPC_STRUCT_TRAITS_BEGIN(content::FrameReplicationState) 386 IPC_STRUCT_TRAITS_BEGIN(content::FrameReplicationState)
386 IPC_STRUCT_TRAITS_MEMBER(origin) 387 IPC_STRUCT_TRAITS_MEMBER(origin)
387 IPC_STRUCT_TRAITS_MEMBER(sandbox_flags) 388 IPC_STRUCT_TRAITS_MEMBER(sandbox_flags)
388 IPC_STRUCT_TRAITS_MEMBER(name) 389 IPC_STRUCT_TRAITS_MEMBER(name)
389 IPC_STRUCT_TRAITS_MEMBER(unique_name) 390 IPC_STRUCT_TRAITS_MEMBER(unique_name)
391 IPC_STRUCT_TRAITS_MEMBER(accumulated_csp_headers)
390 IPC_STRUCT_TRAITS_MEMBER(scope) 392 IPC_STRUCT_TRAITS_MEMBER(scope)
391 IPC_STRUCT_TRAITS_MEMBER(should_enforce_strict_mixed_content_checking) 393 IPC_STRUCT_TRAITS_MEMBER(should_enforce_strict_mixed_content_checking)
392 IPC_STRUCT_TRAITS_MEMBER(has_potentially_trustworthy_unique_origin) 394 IPC_STRUCT_TRAITS_MEMBER(has_potentially_trustworthy_unique_origin)
393 IPC_STRUCT_TRAITS_END() 395 IPC_STRUCT_TRAITS_END()
394 396
395 IPC_STRUCT_BEGIN(FrameMsg_NewFrame_WidgetParams) 397 IPC_STRUCT_BEGIN(FrameMsg_NewFrame_WidgetParams)
396 // Gives the routing ID for the RenderWidget that will be attached to the 398 // Gives the routing ID for the RenderWidget that will be attached to the
397 // new RenderFrame. If the RenderFrame does not need a RenderWidget, this 399 // new RenderFrame. If the RenderFrame does not need a RenderWidget, this
398 // is MSG_ROUTING_NONE and the other parameters are not read. 400 // is MSG_ROUTING_NONE and the other parameters are not read.
399 IPC_STRUCT_MEMBER(int, routing_id) 401 IPC_STRUCT_MEMBER(int, routing_id)
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 537
536 IPC_STRUCT_BEGIN(FrameHostMsg_CreateChildFrame_Params) 538 IPC_STRUCT_BEGIN(FrameHostMsg_CreateChildFrame_Params)
537 IPC_STRUCT_MEMBER(int32_t, parent_routing_id) 539 IPC_STRUCT_MEMBER(int32_t, parent_routing_id)
538 IPC_STRUCT_MEMBER(blink::WebTreeScopeType, scope) 540 IPC_STRUCT_MEMBER(blink::WebTreeScopeType, scope)
539 IPC_STRUCT_MEMBER(std::string, frame_name) 541 IPC_STRUCT_MEMBER(std::string, frame_name)
540 IPC_STRUCT_MEMBER(std::string, frame_unique_name) 542 IPC_STRUCT_MEMBER(std::string, frame_unique_name)
541 IPC_STRUCT_MEMBER(blink::WebSandboxFlags, sandbox_flags) 543 IPC_STRUCT_MEMBER(blink::WebSandboxFlags, sandbox_flags)
542 IPC_STRUCT_MEMBER(blink::WebFrameOwnerProperties, frame_owner_properties) 544 IPC_STRUCT_MEMBER(blink::WebFrameOwnerProperties, frame_owner_properties)
543 IPC_STRUCT_END() 545 IPC_STRUCT_END()
544 546
547 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicyHeader)
548 IPC_STRUCT_TRAITS_MEMBER(header_value)
549 IPC_STRUCT_TRAITS_MEMBER(type)
550 IPC_STRUCT_TRAITS_MEMBER(source)
551 IPC_STRUCT_TRAITS_END()
552
545 #if defined(OS_MACOSX) || defined(OS_ANDROID) 553 #if defined(OS_MACOSX) || defined(OS_ANDROID)
546 // This message is used for supporting popup menus on Mac OS X and Android using 554 // This message is used for supporting popup menus on Mac OS X and Android using
547 // native controls. See the FrameHostMsg_ShowPopup message. 555 // native controls. See the FrameHostMsg_ShowPopup message.
548 IPC_STRUCT_BEGIN(FrameHostMsg_ShowPopup_Params) 556 IPC_STRUCT_BEGIN(FrameHostMsg_ShowPopup_Params)
549 // Position on the screen. 557 // Position on the screen.
550 IPC_STRUCT_MEMBER(gfx::Rect, bounds) 558 IPC_STRUCT_MEMBER(gfx::Rect, bounds)
551 559
552 // The height of each item in the menu. 560 // The height of each item in the menu.
553 IPC_STRUCT_MEMBER(int, item_height) 561 IPC_STRUCT_MEMBER(int, item_height)
554 562
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 773
766 // Notifies the frame that its parent has changed the frame's sandbox flags. 774 // Notifies the frame that its parent has changed the frame's sandbox flags.
767 IPC_MESSAGE_ROUTED1(FrameMsg_DidUpdateSandboxFlags, blink::WebSandboxFlags) 775 IPC_MESSAGE_ROUTED1(FrameMsg_DidUpdateSandboxFlags, blink::WebSandboxFlags)
768 776
769 // Update a proxy's window.name property. Used when the frame's name is 777 // Update a proxy's window.name property. Used when the frame's name is
770 // changed in another process. 778 // changed in another process.
771 IPC_MESSAGE_ROUTED2(FrameMsg_DidUpdateName, 779 IPC_MESSAGE_ROUTED2(FrameMsg_DidUpdateName,
772 std::string /* name */, 780 std::string /* name */,
773 std::string /* unique_name */) 781 std::string /* unique_name */)
774 782
783 // Updates ContentSecurityPolicy in a frame proxy / in RemoteSecurityContext.
alexmos 2016/05/11 19:46:40 nit: Updates replicated ContentSecurityPolicy in a
Łukasz Anforowicz 2016/05/11 23:14:48 Done.
alexmos 2016/05/12 22:37:24 Acknowledged.
784 IPC_MESSAGE_ROUTED1(FrameMsg_AddContentSecurityPolicy,
785 content::ContentSecurityPolicyHeader)
786
787 // Resets ContentSecurityPolicy in a frame proxy / in RemoteSecurityContext.
788 IPC_MESSAGE_ROUTED0(FrameMsg_ResetContentSecurityPolicy)
789
775 // Update a proxy's replicated enforcement of strict mixed content 790 // Update a proxy's replicated enforcement of strict mixed content
776 // checking. Used when the frame's mixed content setting is changed in 791 // checking. Used when the frame's mixed content setting is changed in
777 // another process. 792 // another process.
778 IPC_MESSAGE_ROUTED1(FrameMsg_EnforceStrictMixedContentChecking, 793 IPC_MESSAGE_ROUTED1(FrameMsg_EnforceStrictMixedContentChecking,
779 bool /* should enforce */) 794 bool /* should enforce */)
780 795
781 // Update a proxy's replicated origin. Used when the frame is navigated to a 796 // Update a proxy's replicated origin. Used when the frame is navigated to a
782 // new origin. 797 // new origin.
783 IPC_MESSAGE_ROUTED2(FrameMsg_DidUpdateOrigin, 798 IPC_MESSAGE_ROUTED2(FrameMsg_DidUpdateOrigin,
784 url::Origin /* origin */, 799 url::Origin /* origin */,
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidStopLoading) 974 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidStopLoading)
960 975
961 // Notifies the browser that this frame has new session history information. 976 // Notifies the browser that this frame has new session history information.
962 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateState, content::PageState /* state */) 977 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateState, content::PageState /* state */)
963 978
964 // Sent when the frame changes its window.name. 979 // Sent when the frame changes its window.name.
965 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeName, 980 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeName,
966 std::string /* name */, 981 std::string /* name */,
967 std::string /* unique_name */) 982 std::string /* unique_name */)
968 983
984 // Sent when the frame parsed a new Content Security Policy.
985 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidAddContentSecurityPolicy,
986 content::ContentSecurityPolicyHeader)
987
969 // Sent when the frame starts enforcing strict mixed content 988 // Sent when the frame starts enforcing strict mixed content
970 // checking. Sending this information in DidCommitProvisionalLoad isn't 989 // checking. Sending this information in DidCommitProvisionalLoad isn't
971 // sufficient; this message is needed because, for example, a document 990 // sufficient; this message is needed because, for example, a document
972 // can dynamically insert a <meta> tag that causes strict mixed content 991 // can dynamically insert a <meta> tag that causes strict mixed content
973 // checking to be enforced. 992 // checking to be enforced.
974 IPC_MESSAGE_ROUTED0(FrameHostMsg_EnforceStrictMixedContentChecking) 993 IPC_MESSAGE_ROUTED0(FrameHostMsg_EnforceStrictMixedContentChecking)
975 994
976 // Sent when the frame is set to a unique origin. TODO(estark): this IPC 995 // Sent when the frame is set to a unique origin. TODO(estark): this IPC
977 // only exists to support dynamic sandboxing via a CSP delivered in a 996 // only exists to support dynamic sandboxing via a CSP delivered in a
978 // <meta> tag. This is not supposed to be allowed per the CSP spec and 997 // <meta> tag. This is not supposed to be allowed per the CSP spec and
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1446 IPC_MESSAGE_ROUTED3(FrameHostMsg_FindMatchRects_Reply, 1465 IPC_MESSAGE_ROUTED3(FrameHostMsg_FindMatchRects_Reply,
1447 int /* version */, 1466 int /* version */,
1448 std::vector<gfx::RectF> /* rects */, 1467 std::vector<gfx::RectF> /* rects */,
1449 gfx::RectF /* active_rect */) 1468 gfx::RectF /* active_rect */)
1450 #endif 1469 #endif
1451 1470
1452 // Adding a new message? Stick to the sort order above: first platform 1471 // Adding a new message? Stick to the sort order above: first platform
1453 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then 1472 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then
1454 // platform independent FrameHostMsg, then ifdefs for platform specific 1473 // platform independent FrameHostMsg, then ifdefs for platform specific
1455 // FrameHostMsg. 1474 // FrameHostMsg.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698