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