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/csp_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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 content::STOP_FIND_ACTION_LAST) | 102 content::STOP_FIND_ACTION_LAST) |
102 IPC_ENUM_TRAITS(blink::WebSandboxFlags) // Bitmask. | 103 IPC_ENUM_TRAITS(blink::WebSandboxFlags) // Bitmask. |
103 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTreeScopeType, | 104 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTreeScopeType, |
104 blink::WebTreeScopeType::Last) | 105 blink::WebTreeScopeType::Last) |
105 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType, ui::MENU_SOURCE_TYPE_LAST) | 106 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType, ui::MENU_SOURCE_TYPE_LAST) |
106 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::PreviewsState, | 107 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::PreviewsState, |
107 content::PREVIEWS_UNSPECIFIED, | 108 content::PREVIEWS_UNSPECIFIED, |
108 content::PREVIEWS_STATE_LAST) | 109 content::PREVIEWS_STATE_LAST) |
109 IPC_ENUM_TRAITS_MAX_VALUE(content::FileChooserParams::Mode, | 110 IPC_ENUM_TRAITS_MAX_VALUE(content::FileChooserParams::Mode, |
110 content::FileChooserParams::Save) | 111 content::FileChooserParams::Save) |
| 112 IPC_ENUM_TRAITS_MAX_VALUE(content::CSPDirective::Name, |
| 113 content::CSPDirective::NameLast) |
111 | 114 |
112 IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions) | 115 IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions) |
113 IPC_STRUCT_TRAITS_MEMBER(forward) | 116 IPC_STRUCT_TRAITS_MEMBER(forward) |
114 IPC_STRUCT_TRAITS_MEMBER(matchCase) | 117 IPC_STRUCT_TRAITS_MEMBER(matchCase) |
115 IPC_STRUCT_TRAITS_MEMBER(findNext) | 118 IPC_STRUCT_TRAITS_MEMBER(findNext) |
116 IPC_STRUCT_TRAITS_MEMBER(force) | 119 IPC_STRUCT_TRAITS_MEMBER(force) |
117 IPC_STRUCT_TRAITS_END() | 120 IPC_STRUCT_TRAITS_END() |
118 | 121 |
119 IPC_STRUCT_TRAITS_BEGIN(content::ColorSuggestion) | 122 IPC_STRUCT_TRAITS_BEGIN(content::ColorSuggestion) |
120 IPC_STRUCT_TRAITS_MEMBER(color) | 123 IPC_STRUCT_TRAITS_MEMBER(color) |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 | 525 |
523 IPC_STRUCT_BEGIN(FrameHostMsg_CreateChildFrame_Params) | 526 IPC_STRUCT_BEGIN(FrameHostMsg_CreateChildFrame_Params) |
524 IPC_STRUCT_MEMBER(int32_t, parent_routing_id) | 527 IPC_STRUCT_MEMBER(int32_t, parent_routing_id) |
525 IPC_STRUCT_MEMBER(blink::WebTreeScopeType, scope) | 528 IPC_STRUCT_MEMBER(blink::WebTreeScopeType, scope) |
526 IPC_STRUCT_MEMBER(std::string, frame_name) | 529 IPC_STRUCT_MEMBER(std::string, frame_name) |
527 IPC_STRUCT_MEMBER(std::string, frame_unique_name) | 530 IPC_STRUCT_MEMBER(std::string, frame_unique_name) |
528 IPC_STRUCT_MEMBER(blink::WebSandboxFlags, sandbox_flags) | 531 IPC_STRUCT_MEMBER(blink::WebSandboxFlags, sandbox_flags) |
529 IPC_STRUCT_MEMBER(content::FrameOwnerProperties, frame_owner_properties) | 532 IPC_STRUCT_MEMBER(content::FrameOwnerProperties, frame_owner_properties) |
530 IPC_STRUCT_END() | 533 IPC_STRUCT_END() |
531 | 534 |
| 535 IPC_STRUCT_TRAITS_BEGIN(content::CSPSource) |
| 536 IPC_STRUCT_TRAITS_MEMBER(scheme) |
| 537 IPC_STRUCT_TRAITS_MEMBER(host) |
| 538 IPC_STRUCT_TRAITS_MEMBER(is_host_wildcard) |
| 539 IPC_STRUCT_TRAITS_MEMBER(port) |
| 540 IPC_STRUCT_TRAITS_MEMBER(is_port_wildcard) |
| 541 IPC_STRUCT_TRAITS_MEMBER(path) |
| 542 IPC_STRUCT_TRAITS_END() |
| 543 |
| 544 IPC_STRUCT_TRAITS_BEGIN(content::CSPSourceList) |
| 545 IPC_STRUCT_TRAITS_MEMBER(allow_self) |
| 546 IPC_STRUCT_TRAITS_MEMBER(allow_star) |
| 547 IPC_STRUCT_TRAITS_MEMBER(source_list) |
| 548 IPC_STRUCT_TRAITS_END() |
| 549 |
| 550 IPC_STRUCT_TRAITS_BEGIN(content::CSPDirective) |
| 551 IPC_STRUCT_TRAITS_MEMBER(name) |
| 552 IPC_STRUCT_TRAITS_MEMBER(source_list) |
| 553 IPC_STRUCT_TRAITS_END() |
| 554 |
| 555 IPC_STRUCT_TRAITS_BEGIN(content::CSPPolicy) |
| 556 IPC_STRUCT_TRAITS_MEMBER(disposition) |
| 557 IPC_STRUCT_TRAITS_MEMBER(source) |
| 558 IPC_STRUCT_TRAITS_MEMBER(directives) |
| 559 IPC_STRUCT_TRAITS_MEMBER(report_endpoints) |
| 560 IPC_STRUCT_TRAITS_END() |
| 561 |
532 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicyHeader) | 562 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicyHeader) |
533 IPC_STRUCT_TRAITS_MEMBER(header_value) | 563 IPC_STRUCT_TRAITS_MEMBER(header_value) |
534 IPC_STRUCT_TRAITS_MEMBER(type) | 564 IPC_STRUCT_TRAITS_MEMBER(type) |
535 IPC_STRUCT_TRAITS_MEMBER(source) | 565 IPC_STRUCT_TRAITS_MEMBER(source) |
536 IPC_STRUCT_TRAITS_END() | 566 IPC_STRUCT_TRAITS_END() |
537 | 567 |
538 IPC_STRUCT_TRAITS_BEGIN(content::FormFieldData) | 568 IPC_STRUCT_TRAITS_BEGIN(content::FormFieldData) |
539 IPC_STRUCT_TRAITS_MEMBER(text) | 569 IPC_STRUCT_TRAITS_MEMBER(text) |
540 IPC_STRUCT_TRAITS_MEMBER(placeholder) | 570 IPC_STRUCT_TRAITS_MEMBER(placeholder) |
541 IPC_STRUCT_TRAITS_MEMBER(text_input_type) | 571 IPC_STRUCT_TRAITS_MEMBER(text_input_type) |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1027 // a list of an origin whitelist for each feature in the policy. | 1057 // a list of an origin whitelist for each feature in the policy. |
1028 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidSetFeaturePolicyHeader, | 1058 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidSetFeaturePolicyHeader, |
1029 content::ParsedFeaturePolicyHeader /* parsed_header */) | 1059 content::ParsedFeaturePolicyHeader /* parsed_header */) |
1030 | 1060 |
1031 // Notifies the browser process about a new Content Security Policy that needs | 1061 // Notifies the browser process about a new Content Security Policy that needs |
1032 // to be applies to the frame. This message is sent when a frame commits | 1062 // to be applies to the frame. This message is sent when a frame commits |
1033 // navigation to a new location (reporting accumulated policies from HTTP | 1063 // navigation to a new location (reporting accumulated policies from HTTP |
1034 // headers and/or policies that might have been inherited from the parent frame) | 1064 // headers and/or policies that might have been inherited from the parent frame) |
1035 // or when a new policy has been discovered afterwards (i.e. found in a | 1065 // or when a new policy has been discovered afterwards (i.e. found in a |
1036 // dynamically added or a static <meta> element). | 1066 // dynamically added or a static <meta> element). |
1037 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidAddContentSecurityPolicy, | 1067 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidAddContentSecurityPolicy, |
1038 content::ContentSecurityPolicyHeader) | 1068 content::ContentSecurityPolicyHeader, |
| 1069 std::vector<content::CSPPolicy>) |
1039 | 1070 |
1040 // Sent when the frame starts enforcing an insecure request policy. Sending | 1071 // Sent when the frame starts enforcing an insecure request policy. Sending |
1041 // this information in DidCommitProvisionalLoad isn't sufficient; this | 1072 // this information in DidCommitProvisionalLoad isn't sufficient; this |
1042 // message is needed because, for example, a document can dynamically insert | 1073 // message is needed because, for example, a document can dynamically insert |
1043 // a <meta> tag that causes strict mixed content checking to be enforced. | 1074 // a <meta> tag that causes strict mixed content checking to be enforced. |
1044 IPC_MESSAGE_ROUTED1(FrameHostMsg_EnforceInsecureRequestPolicy, | 1075 IPC_MESSAGE_ROUTED1(FrameHostMsg_EnforceInsecureRequestPolicy, |
1045 blink::WebInsecureRequestPolicy) | 1076 blink::WebInsecureRequestPolicy) |
1046 | 1077 |
1047 // Sent when the frame is set to a unique origin. TODO(estark): this IPC | 1078 // Sent when the frame is set to a unique origin. TODO(estark): this IPC |
1048 // only exists to support dynamic sandboxing via a CSP delivered in a | 1079 // 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... |
1573 // nearest find result in the sending frame. | 1604 // nearest find result in the sending frame. |
1574 IPC_MESSAGE_ROUTED2(FrameHostMsg_GetNearestFindResult_Reply, | 1605 IPC_MESSAGE_ROUTED2(FrameHostMsg_GetNearestFindResult_Reply, |
1575 int /* nfr_request_id */, | 1606 int /* nfr_request_id */, |
1576 float /* distance */) | 1607 float /* distance */) |
1577 #endif | 1608 #endif |
1578 | 1609 |
1579 // Adding a new message? Stick to the sort order above: first platform | 1610 // Adding a new message? Stick to the sort order above: first platform |
1580 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then | 1611 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then |
1581 // platform independent FrameHostMsg, then ifdefs for platform specific | 1612 // platform independent FrameHostMsg, then ifdefs for platform specific |
1582 // FrameHostMsg. | 1613 // FrameHostMsg. |
OLD | NEW |