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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 | 437 |
434 // When the new frame has a parent, |replication_state| holds the new frame's | 438 // When the new frame has a parent, |replication_state| holds the new frame's |
435 // properties replicated from the process rendering the parent frame, such as | 439 // properties replicated from the process rendering the parent frame, such as |
436 // the new frame's sandbox flags. | 440 // the new frame's sandbox flags. |
437 IPC_STRUCT_MEMBER(content::FrameReplicationState, replication_state) | 441 IPC_STRUCT_MEMBER(content::FrameReplicationState, replication_state) |
438 | 442 |
439 // When the new frame has a parent, |frame_owner_properties| holds the | 443 // When the new frame has a parent, |frame_owner_properties| holds the |
440 // properties of the HTMLFrameOwnerElement from the parent process. | 444 // properties of the HTMLFrameOwnerElement from the parent process. |
441 // Note that unlike FrameReplicationState, this is not replicated for remote | 445 // Note that unlike FrameReplicationState, this is not replicated for remote |
442 // frames. | 446 // frames. |
443 IPC_STRUCT_MEMBER(blink::WebFrameOwnerProperties, frame_owner_properties) | 447 IPC_STRUCT_MEMBER(content::FrameOwnerProperties, frame_owner_properties) |
444 | 448 |
445 // Specifies properties for a new RenderWidget that will be attached to the | 449 // Specifies properties for a new RenderWidget that will be attached to the |
446 // new RenderFrame (if one is needed). | 450 // new RenderFrame (if one is needed). |
447 IPC_STRUCT_MEMBER(FrameMsg_NewFrame_WidgetParams, widget_params) | 451 IPC_STRUCT_MEMBER(FrameMsg_NewFrame_WidgetParams, widget_params) |
448 IPC_STRUCT_END() | 452 IPC_STRUCT_END() |
449 | 453 |
450 // Parameters included with an OpenURL request. |frame_unique_name| is only | 454 // Parameters included with an OpenURL request. |frame_unique_name| is only |
451 // specified if |is_history_navigation_in_new_child| is true, for the case that | 455 // specified if |is_history_navigation_in_new_child| is true, for the case that |
452 // the browser process should look for an existing history item for the frame. | 456 // the browser process should look for an existing history item for the frame. |
453 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params) | 457 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params) |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 // hittesting. | 548 // hittesting. |
545 IPC_STRUCT_MEMBER(bool, ignored_for_hittest) | 549 IPC_STRUCT_MEMBER(bool, ignored_for_hittest) |
546 IPC_STRUCT_END() | 550 IPC_STRUCT_END() |
547 | 551 |
548 IPC_STRUCT_BEGIN(FrameHostMsg_CreateChildFrame_Params) | 552 IPC_STRUCT_BEGIN(FrameHostMsg_CreateChildFrame_Params) |
549 IPC_STRUCT_MEMBER(int32_t, parent_routing_id) | 553 IPC_STRUCT_MEMBER(int32_t, parent_routing_id) |
550 IPC_STRUCT_MEMBER(blink::WebTreeScopeType, scope) | 554 IPC_STRUCT_MEMBER(blink::WebTreeScopeType, scope) |
551 IPC_STRUCT_MEMBER(std::string, frame_name) | 555 IPC_STRUCT_MEMBER(std::string, frame_name) |
552 IPC_STRUCT_MEMBER(std::string, frame_unique_name) | 556 IPC_STRUCT_MEMBER(std::string, frame_unique_name) |
553 IPC_STRUCT_MEMBER(blink::WebSandboxFlags, sandbox_flags) | 557 IPC_STRUCT_MEMBER(blink::WebSandboxFlags, sandbox_flags) |
554 IPC_STRUCT_MEMBER(blink::WebFrameOwnerProperties, frame_owner_properties) | 558 IPC_STRUCT_MEMBER(content::FrameOwnerProperties, frame_owner_properties) |
555 IPC_STRUCT_END() | 559 IPC_STRUCT_END() |
556 | 560 |
557 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicyHeader) | 561 IPC_STRUCT_TRAITS_BEGIN(content::ContentSecurityPolicyHeader) |
558 IPC_STRUCT_TRAITS_MEMBER(header_value) | 562 IPC_STRUCT_TRAITS_MEMBER(header_value) |
559 IPC_STRUCT_TRAITS_MEMBER(type) | 563 IPC_STRUCT_TRAITS_MEMBER(type) |
560 IPC_STRUCT_TRAITS_MEMBER(source) | 564 IPC_STRUCT_TRAITS_MEMBER(source) |
561 IPC_STRUCT_TRAITS_END() | 565 IPC_STRUCT_TRAITS_END() |
562 | 566 |
563 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserFileInfo) | 567 IPC_STRUCT_TRAITS_BEGIN(content::FileChooserFileInfo) |
564 IPC_STRUCT_TRAITS_MEMBER(file_path) | 568 IPC_STRUCT_TRAITS_MEMBER(file_path) |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 FrameMsg_GetSerializedHtmlWithLocalLinks_FrameRoutingIdMap) | 918 FrameMsg_GetSerializedHtmlWithLocalLinks_FrameRoutingIdMap) |
915 | 919 |
916 // Serialize target frame and its resources into MHTML and write it into the | 920 // Serialize target frame and its resources into MHTML and write it into the |
917 // provided destination file handle. Note that when serializing multiple | 921 // provided destination file handle. Note that when serializing multiple |
918 // frames, one needs to serialize the *main* frame first (the main frame | 922 // frames, one needs to serialize the *main* frame first (the main frame |
919 // needs to go first according to RFC2557 + the main frame will trigger | 923 // needs to go first according to RFC2557 + the main frame will trigger |
920 // generation of the MHTML header). | 924 // generation of the MHTML header). |
921 IPC_MESSAGE_ROUTED1(FrameMsg_SerializeAsMHTML, FrameMsg_SerializeAsMHTML_Params) | 925 IPC_MESSAGE_ROUTED1(FrameMsg_SerializeAsMHTML, FrameMsg_SerializeAsMHTML_Params) |
922 | 926 |
923 IPC_MESSAGE_ROUTED1(FrameMsg_SetFrameOwnerProperties, | 927 IPC_MESSAGE_ROUTED1(FrameMsg_SetFrameOwnerProperties, |
924 blink::WebFrameOwnerProperties /* frame_owner_properties */) | 928 content::FrameOwnerProperties /* frame_owner_properties */) |
925 | 929 |
926 // Request to continue running the sequential focus navigation algorithm in | 930 // Request to continue running the sequential focus navigation algorithm in |
927 // this frame. |source_routing_id| identifies the frame that issued this | 931 // this frame. |source_routing_id| identifies the frame that issued this |
928 // request. This message is sent when pressing <tab> or <shift-tab> needs to | 932 // request. This message is sent when pressing <tab> or <shift-tab> needs to |
929 // find the next focusable element in a cross-process frame. | 933 // find the next focusable element in a cross-process frame. |
930 IPC_MESSAGE_ROUTED2(FrameMsg_AdvanceFocus, | 934 IPC_MESSAGE_ROUTED2(FrameMsg_AdvanceFocus, |
931 blink::WebFocusType /* type */, | 935 blink::WebFocusType /* type */, |
932 int32_t /* source_routing_id */) | 936 int32_t /* source_routing_id */) |
933 | 937 |
934 // Sent when the user wants to search for a word on the page (find-in-page). | 938 // 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... |
1129 // Notifies the browser that sandbox flags have changed for a subframe of this | 1133 // Notifies the browser that sandbox flags have changed for a subframe of this |
1130 // frame. | 1134 // frame. |
1131 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeSandboxFlags, | 1135 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeSandboxFlags, |
1132 int32_t /* subframe_routing_id */, | 1136 int32_t /* subframe_routing_id */, |
1133 blink::WebSandboxFlags /* updated_flags */) | 1137 blink::WebSandboxFlags /* updated_flags */) |
1134 | 1138 |
1135 // Notifies the browser that frame owner properties have changed for a subframe | 1139 // Notifies the browser that frame owner properties have changed for a subframe |
1136 // of this frame. | 1140 // of this frame. |
1137 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeFrameOwnerProperties, | 1141 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeFrameOwnerProperties, |
1138 int32_t /* subframe_routing_id */, | 1142 int32_t /* subframe_routing_id */, |
1139 blink::WebFrameOwnerProperties /* frame_owner_properties */) | 1143 content::FrameOwnerProperties /* frame_owner_properties */) |
1140 | 1144 |
1141 // Changes the title for the page in the UI when the page is navigated or the | 1145 // Changes the title for the page in the UI when the page is navigated or the |
1142 // title changes. Sent for top-level frames. | 1146 // title changes. Sent for top-level frames. |
1143 IPC_MESSAGE_ROUTED2(FrameHostMsg_UpdateTitle, | 1147 IPC_MESSAGE_ROUTED2(FrameHostMsg_UpdateTitle, |
1144 base::string16 /* title */, | 1148 base::string16 /* title */, |
1145 blink::WebTextDirection /* title direction */) | 1149 blink::WebTextDirection /* title direction */) |
1146 | 1150 |
1147 // Change the encoding name of the page in UI when the page has detected | 1151 // Change the encoding name of the page in UI when the page has detected |
1148 // proper encoding name. Sent for top-level frames. | 1152 // proper encoding name. Sent for top-level frames. |
1149 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateEncoding, | 1153 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateEncoding, |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1579 // nearest find result in the sending frame. | 1583 // nearest find result in the sending frame. |
1580 IPC_MESSAGE_ROUTED2(FrameHostMsg_GetNearestFindResult_Reply, | 1584 IPC_MESSAGE_ROUTED2(FrameHostMsg_GetNearestFindResult_Reply, |
1581 int /* nfr_request_id */, | 1585 int /* nfr_request_id */, |
1582 float /* distance */) | 1586 float /* distance */) |
1583 #endif | 1587 #endif |
1584 | 1588 |
1585 // Adding a new message? Stick to the sort order above: first platform | 1589 // Adding a new message? Stick to the sort order above: first platform |
1586 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then | 1590 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then |
1587 // platform independent FrameHostMsg, then ifdefs for platform specific | 1591 // platform independent FrameHostMsg, then ifdefs for platform specific |
1588 // FrameHostMsg. | 1592 // FrameHostMsg. |
OLD | NEW |