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 "cc/surfaces/surface_id.h" | 8 #include "cc/surfaces/surface_id.h" |
9 #include "cc/surfaces/surface_sequence.h" | 9 #include "cc/surfaces/surface_sequence.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 #include "content/common/content_param_traits.h" | 11 #include "content/common/content_param_traits.h" |
12 #include "content/common/frame_message_enums.h" | 12 #include "content/common/frame_message_enums.h" |
13 #include "content/common/frame_param.h" | 13 #include "content/common/frame_param.h" |
14 #include "content/common/frame_replication_state.h" | 14 #include "content/common/frame_replication_state.h" |
15 #include "content/common/navigation_gesture.h" | 15 #include "content/common/navigation_gesture.h" |
16 #include "content/common/navigation_params.h" | 16 #include "content/common/navigation_params.h" |
| 17 #include "content/common/page_state_serialization.h" |
17 #include "content/common/resource_request_body.h" | 18 #include "content/common/resource_request_body.h" |
18 #include "content/common/savable_subframe.h" | 19 #include "content/common/savable_subframe.h" |
19 #include "content/public/common/color_suggestion.h" | 20 #include "content/public/common/color_suggestion.h" |
20 #include "content/public/common/common_param_traits.h" | 21 #include "content/public/common/common_param_traits.h" |
21 #include "content/public/common/console_message_level.h" | 22 #include "content/public/common/console_message_level.h" |
22 #include "content/public/common/context_menu_params.h" | 23 #include "content/public/common/context_menu_params.h" |
23 #include "content/public/common/frame_navigate_params.h" | 24 #include "content/public/common/frame_navigate_params.h" |
24 #include "content/public/common/javascript_message_type.h" | 25 #include "content/public/common/javascript_message_type.h" |
25 #include "content/public/common/message_port_types.h" | 26 #include "content/public/common/message_port_types.h" |
26 #include "content/public/common/page_importance_signals.h" | 27 #include "content/public/common/page_importance_signals.h" |
(...skipping 26 matching lines...) Expand all Loading... |
53 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_Navigate_Type::Value, | 54 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_Navigate_Type::Value, |
54 FrameMsg_Navigate_Type::NAVIGATE_TYPE_LAST) | 55 FrameMsg_Navigate_Type::NAVIGATE_TYPE_LAST) |
55 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_UILoadMetricsReportType::Value, | 56 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_UILoadMetricsReportType::Value, |
56 FrameMsg_UILoadMetricsReportType::REPORT_TYPE_LAST) | 57 FrameMsg_UILoadMetricsReportType::REPORT_TYPE_LAST) |
57 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::MediaType, | 58 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::MediaType, |
58 blink::WebContextMenuData::MediaTypeLast) | 59 blink::WebContextMenuData::MediaTypeLast) |
59 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::InputFieldType, | 60 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::InputFieldType, |
60 blink::WebContextMenuData::InputFieldTypeLast) | 61 blink::WebContextMenuData::InputFieldTypeLast) |
61 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebFrameOwnerProperties::ScrollingMode, | 62 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebFrameOwnerProperties::ScrollingMode, |
62 blink::WebFrameOwnerProperties::ScrollingMode::Last) | 63 blink::WebFrameOwnerProperties::ScrollingMode::Last) |
| 64 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebHistoryScrollRestorationType, |
| 65 blink::WebHistoryScrollRestorationType::Last) |
| 66 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebHTTPBody::Element::Type, |
| 67 blink::WebHTTPBody::Element::Type::Last) |
63 IPC_ENUM_TRAITS(blink::WebSandboxFlags) // Bitmask. | 68 IPC_ENUM_TRAITS(blink::WebSandboxFlags) // Bitmask. |
64 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTreeScopeType, | 69 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTreeScopeType, |
65 blink::WebTreeScopeType::Last) | 70 blink::WebTreeScopeType::Last) |
66 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType, ui::MENU_SOURCE_TYPE_LAST) | 71 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType, ui::MENU_SOURCE_TYPE_LAST) |
67 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::LoFiState, | 72 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::LoFiState, |
68 content::LOFI_UNSPECIFIED, | 73 content::LOFI_UNSPECIFIED, |
69 content::LOFI_ON) | 74 content::LOFI_ON) |
70 | 75 |
71 IPC_STRUCT_TRAITS_BEGIN(content::ColorSuggestion) | 76 IPC_STRUCT_TRAITS_BEGIN(content::ColorSuggestion) |
72 IPC_STRUCT_TRAITS_MEMBER(color) | 77 IPC_STRUCT_TRAITS_MEMBER(color) |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 IPC_STRUCT_TRAITS_MEMBER(referrer) | 167 IPC_STRUCT_TRAITS_MEMBER(referrer) |
163 IPC_STRUCT_TRAITS_MEMBER(transition) | 168 IPC_STRUCT_TRAITS_MEMBER(transition) |
164 IPC_STRUCT_TRAITS_MEMBER(redirects) | 169 IPC_STRUCT_TRAITS_MEMBER(redirects) |
165 IPC_STRUCT_TRAITS_MEMBER(should_update_history) | 170 IPC_STRUCT_TRAITS_MEMBER(should_update_history) |
166 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url) | 171 IPC_STRUCT_TRAITS_MEMBER(searchable_form_url) |
167 IPC_STRUCT_TRAITS_MEMBER(searchable_form_encoding) | 172 IPC_STRUCT_TRAITS_MEMBER(searchable_form_encoding) |
168 IPC_STRUCT_TRAITS_MEMBER(contents_mime_type) | 173 IPC_STRUCT_TRAITS_MEMBER(contents_mime_type) |
169 IPC_STRUCT_TRAITS_MEMBER(socket_address) | 174 IPC_STRUCT_TRAITS_MEMBER(socket_address) |
170 IPC_STRUCT_TRAITS_END() | 175 IPC_STRUCT_TRAITS_END() |
171 | 176 |
| 177 IPC_STRUCT_TRAITS_BEGIN(content::ExplodedHttpBodyElement) |
| 178 IPC_STRUCT_TRAITS_MEMBER(type) |
| 179 IPC_STRUCT_TRAITS_MEMBER(data) |
| 180 IPC_STRUCT_TRAITS_MEMBER(file_path) |
| 181 IPC_STRUCT_TRAITS_MEMBER(filesystem_url) |
| 182 IPC_STRUCT_TRAITS_MEMBER(file_start) |
| 183 IPC_STRUCT_TRAITS_MEMBER(file_length) |
| 184 IPC_STRUCT_TRAITS_MEMBER(file_modification_time) |
| 185 IPC_STRUCT_TRAITS_MEMBER(blob_uuid) |
| 186 IPC_STRUCT_TRAITS_END() |
| 187 |
| 188 IPC_STRUCT_TRAITS_BEGIN(content::ExplodedHttpBody) |
| 189 IPC_STRUCT_TRAITS_MEMBER(http_content_type) |
| 190 IPC_STRUCT_TRAITS_MEMBER(elements) |
| 191 IPC_STRUCT_TRAITS_MEMBER(identifier) |
| 192 IPC_STRUCT_TRAITS_MEMBER(contains_passwords) |
| 193 IPC_STRUCT_TRAITS_MEMBER(is_null) |
| 194 IPC_STRUCT_TRAITS_END() |
| 195 |
| 196 IPC_STRUCT_TRAITS_BEGIN(content::ExplodedFrameState) |
| 197 IPC_STRUCT_TRAITS_MEMBER(url_string) |
| 198 IPC_STRUCT_TRAITS_MEMBER(referrer) |
| 199 IPC_STRUCT_TRAITS_MEMBER(target) |
| 200 IPC_STRUCT_TRAITS_MEMBER(state_object) |
| 201 IPC_STRUCT_TRAITS_MEMBER(document_state) |
| 202 IPC_STRUCT_TRAITS_MEMBER(scroll_restoration_type) |
| 203 IPC_STRUCT_TRAITS_MEMBER(visual_viewport_scroll_offset) |
| 204 IPC_STRUCT_TRAITS_MEMBER(scroll_offset) |
| 205 IPC_STRUCT_TRAITS_MEMBER(item_sequence_number) |
| 206 IPC_STRUCT_TRAITS_MEMBER(document_sequence_number) |
| 207 IPC_STRUCT_TRAITS_MEMBER(page_scale_factor) |
| 208 IPC_STRUCT_TRAITS_MEMBER(referrer_policy) |
| 209 IPC_STRUCT_TRAITS_MEMBER(http_body) |
| 210 IPC_STRUCT_TRAITS_MEMBER(children) |
| 211 IPC_STRUCT_TRAITS_END() |
| 212 |
172 // Parameters structure for FrameHostMsg_DidCommitProvisionalLoad, which has | 213 // Parameters structure for FrameHostMsg_DidCommitProvisionalLoad, which has |
173 // too many data parameters to be reasonably put in a predefined IPC message. | 214 // too many data parameters to be reasonably put in a predefined IPC message. |
174 IPC_STRUCT_BEGIN_WITH_PARENT(FrameHostMsg_DidCommitProvisionalLoad_Params, | 215 IPC_STRUCT_BEGIN_WITH_PARENT(FrameHostMsg_DidCommitProvisionalLoad_Params, |
175 content::FrameNavigateParams) | 216 content::FrameNavigateParams) |
176 IPC_STRUCT_TRAITS_PARENT(content::FrameNavigateParams) | 217 IPC_STRUCT_TRAITS_PARENT(content::FrameNavigateParams) |
177 | 218 |
178 // This is the value from the browser (copied from the navigation request) | 219 // This is the value from the browser (copied from the navigation request) |
179 // indicating whether it intended to make a new entry. TODO(avi): Remove this | 220 // indicating whether it intended to make a new entry. TODO(avi): Remove this |
180 // when the pending entry situation is made sane and the browser keeps them | 221 // when the pending entry situation is made sane and the browser keeps them |
181 // around long enough to match them via nav_entry_id. | 222 // around long enough to match them via nav_entry_id. |
(...skipping 25 matching lines...) Expand all Loading... |
207 | 248 |
208 // This flag is used to warn if the renderer is displaying an error page, | 249 // This flag is used to warn if the renderer is displaying an error page, |
209 // so that we can set the appropriate page type. | 250 // so that we can set the appropriate page type. |
210 IPC_STRUCT_MEMBER(bool, url_is_unreachable) | 251 IPC_STRUCT_MEMBER(bool, url_is_unreachable) |
211 | 252 |
212 // True if the connection was proxied. In this case, socket_address | 253 // True if the connection was proxied. In this case, socket_address |
213 // will represent the address of the proxy, rather than the remote host. | 254 // will represent the address of the proxy, rather than the remote host. |
214 IPC_STRUCT_MEMBER(bool, was_fetched_via_proxy) | 255 IPC_STRUCT_MEMBER(bool, was_fetched_via_proxy) |
215 | 256 |
216 // Serialized history item state to store in the navigation entry. | 257 // Serialized history item state to store in the navigation entry. |
| 258 // Only used if SiteIsolationPolicy::UseSubframeNavigationEntries is false. |
217 IPC_STRUCT_MEMBER(content::PageState, page_state) | 259 IPC_STRUCT_MEMBER(content::PageState, page_state) |
218 | 260 |
| 261 // Serialized history item state to store in the FrameNavigationEntry. |
| 262 // Only used if SiteIsolationPolicy::UseSubframeNavigationEntries is true. |
| 263 IPC_STRUCT_MEMBER(content::ExplodedFrameState, frame_state) |
| 264 |
219 // Original request's URL. | 265 // Original request's URL. |
220 IPC_STRUCT_MEMBER(GURL, original_request_url) | 266 IPC_STRUCT_MEMBER(GURL, original_request_url) |
221 | 267 |
222 // User agent override used to navigate. | 268 // User agent override used to navigate. |
223 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent) | 269 IPC_STRUCT_MEMBER(bool, is_overriding_user_agent) |
224 | 270 |
225 // Notifies the browser that for this navigation, the session history was | 271 // Notifies the browser that for this navigation, the session history was |
226 // successfully cleared. | 272 // successfully cleared. |
227 IPC_STRUCT_MEMBER(bool, history_list_was_cleared) | 273 IPC_STRUCT_MEMBER(bool, history_list_was_cleared) |
228 | 274 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 IPC_STRUCT_TRAITS_MEMBER(transferred_request_child_id) | 353 IPC_STRUCT_TRAITS_MEMBER(transferred_request_child_id) |
308 IPC_STRUCT_TRAITS_MEMBER(transferred_request_request_id) | 354 IPC_STRUCT_TRAITS_MEMBER(transferred_request_request_id) |
309 IPC_STRUCT_TRAITS_END() | 355 IPC_STRUCT_TRAITS_END() |
310 | 356 |
311 IPC_STRUCT_TRAITS_BEGIN(content::RequestNavigationParams) | 357 IPC_STRUCT_TRAITS_BEGIN(content::RequestNavigationParams) |
312 IPC_STRUCT_TRAITS_MEMBER(is_overriding_user_agent) | 358 IPC_STRUCT_TRAITS_MEMBER(is_overriding_user_agent) |
313 IPC_STRUCT_TRAITS_MEMBER(redirects) | 359 IPC_STRUCT_TRAITS_MEMBER(redirects) |
314 IPC_STRUCT_TRAITS_MEMBER(can_load_local_resources) | 360 IPC_STRUCT_TRAITS_MEMBER(can_load_local_resources) |
315 IPC_STRUCT_TRAITS_MEMBER(request_time) | 361 IPC_STRUCT_TRAITS_MEMBER(request_time) |
316 IPC_STRUCT_TRAITS_MEMBER(page_state) | 362 IPC_STRUCT_TRAITS_MEMBER(page_state) |
| 363 IPC_STRUCT_TRAITS_MEMBER(frame_state) |
317 IPC_STRUCT_TRAITS_MEMBER(page_id) | 364 IPC_STRUCT_TRAITS_MEMBER(page_id) |
318 IPC_STRUCT_TRAITS_MEMBER(nav_entry_id) | 365 IPC_STRUCT_TRAITS_MEMBER(nav_entry_id) |
319 IPC_STRUCT_TRAITS_MEMBER(is_same_document_history_load) | 366 IPC_STRUCT_TRAITS_MEMBER(is_same_document_history_load) |
320 IPC_STRUCT_TRAITS_MEMBER(has_committed_real_load) | 367 IPC_STRUCT_TRAITS_MEMBER(has_committed_real_load) |
321 IPC_STRUCT_TRAITS_MEMBER(intended_as_new_entry) | 368 IPC_STRUCT_TRAITS_MEMBER(intended_as_new_entry) |
322 IPC_STRUCT_TRAITS_MEMBER(pending_history_list_offset) | 369 IPC_STRUCT_TRAITS_MEMBER(pending_history_list_offset) |
323 IPC_STRUCT_TRAITS_MEMBER(current_history_list_offset) | 370 IPC_STRUCT_TRAITS_MEMBER(current_history_list_offset) |
324 IPC_STRUCT_TRAITS_MEMBER(current_history_list_length) | 371 IPC_STRUCT_TRAITS_MEMBER(current_history_list_length) |
325 IPC_STRUCT_TRAITS_MEMBER(should_clear_history_list) | 372 IPC_STRUCT_TRAITS_MEMBER(should_clear_history_list) |
326 IPC_STRUCT_TRAITS_MEMBER(should_create_service_worker) | 373 IPC_STRUCT_TRAITS_MEMBER(should_create_service_worker) |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
793 // Sent when the renderer starts loading the page. |to_different_document| will | 840 // Sent when the renderer starts loading the page. |to_different_document| will |
794 // be true unless the load is a fragment navigation, or triggered by | 841 // be true unless the load is a fragment navigation, or triggered by |
795 // history.pushState/replaceState. | 842 // history.pushState/replaceState. |
796 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidStartLoading, | 843 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidStartLoading, |
797 bool /* to_different_document */) | 844 bool /* to_different_document */) |
798 | 845 |
799 // Sent when the renderer is done loading a page. | 846 // Sent when the renderer is done loading a page. |
800 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidStopLoading) | 847 IPC_MESSAGE_ROUTED0(FrameHostMsg_DidStopLoading) |
801 | 848 |
802 // Notifies the browser that this frame has new session history information. | 849 // Notifies the browser that this frame has new session history information. |
803 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateState, content::PageState /* state */) | 850 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateState, |
| 851 content::ExplodedFrameState /* state */) |
804 | 852 |
805 // Sent when the frame changes its window.name. | 853 // Sent when the frame changes its window.name. |
806 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidChangeName, std::string /* name */) | 854 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidChangeName, std::string /* name */) |
807 | 855 |
808 // Sent when the renderer changed the progress of a load. | 856 // Sent when the renderer changed the progress of a load. |
809 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidChangeLoadProgress, | 857 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidChangeLoadProgress, |
810 double /* load_progress */) | 858 double /* load_progress */) |
811 | 859 |
812 // Requests that the given URL be opened in the specified manner. | 860 // Requests that the given URL be opened in the specified manner. |
813 IPC_MESSAGE_ROUTED1(FrameHostMsg_OpenURL, FrameHostMsg_OpenURL_Params) | 861 IPC_MESSAGE_ROUTED1(FrameHostMsg_OpenURL, FrameHostMsg_OpenURL_Params) |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1256 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, | 1304 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, |
1257 FrameHostMsg_ShowPopup_Params) | 1305 FrameHostMsg_ShowPopup_Params) |
1258 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) | 1306 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) |
1259 | 1307 |
1260 #endif | 1308 #endif |
1261 | 1309 |
1262 // Adding a new message? Stick to the sort order above: first platform | 1310 // Adding a new message? Stick to the sort order above: first platform |
1263 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then | 1311 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then |
1264 // platform independent FrameHostMsg, then ifdefs for platform specific | 1312 // platform independent FrameHostMsg, then ifdefs for platform specific |
1265 // FrameHostMsg. | 1313 // FrameHostMsg. |
OLD | NEW |