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/content_security_policy_header.h" |
22 #include "content/common/frame_message_enums.h" | 22 #include "content/common/frame_message_enums.h" |
| 23 #include "content/common/frame_owner_properties.h" |
23 #include "content/common/frame_replication_state.h" | 24 #include "content/common/frame_replication_state.h" |
24 #include "content/common/navigation_gesture.h" | 25 #include "content/common/navigation_gesture.h" |
25 #include "content/common/navigation_params.h" | 26 #include "content/common/navigation_params.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" |
31 #include "content/public/common/file_chooser_file_info.h" | 32 #include "content/public/common/file_chooser_file_info.h" |
32 #include "content/public/common/file_chooser_params.h" | 33 #include "content/public/common/file_chooser_params.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 FrameMsg_Navigate_Type::NAVIGATE_TYPE_LAST) | 87 FrameMsg_Navigate_Type::NAVIGATE_TYPE_LAST) |
87 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_UILoadMetricsReportType::Value, | 88 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_UILoadMetricsReportType::Value, |
88 FrameMsg_UILoadMetricsReportType::REPORT_TYPE_LAST) | 89 FrameMsg_UILoadMetricsReportType::REPORT_TYPE_LAST) |
89 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::MediaType, | 90 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::MediaType, |
90 blink::WebContextMenuData::MediaTypeLast) | 91 blink::WebContextMenuData::MediaTypeLast) |
91 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::InputFieldType, | 92 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::InputFieldType, |
92 blink::WebContextMenuData::InputFieldTypeLast) | 93 blink::WebContextMenuData::InputFieldTypeLast) |
93 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebFocusType, blink::WebFocusTypeLast) | 94 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebFocusType, blink::WebFocusTypeLast) |
94 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebFrameOwnerProperties::ScrollingMode, | 95 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebFrameOwnerProperties::ScrollingMode, |
95 blink::WebFrameOwnerProperties::ScrollingMode::Last) | 96 blink::WebFrameOwnerProperties::ScrollingMode::Last) |
| 97 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebPermissionType, |
| 98 blink::WebPermissionTypeLast) |
96 IPC_ENUM_TRAITS_MAX_VALUE(content::StopFindAction, | 99 IPC_ENUM_TRAITS_MAX_VALUE(content::StopFindAction, |
97 content::STOP_FIND_ACTION_LAST) | 100 content::STOP_FIND_ACTION_LAST) |
98 IPC_ENUM_TRAITS(blink::WebSandboxFlags) // Bitmask. | 101 IPC_ENUM_TRAITS(blink::WebSandboxFlags) // Bitmask. |
99 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTreeScopeType, | 102 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTreeScopeType, |
100 blink::WebTreeScopeType::Last) | 103 blink::WebTreeScopeType::Last) |
101 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType, ui::MENU_SOURCE_TYPE_LAST) | 104 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType, ui::MENU_SOURCE_TYPE_LAST) |
102 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::LoFiState, | 105 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::LoFiState, |
103 content::LOFI_UNSPECIFIED, | 106 content::LOFI_UNSPECIFIED, |
104 content::LOFI_ON) | 107 content::LOFI_ON) |
105 IPC_ENUM_TRAITS_MAX_VALUE(content::FileChooserParams::Mode, | 108 IPC_ENUM_TRAITS_MAX_VALUE(content::FileChooserParams::Mode, |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 IPC_STRUCT_TRAITS_MEMBER(input_field_type) | 159 IPC_STRUCT_TRAITS_MEMBER(input_field_type) |
157 IPC_STRUCT_TRAITS_END() | 160 IPC_STRUCT_TRAITS_END() |
158 | 161 |
159 IPC_STRUCT_TRAITS_BEGIN(content::CustomContextMenuContext) | 162 IPC_STRUCT_TRAITS_BEGIN(content::CustomContextMenuContext) |
160 IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu) | 163 IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu) |
161 IPC_STRUCT_TRAITS_MEMBER(request_id) | 164 IPC_STRUCT_TRAITS_MEMBER(request_id) |
162 IPC_STRUCT_TRAITS_MEMBER(render_widget_id) | 165 IPC_STRUCT_TRAITS_MEMBER(render_widget_id) |
163 IPC_STRUCT_TRAITS_MEMBER(link_followed) | 166 IPC_STRUCT_TRAITS_MEMBER(link_followed) |
164 IPC_STRUCT_TRAITS_END() | 167 IPC_STRUCT_TRAITS_END() |
165 | 168 |
166 IPC_STRUCT_TRAITS_BEGIN(blink::WebFrameOwnerProperties) | 169 IPC_STRUCT_TRAITS_BEGIN(content::FrameOwnerProperties) |
167 IPC_STRUCT_TRAITS_MEMBER(scrollingMode) | 170 IPC_STRUCT_TRAITS_MEMBER(scrolling_mode) |
168 IPC_STRUCT_TRAITS_MEMBER(marginWidth) | 171 IPC_STRUCT_TRAITS_MEMBER(margin_width) |
169 IPC_STRUCT_TRAITS_MEMBER(marginHeight) | 172 IPC_STRUCT_TRAITS_MEMBER(margin_height) |
170 IPC_STRUCT_TRAITS_MEMBER(allowFullscreen) | 173 IPC_STRUCT_TRAITS_MEMBER(allow_fullscreen) |
| 174 IPC_STRUCT_TRAITS_MEMBER(delegated_permissions) |
171 IPC_STRUCT_TRAITS_END() | 175 IPC_STRUCT_TRAITS_END() |
172 | 176 |
173 IPC_STRUCT_TRAITS_BEGIN(content::TransitionElement) | 177 IPC_STRUCT_TRAITS_BEGIN(content::TransitionElement) |
174 IPC_STRUCT_TRAITS_MEMBER(id) | 178 IPC_STRUCT_TRAITS_MEMBER(id) |
175 IPC_STRUCT_TRAITS_MEMBER(rect) | 179 IPC_STRUCT_TRAITS_MEMBER(rect) |
176 IPC_STRUCT_TRAITS_END() | 180 IPC_STRUCT_TRAITS_END() |
177 | 181 |
178 IPC_STRUCT_TRAITS_BEGIN(content::PageImportanceSignals) | 182 IPC_STRUCT_TRAITS_BEGIN(content::PageImportanceSignals) |
179 IPC_STRUCT_TRAITS_MEMBER(had_form_interaction) | 183 IPC_STRUCT_TRAITS_MEMBER(had_form_interaction) |
180 IPC_STRUCT_TRAITS_END() | 184 IPC_STRUCT_TRAITS_END() |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 | 436 |
433 // When the new frame has a parent, |replication_state| holds the new frame's | 437 // When the new frame has a parent, |replication_state| holds the new frame's |
434 // properties replicated from the process rendering the parent frame, such as | 438 // properties replicated from the process rendering the parent frame, such as |
435 // the new frame's sandbox flags. | 439 // the new frame's sandbox flags. |
436 IPC_STRUCT_MEMBER(content::FrameReplicationState, replication_state) | 440 IPC_STRUCT_MEMBER(content::FrameReplicationState, replication_state) |
437 | 441 |
438 // When the new frame has a parent, |frame_owner_properties| holds the | 442 // When the new frame has a parent, |frame_owner_properties| holds the |
439 // properties of the HTMLFrameOwnerElement from the parent process. | 443 // properties of the HTMLFrameOwnerElement from the parent process. |
440 // Note that unlike FrameReplicationState, this is not replicated for remote | 444 // Note that unlike FrameReplicationState, this is not replicated for remote |
441 // frames. | 445 // frames. |
442 IPC_STRUCT_MEMBER(blink::WebFrameOwnerProperties, frame_owner_properties) | 446 IPC_STRUCT_MEMBER(content::FrameOwnerProperties, frame_owner_properties) |
443 | 447 |
444 // Specifies properties for a new RenderWidget that will be attached to the | 448 // Specifies properties for a new RenderWidget that will be attached to the |
445 // new RenderFrame (if one is needed). | 449 // new RenderFrame (if one is needed). |
446 IPC_STRUCT_MEMBER(FrameMsg_NewFrame_WidgetParams, widget_params) | 450 IPC_STRUCT_MEMBER(FrameMsg_NewFrame_WidgetParams, widget_params) |
447 IPC_STRUCT_END() | 451 IPC_STRUCT_END() |
448 | 452 |
449 // Parameters included with an OpenURL request. |frame_unique_name| is only | 453 // Parameters included with an OpenURL request. |frame_unique_name| is only |
450 // specified if |is_history_navigation_in_new_child| is true, for the case that | 454 // specified if |is_history_navigation_in_new_child| is true, for the case that |
451 // the browser process should look for an existing history item for the frame. | 455 // the browser process should look for an existing history item for the frame. |
452 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params) | 456 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params) |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 // hittesting. | 547 // hittesting. |
544 IPC_STRUCT_MEMBER(bool, ignored_for_hittest) | 548 IPC_STRUCT_MEMBER(bool, ignored_for_hittest) |
545 IPC_STRUCT_END() | 549 IPC_STRUCT_END() |
546 | 550 |
547 IPC_STRUCT_BEGIN(FrameHostMsg_CreateChildFrame_Params) | 551 IPC_STRUCT_BEGIN(FrameHostMsg_CreateChildFrame_Params) |
548 IPC_STRUCT_MEMBER(int32_t, parent_routing_id) | 552 IPC_STRUCT_MEMBER(int32_t, parent_routing_id) |
549 IPC_STRUCT_MEMBER(blink::WebTreeScopeType, scope) | 553 IPC_STRUCT_MEMBER(blink::WebTreeScopeType, scope) |
550 IPC_STRUCT_MEMBER(std::string, frame_name) | 554 IPC_STRUCT_MEMBER(std::string, frame_name) |
551 IPC_STRUCT_MEMBER(std::string, frame_unique_name) | 555 IPC_STRUCT_MEMBER(std::string, frame_unique_name) |
552 IPC_STRUCT_MEMBER(blink::WebSandboxFlags, sandbox_flags) | 556 IPC_STRUCT_MEMBER(blink::WebSandboxFlags, sandbox_flags) |
553 IPC_STRUCT_MEMBER(blink::WebFrameOwnerProperties, frame_owner_properties) | 557 IPC_STRUCT_MEMBER(content::FrameOwnerProperties, frame_owner_properties) |
554 IPC_STRUCT_END() | 558 IPC_STRUCT_END() |
555 | 559 |
556 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicyHeader) | 560 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicyHeader) |
557 IPC_STRUCT_TRAITS_MEMBER(header_value) | 561 IPC_STRUCT_TRAITS_MEMBER(header_value) |
558 IPC_STRUCT_TRAITS_MEMBER(type) | 562 IPC_STRUCT_TRAITS_MEMBER(type) |
559 IPC_STRUCT_TRAITS_MEMBER(source) | 563 IPC_STRUCT_TRAITS_MEMBER(source) |
560 IPC_STRUCT_TRAITS_END() | 564 IPC_STRUCT_TRAITS_END() |
561 | 565 |
562 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserFileInfo) | 566 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserFileInfo) |
563 IPC_STRUCT_TRAITS_MEMBER(file_path) | 567 IPC_STRUCT_TRAITS_MEMBER(file_path) |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
913 FrameMsg_GetSerializedHtmlWithLocalLinks_FrameRoutingIdMap) | 917 FrameMsg_GetSerializedHtmlWithLocalLinks_FrameRoutingIdMap) |
914 | 918 |
915 // Serialize target frame and its resources into MHTML and write it into the | 919 // Serialize target frame and its resources into MHTML and write it into the |
916 // provided destination file handle. Note that when serializing multiple | 920 // provided destination file handle. Note that when serializing multiple |
917 // frames, one needs to serialize the *main* frame first (the main frame | 921 // frames, one needs to serialize the *main* frame first (the main frame |
918 // needs to go first according to RFC2557 + the main frame will trigger | 922 // needs to go first according to RFC2557 + the main frame will trigger |
919 // generation of the MHTML header). | 923 // generation of the MHTML header). |
920 IPC_MESSAGE_ROUTED1(FrameMsg_SerializeAsMHTML, FrameMsg_SerializeAsMHTML_Params) | 924 IPC_MESSAGE_ROUTED1(FrameMsg_SerializeAsMHTML, FrameMsg_SerializeAsMHTML_Params) |
921 | 925 |
922 IPC_MESSAGE_ROUTED1(FrameMsg_SetFrameOwnerProperties, | 926 IPC_MESSAGE_ROUTED1(FrameMsg_SetFrameOwnerProperties, |
923 blink::WebFrameOwnerProperties /* frame_owner_properties */) | 927 content::FrameOwnerProperties /* frame_owner_properties */) |
924 | 928 |
925 // Request to continue running the sequential focus navigation algorithm in | 929 // Request to continue running the sequential focus navigation algorithm in |
926 // this frame. |source_routing_id| identifies the frame that issued this | 930 // this frame. |source_routing_id| identifies the frame that issued this |
927 // request. This message is sent when pressing <tab> or <shift-tab> needs to | 931 // request. This message is sent when pressing <tab> or <shift-tab> needs to |
928 // find the next focusable element in a cross-process frame. | 932 // find the next focusable element in a cross-process frame. |
929 IPC_MESSAGE_ROUTED2(FrameMsg_AdvanceFocus, | 933 IPC_MESSAGE_ROUTED2(FrameMsg_AdvanceFocus, |
930 blink::WebFocusType /* type */, | 934 blink::WebFocusType /* type */, |
931 int32_t /* source_routing_id */) | 935 int32_t /* source_routing_id */) |
932 | 936 |
933 // Sent when the user wants to search for a word on the page (find-in-page). | 937 // Sent when the user wants to search for a word on the page (find-in-page). |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1128 // Notifies the browser that sandbox flags have changed for a subframe of this | 1132 // Notifies the browser that sandbox flags have changed for a subframe of this |
1129 // frame. | 1133 // frame. |
1130 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeSandboxFlags, | 1134 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeSandboxFlags, |
1131 int32_t /* subframe_routing_id */, | 1135 int32_t /* subframe_routing_id */, |
1132 blink::WebSandboxFlags /* updated_flags */) | 1136 blink::WebSandboxFlags /* updated_flags */) |
1133 | 1137 |
1134 // Notifies the browser that frame owner properties have changed for a subframe | 1138 // Notifies the browser that frame owner properties have changed for a subframe |
1135 // of this frame. | 1139 // of this frame. |
1136 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeFrameOwnerProperties, | 1140 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeFrameOwnerProperties, |
1137 int32_t /* subframe_routing_id */, | 1141 int32_t /* subframe_routing_id */, |
1138 blink::WebFrameOwnerProperties /* frame_owner_properties */) | 1142 content::FrameOwnerProperties /* frame_owner_properties */) |
1139 | 1143 |
1140 // Changes the title for the page in the UI when the page is navigated or the | 1144 // Changes the title for the page in the UI when the page is navigated or the |
1141 // title changes. Sent for top-level frames. | 1145 // title changes. Sent for top-level frames. |
1142 IPC_MESSAGE_ROUTED2(FrameHostMsg_UpdateTitle, | 1146 IPC_MESSAGE_ROUTED2(FrameHostMsg_UpdateTitle, |
1143 base::string16 /* title */, | 1147 base::string16 /* title */, |
1144 blink::WebTextDirection /* title direction */) | 1148 blink::WebTextDirection /* title direction */) |
1145 | 1149 |
1146 // Change the encoding name of the page in UI when the page has detected | 1150 // Change the encoding name of the page in UI when the page has detected |
1147 // proper encoding name. Sent for top-level frames. | 1151 // proper encoding name. Sent for top-level frames. |
1148 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateEncoding, | 1152 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateEncoding, |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1566 // nearest find result in the sending frame. | 1570 // nearest find result in the sending frame. |
1567 IPC_MESSAGE_ROUTED2(FrameHostMsg_GetNearestFindResult_Reply, | 1571 IPC_MESSAGE_ROUTED2(FrameHostMsg_GetNearestFindResult_Reply, |
1568 int /* nfr_request_id */, | 1572 int /* nfr_request_id */, |
1569 float /* distance */) | 1573 float /* distance */) |
1570 #endif | 1574 #endif |
1571 | 1575 |
1572 // Adding a new message? Stick to the sort order above: first platform | 1576 // Adding a new message? Stick to the sort order above: first platform |
1573 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then | 1577 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then |
1574 // platform independent FrameHostMsg, then ifdefs for platform specific | 1578 // platform independent FrameHostMsg, then ifdefs for platform specific |
1575 // FrameHostMsg. | 1579 // FrameHostMsg. |
OLD | NEW |