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_info.h" | 18 #include "cc/surfaces/surface_info.h" |
19 #include "cc/surfaces/surface_sequence.h" | 19 #include "cc/surfaces/surface_sequence.h" |
20 #include "content/common/content_export.h" | 20 #include "content/common/content_export.h" |
21 #include "content/common/content_param_traits.h" | 21 #include "content/common/content_param_traits.h" |
| 22 #include "content/common/content_security_policy/content_security_policy.h" |
22 #include "content/common/content_security_policy_header.h" | 23 #include "content/common/content_security_policy_header.h" |
23 #include "content/common/download/mhtml_save_status.h" | 24 #include "content/common/download/mhtml_save_status.h" |
24 #include "content/common/frame_message_enums.h" | 25 #include "content/common/frame_message_enums.h" |
25 #include "content/common/frame_owner_properties.h" | 26 #include "content/common/frame_owner_properties.h" |
26 #include "content/common/frame_replication_state.h" | 27 #include "content/common/frame_replication_state.h" |
27 #include "content/common/navigation_gesture.h" | 28 #include "content/common/navigation_gesture.h" |
28 #include "content/common/navigation_params.h" | 29 #include "content/common/navigation_params.h" |
29 #include "content/common/savable_subframe.h" | 30 #include "content/common/savable_subframe.h" |
30 #include "content/public/common/color_suggestion.h" | 31 #include "content/public/common/color_suggestion.h" |
31 #include "content/public/common/common_param_traits.h" | 32 #include "content/public/common/common_param_traits.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 content::STOP_FIND_ACTION_LAST) | 103 content::STOP_FIND_ACTION_LAST) |
103 IPC_ENUM_TRAITS(blink::WebSandboxFlags) // Bitmask. | 104 IPC_ENUM_TRAITS(blink::WebSandboxFlags) // Bitmask. |
104 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTreeScopeType, | 105 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTreeScopeType, |
105 blink::WebTreeScopeType::Last) | 106 blink::WebTreeScopeType::Last) |
106 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType, ui::MENU_SOURCE_TYPE_LAST) | 107 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType, ui::MENU_SOURCE_TYPE_LAST) |
107 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::PreviewsState, | 108 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::PreviewsState, |
108 content::PREVIEWS_UNSPECIFIED, | 109 content::PREVIEWS_UNSPECIFIED, |
109 content::PREVIEWS_STATE_LAST) | 110 content::PREVIEWS_STATE_LAST) |
110 IPC_ENUM_TRAITS_MAX_VALUE(content::FileChooserParams::Mode, | 111 IPC_ENUM_TRAITS_MAX_VALUE(content::FileChooserParams::Mode, |
111 content::FileChooserParams::Save) | 112 content::FileChooserParams::Save) |
| 113 IPC_ENUM_TRAITS_MAX_VALUE(content::CSPDirective::Name, |
| 114 content::CSPDirective::NameLast) |
112 | 115 |
113 IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions) | 116 IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions) |
114 IPC_STRUCT_TRAITS_MEMBER(forward) | 117 IPC_STRUCT_TRAITS_MEMBER(forward) |
115 IPC_STRUCT_TRAITS_MEMBER(matchCase) | 118 IPC_STRUCT_TRAITS_MEMBER(matchCase) |
116 IPC_STRUCT_TRAITS_MEMBER(findNext) | 119 IPC_STRUCT_TRAITS_MEMBER(findNext) |
117 IPC_STRUCT_TRAITS_MEMBER(force) | 120 IPC_STRUCT_TRAITS_MEMBER(force) |
118 IPC_STRUCT_TRAITS_END() | 121 IPC_STRUCT_TRAITS_END() |
119 | 122 |
120 IPC_STRUCT_TRAITS_BEGIN(content::ColorSuggestion) | 123 IPC_STRUCT_TRAITS_BEGIN(content::ColorSuggestion) |
121 IPC_STRUCT_TRAITS_MEMBER(color) | 124 IPC_STRUCT_TRAITS_MEMBER(color) |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 | 526 |
524 IPC_STRUCT_BEGIN(FrameHostMsg_CreateChildFrame_Params) | 527 IPC_STRUCT_BEGIN(FrameHostMsg_CreateChildFrame_Params) |
525 IPC_STRUCT_MEMBER(int32_t, parent_routing_id) | 528 IPC_STRUCT_MEMBER(int32_t, parent_routing_id) |
526 IPC_STRUCT_MEMBER(blink::WebTreeScopeType, scope) | 529 IPC_STRUCT_MEMBER(blink::WebTreeScopeType, scope) |
527 IPC_STRUCT_MEMBER(std::string, frame_name) | 530 IPC_STRUCT_MEMBER(std::string, frame_name) |
528 IPC_STRUCT_MEMBER(std::string, frame_unique_name) | 531 IPC_STRUCT_MEMBER(std::string, frame_unique_name) |
529 IPC_STRUCT_MEMBER(blink::WebSandboxFlags, sandbox_flags) | 532 IPC_STRUCT_MEMBER(blink::WebSandboxFlags, sandbox_flags) |
530 IPC_STRUCT_MEMBER(content::FrameOwnerProperties, frame_owner_properties) | 533 IPC_STRUCT_MEMBER(content::FrameOwnerProperties, frame_owner_properties) |
531 IPC_STRUCT_END() | 534 IPC_STRUCT_END() |
532 | 535 |
| 536 IPC_STRUCT_TRAITS_BEGIN(content::CSPSource) |
| 537 IPC_STRUCT_TRAITS_MEMBER(scheme) |
| 538 IPC_STRUCT_TRAITS_MEMBER(host) |
| 539 IPC_STRUCT_TRAITS_MEMBER(is_host_wildcard) |
| 540 IPC_STRUCT_TRAITS_MEMBER(port) |
| 541 IPC_STRUCT_TRAITS_MEMBER(is_port_wildcard) |
| 542 IPC_STRUCT_TRAITS_MEMBER(path) |
| 543 IPC_STRUCT_TRAITS_END() |
| 544 |
| 545 IPC_STRUCT_TRAITS_BEGIN(content::CSPSourceList) |
| 546 IPC_STRUCT_TRAITS_MEMBER(allow_self) |
| 547 IPC_STRUCT_TRAITS_MEMBER(allow_star) |
| 548 IPC_STRUCT_TRAITS_MEMBER(sources) |
| 549 IPC_STRUCT_TRAITS_END() |
| 550 |
| 551 IPC_STRUCT_TRAITS_BEGIN(content::CSPDirective) |
| 552 IPC_STRUCT_TRAITS_MEMBER(name) |
| 553 IPC_STRUCT_TRAITS_MEMBER(source_list) |
| 554 IPC_STRUCT_TRAITS_END() |
| 555 |
| 556 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicy) |
| 557 IPC_STRUCT_TRAITS_MEMBER(disposition) |
| 558 IPC_STRUCT_TRAITS_MEMBER(source) |
| 559 IPC_STRUCT_TRAITS_MEMBER(directives) |
| 560 IPC_STRUCT_TRAITS_MEMBER(report_endpoints) |
| 561 IPC_STRUCT_TRAITS_END() |
| 562 |
533 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicyHeader) | 563 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicyHeader) |
534 IPC_STRUCT_TRAITS_MEMBER(header_value) | 564 IPC_STRUCT_TRAITS_MEMBER(header_value) |
535 IPC_STRUCT_TRAITS_MEMBER(type) | 565 IPC_STRUCT_TRAITS_MEMBER(type) |
536 IPC_STRUCT_TRAITS_MEMBER(source) | 566 IPC_STRUCT_TRAITS_MEMBER(source) |
537 IPC_STRUCT_TRAITS_END() | 567 IPC_STRUCT_TRAITS_END() |
538 | 568 |
539 IPC_STRUCT_TRAITS_BEGIN(content::FormFieldData) | 569 IPC_STRUCT_TRAITS_BEGIN(content::FormFieldData) |
540 IPC_STRUCT_TRAITS_MEMBER(text) | 570 IPC_STRUCT_TRAITS_MEMBER(text) |
541 IPC_STRUCT_TRAITS_MEMBER(placeholder) | 571 IPC_STRUCT_TRAITS_MEMBER(placeholder) |
542 IPC_STRUCT_TRAITS_MEMBER(text_input_type) | 572 IPC_STRUCT_TRAITS_MEMBER(text_input_type) |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1044 // a list of an origin whitelist for each feature in the policy. | 1074 // a list of an origin whitelist for each feature in the policy. |
1045 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidSetFeaturePolicyHeader, | 1075 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidSetFeaturePolicyHeader, |
1046 content::ParsedFeaturePolicyHeader /* parsed_header */) | 1076 content::ParsedFeaturePolicyHeader /* parsed_header */) |
1047 | 1077 |
1048 // Notifies the browser process about a new Content Security Policy that needs | 1078 // Notifies the browser process about a new Content Security Policy that needs |
1049 // to be applies to the frame. This message is sent when a frame commits | 1079 // to be applies to the frame. This message is sent when a frame commits |
1050 // navigation to a new location (reporting accumulated policies from HTTP | 1080 // navigation to a new location (reporting accumulated policies from HTTP |
1051 // headers and/or policies that might have been inherited from the parent frame) | 1081 // headers and/or policies that might have been inherited from the parent frame) |
1052 // or when a new policy has been discovered afterwards (i.e. found in a | 1082 // or when a new policy has been discovered afterwards (i.e. found in a |
1053 // dynamically added or a static <meta> element). | 1083 // dynamically added or a static <meta> element). |
1054 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidAddContentSecurityPolicy, | 1084 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidAddContentSecurityPolicy, |
1055 content::ContentSecurityPolicyHeader) | 1085 content::ContentSecurityPolicyHeader, |
| 1086 std::vector<content::ContentSecurityPolicy>) |
1056 | 1087 |
1057 // Sent when the frame starts enforcing an insecure request policy. Sending | 1088 // Sent when the frame starts enforcing an insecure request policy. Sending |
1058 // this information in DidCommitProvisionalLoad isn't sufficient; this | 1089 // this information in DidCommitProvisionalLoad isn't sufficient; this |
1059 // message is needed because, for example, a document can dynamically insert | 1090 // message is needed because, for example, a document can dynamically insert |
1060 // a <meta> tag that causes strict mixed content checking to be enforced. | 1091 // a <meta> tag that causes strict mixed content checking to be enforced. |
1061 IPC_MESSAGE_ROUTED1(FrameHostMsg_EnforceInsecureRequestPolicy, | 1092 IPC_MESSAGE_ROUTED1(FrameHostMsg_EnforceInsecureRequestPolicy, |
1062 blink::WebInsecureRequestPolicy) | 1093 blink::WebInsecureRequestPolicy) |
1063 | 1094 |
1064 // Sent when the frame is set to a unique origin. TODO(estark): this IPC | 1095 // Sent when the frame is set to a unique origin. TODO(estark): this IPC |
1065 // only exists to support dynamic sandboxing via a CSP delivered in a | 1096 // only exists to support dynamic sandboxing via a CSP delivered in a |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1590 // nearest find result in the sending frame. | 1621 // nearest find result in the sending frame. |
1591 IPC_MESSAGE_ROUTED2(FrameHostMsg_GetNearestFindResult_Reply, | 1622 IPC_MESSAGE_ROUTED2(FrameHostMsg_GetNearestFindResult_Reply, |
1592 int /* nfr_request_id */, | 1623 int /* nfr_request_id */, |
1593 float /* distance */) | 1624 float /* distance */) |
1594 #endif | 1625 #endif |
1595 | 1626 |
1596 // Adding a new message? Stick to the sort order above: first platform | 1627 // Adding a new message? Stick to the sort order above: first platform |
1597 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then | 1628 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then |
1598 // platform independent FrameHostMsg, then ifdefs for platform specific | 1629 // platform independent FrameHostMsg, then ifdefs for platform specific |
1599 // FrameHostMsg. | 1630 // FrameHostMsg. |
OLD | NEW |