| OLD | NEW |
| 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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 #if defined(OS_ANDROID) | 380 #if defined(OS_ANDROID) |
| 380 IPC_STRUCT_TRAITS_MEMBER(data_url_as_string) | 381 IPC_STRUCT_TRAITS_MEMBER(data_url_as_string) |
| 381 #endif | 382 #endif |
| 382 IPC_STRUCT_TRAITS_END() | 383 IPC_STRUCT_TRAITS_END() |
| 383 | 384 |
| 384 IPC_STRUCT_TRAITS_BEGIN(content::FrameReplicationState) | 385 IPC_STRUCT_TRAITS_BEGIN(content::FrameReplicationState) |
| 385 IPC_STRUCT_TRAITS_MEMBER(origin) | 386 IPC_STRUCT_TRAITS_MEMBER(origin) |
| 386 IPC_STRUCT_TRAITS_MEMBER(sandbox_flags) | 387 IPC_STRUCT_TRAITS_MEMBER(sandbox_flags) |
| 387 IPC_STRUCT_TRAITS_MEMBER(name) | 388 IPC_STRUCT_TRAITS_MEMBER(name) |
| 388 IPC_STRUCT_TRAITS_MEMBER(unique_name) | 389 IPC_STRUCT_TRAITS_MEMBER(unique_name) |
| 390 IPC_STRUCT_TRAITS_MEMBER(accumulated_csp_headers) |
| 389 IPC_STRUCT_TRAITS_MEMBER(scope) | 391 IPC_STRUCT_TRAITS_MEMBER(scope) |
| 390 IPC_STRUCT_TRAITS_MEMBER(should_enforce_strict_mixed_content_checking) | 392 IPC_STRUCT_TRAITS_MEMBER(should_enforce_strict_mixed_content_checking) |
| 391 IPC_STRUCT_TRAITS_MEMBER(has_potentially_trustworthy_unique_origin) | 393 IPC_STRUCT_TRAITS_MEMBER(has_potentially_trustworthy_unique_origin) |
| 392 IPC_STRUCT_TRAITS_END() | 394 IPC_STRUCT_TRAITS_END() |
| 393 | 395 |
| 394 IPC_STRUCT_BEGIN(FrameMsg_NewFrame_WidgetParams) | 396 IPC_STRUCT_BEGIN(FrameMsg_NewFrame_WidgetParams) |
| 395 // Gives the routing ID for the RenderWidget that will be attached to the | 397 // Gives the routing ID for the RenderWidget that will be attached to the |
| 396 // new RenderFrame. If the RenderFrame does not need a RenderWidget, this | 398 // new RenderFrame. If the RenderFrame does not need a RenderWidget, this |
| 397 // is MSG_ROUTING_NONE and the other parameters are not read. | 399 // is MSG_ROUTING_NONE and the other parameters are not read. |
| 398 IPC_STRUCT_MEMBER(int, routing_id) | 400 IPC_STRUCT_MEMBER(int, routing_id) |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 | 536 |
| 535 IPC_STRUCT_BEGIN(FrameHostMsg_CreateChildFrame_Params) | 537 IPC_STRUCT_BEGIN(FrameHostMsg_CreateChildFrame_Params) |
| 536 IPC_STRUCT_MEMBER(int32_t, parent_routing_id) | 538 IPC_STRUCT_MEMBER(int32_t, parent_routing_id) |
| 537 IPC_STRUCT_MEMBER(blink::WebTreeScopeType, scope) | 539 IPC_STRUCT_MEMBER(blink::WebTreeScopeType, scope) |
| 538 IPC_STRUCT_MEMBER(std::string, frame_name) | 540 IPC_STRUCT_MEMBER(std::string, frame_name) |
| 539 IPC_STRUCT_MEMBER(std::string, frame_unique_name) | 541 IPC_STRUCT_MEMBER(std::string, frame_unique_name) |
| 540 IPC_STRUCT_MEMBER(blink::WebSandboxFlags, sandbox_flags) | 542 IPC_STRUCT_MEMBER(blink::WebSandboxFlags, sandbox_flags) |
| 541 IPC_STRUCT_MEMBER(blink::WebFrameOwnerProperties, frame_owner_properties) | 543 IPC_STRUCT_MEMBER(blink::WebFrameOwnerProperties, frame_owner_properties) |
| 542 IPC_STRUCT_END() | 544 IPC_STRUCT_END() |
| 543 | 545 |
| 546 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicyHeader) |
| 547 IPC_STRUCT_TRAITS_MEMBER(header_value) |
| 548 IPC_STRUCT_TRAITS_MEMBER(type) |
| 549 IPC_STRUCT_TRAITS_MEMBER(source) |
| 550 IPC_STRUCT_TRAITS_END() |
| 551 |
| 544 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 552 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 545 // This message is used for supporting popup menus on Mac OS X and Android using | 553 // This message is used for supporting popup menus on Mac OS X and Android using |
| 546 // native controls. See the FrameHostMsg_ShowPopup message. | 554 // native controls. See the FrameHostMsg_ShowPopup message. |
| 547 IPC_STRUCT_BEGIN(FrameHostMsg_ShowPopup_Params) | 555 IPC_STRUCT_BEGIN(FrameHostMsg_ShowPopup_Params) |
| 548 // Position on the screen. | 556 // Position on the screen. |
| 549 IPC_STRUCT_MEMBER(gfx::Rect, bounds) | 557 IPC_STRUCT_MEMBER(gfx::Rect, bounds) |
| 550 | 558 |
| 551 // The height of each item in the menu. | 559 // The height of each item in the menu. |
| 552 IPC_STRUCT_MEMBER(int, item_height) | 560 IPC_STRUCT_MEMBER(int, item_height) |
| 553 | 561 |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 | 772 |
| 765 // Notifies the frame that its parent has changed the frame's sandbox flags. | 773 // Notifies the frame that its parent has changed the frame's sandbox flags. |
| 766 IPC_MESSAGE_ROUTED1(FrameMsg_DidUpdateSandboxFlags, blink::WebSandboxFlags) | 774 IPC_MESSAGE_ROUTED1(FrameMsg_DidUpdateSandboxFlags, blink::WebSandboxFlags) |
| 767 | 775 |
| 768 // Update a proxy's window.name property. Used when the frame's name is | 776 // Update a proxy's window.name property. Used when the frame's name is |
| 769 // changed in another process. | 777 // changed in another process. |
| 770 IPC_MESSAGE_ROUTED2(FrameMsg_DidUpdateName, | 778 IPC_MESSAGE_ROUTED2(FrameMsg_DidUpdateName, |
| 771 std::string /* name */, | 779 std::string /* name */, |
| 772 std::string /* unique_name */) | 780 std::string /* unique_name */) |
| 773 | 781 |
| 782 // Updates replicated ContentSecurityPolicy in a frame proxy. |
| 783 IPC_MESSAGE_ROUTED1(FrameMsg_AddContentSecurityPolicy, |
| 784 content::ContentSecurityPolicyHeader) |
| 785 |
| 786 // Resets ContentSecurityPolicy in a frame proxy / in RemoteSecurityContext. |
| 787 IPC_MESSAGE_ROUTED0(FrameMsg_ResetContentSecurityPolicy) |
| 788 |
| 774 // Update a proxy's replicated enforcement of strict mixed content | 789 // Update a proxy's replicated enforcement of strict mixed content |
| 775 // checking. Used when the frame's mixed content setting is changed in | 790 // checking. Used when the frame's mixed content setting is changed in |
| 776 // another process. | 791 // another process. |
| 777 IPC_MESSAGE_ROUTED1(FrameMsg_EnforceStrictMixedContentChecking, | 792 IPC_MESSAGE_ROUTED1(FrameMsg_EnforceStrictMixedContentChecking, |
| 778 bool /* should enforce */) | 793 bool /* should enforce */) |
| 779 | 794 |
| 780 // Update a proxy's replicated origin. Used when the frame is navigated to a | 795 // Update a proxy's replicated origin. Used when the frame is navigated to a |
| 781 // new origin. | 796 // new origin. |
| 782 IPC_MESSAGE_ROUTED2(FrameMsg_DidUpdateOrigin, | 797 IPC_MESSAGE_ROUTED2(FrameMsg_DidUpdateOrigin, |
| 783 url::Origin /* origin */, | 798 url::Origin /* origin */, |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidStopLoading) | 973 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidStopLoading) |
| 959 | 974 |
| 960 // Notifies the browser that this frame has new session history information. | 975 // Notifies the browser that this frame has new session history information. |
| 961 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateState, content::PageState /* state */) | 976 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateState, content::PageState /* state */) |
| 962 | 977 |
| 963 // Sent when the frame changes its window.name. | 978 // Sent when the frame changes its window.name. |
| 964 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeName, | 979 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeName, |
| 965 std::string /* name */, | 980 std::string /* name */, |
| 966 std::string /* unique_name */) | 981 std::string /* unique_name */) |
| 967 | 982 |
| 983 // Notifies the browser process about a new Content Security Policy that needs |
| 984 // to be applies to the frame. This message is sent when a frame commits |
| 985 // navigation to a new location (reporting accumulated policies from HTTP |
| 986 // headers and/or policies that might have been inherited from the parent frame) |
| 987 // or when a new policy has been discovered afterwards (i.e. found in a |
| 988 // dynamically added or a static <meta> element). |
| 989 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidAddContentSecurityPolicy, |
| 990 content::ContentSecurityPolicyHeader) |
| 991 |
| 968 // Sent when the frame starts enforcing strict mixed content | 992 // Sent when the frame starts enforcing strict mixed content |
| 969 // checking. Sending this information in DidCommitProvisionalLoad isn't | 993 // checking. Sending this information in DidCommitProvisionalLoad isn't |
| 970 // sufficient; this message is needed because, for example, a document | 994 // sufficient; this message is needed because, for example, a document |
| 971 // can dynamically insert a <meta> tag that causes strict mixed content | 995 // can dynamically insert a <meta> tag that causes strict mixed content |
| 972 // checking to be enforced. | 996 // checking to be enforced. |
| 973 IPC_MESSAGE_ROUTED0(FrameHostMsg_EnforceStrictMixedContentChecking) | 997 IPC_MESSAGE_ROUTED0(FrameHostMsg_EnforceStrictMixedContentChecking) |
| 974 | 998 |
| 975 // Sent when the frame is set to a unique origin. TODO(estark): this IPC | 999 // Sent when the frame is set to a unique origin. TODO(estark): this IPC |
| 976 // only exists to support dynamic sandboxing via a CSP delivered in a | 1000 // only exists to support dynamic sandboxing via a CSP delivered in a |
| 977 // <meta> tag. This is not supposed to be allowed per the CSP spec and | 1001 // <meta> tag. This is not supposed to be allowed per the CSP spec and |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1444 IPC_MESSAGE_ROUTED3(FrameHostMsg_FindMatchRects_Reply, | 1468 IPC_MESSAGE_ROUTED3(FrameHostMsg_FindMatchRects_Reply, |
| 1445 int /* version */, | 1469 int /* version */, |
| 1446 std::vector<gfx::RectF> /* rects */, | 1470 std::vector<gfx::RectF> /* rects */, |
| 1447 gfx::RectF /* active_rect */) | 1471 gfx::RectF /* active_rect */) |
| 1448 #endif | 1472 #endif |
| 1449 | 1473 |
| 1450 // Adding a new message? Stick to the sort order above: first platform | 1474 // Adding a new message? Stick to the sort order above: first platform |
| 1451 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then | 1475 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then |
| 1452 // platform independent FrameHostMsg, then ifdefs for platform specific | 1476 // platform independent FrameHostMsg, then ifdefs for platform specific |
| 1453 // FrameHostMsg. | 1477 // FrameHostMsg. |
| OLD | NEW |