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/resource_request_body.h" | 17 #include "content/common/resource_request_body.h" |
18 #include "content/public/common/color_suggestion.h" | 18 #include "content/public/common/color_suggestion.h" |
19 #include "content/public/common/common_param_traits.h" | 19 #include "content/public/common/common_param_traits.h" |
20 #include "content/public/common/console_message_level.h" | 20 #include "content/public/common/console_message_level.h" |
21 #include "content/public/common/context_menu_params.h" | 21 #include "content/public/common/context_menu_params.h" |
22 #include "content/public/common/frame_navigate_params.h" | 22 #include "content/public/common/frame_navigate_params.h" |
23 #include "content/public/common/javascript_message_type.h" | 23 #include "content/public/common/javascript_message_type.h" |
24 #include "content/public/common/message_port_types.h" | 24 #include "content/public/common/message_port_types.h" |
25 #include "content/public/common/page_state.h" | 25 #include "content/public/common/page_state.h" |
26 #include "content/public/common/resource_response.h" | 26 #include "content/public/common/resource_response.h" |
27 #include "content/public/common/three_d_api_types.h" | 27 #include "content/public/common/three_d_api_types.h" |
28 #include "content/public/common/transition_element.h" | 28 #include "content/public/common/transition_element.h" |
29 #include "ipc/ipc_message_macros.h" | 29 #include "ipc/ipc_message_macros.h" |
| 30 #include "third_party/WebKit/public/web/WebFrameOwnerProperties.h" |
30 #include "third_party/WebKit/public/web/WebTreeScopeType.h" | 31 #include "third_party/WebKit/public/web/WebTreeScopeType.h" |
31 #include "ui/gfx/ipc/gfx_param_traits.h" | 32 #include "ui/gfx/ipc/gfx_param_traits.h" |
32 #include "url/gurl.h" | 33 #include "url/gurl.h" |
33 #include "url/origin.h" | 34 #include "url/origin.h" |
34 | 35 |
35 #if defined(ENABLE_PLUGINS) | 36 #if defined(ENABLE_PLUGINS) |
36 #include "content/common/pepper_renderer_instance_data.h" | 37 #include "content/common/pepper_renderer_instance_data.h" |
37 #endif | 38 #endif |
38 | 39 |
39 #undef IPC_MESSAGE_EXPORT | 40 #undef IPC_MESSAGE_EXPORT |
40 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 41 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
41 | 42 |
42 #define IPC_MESSAGE_START FrameMsgStart | 43 #define IPC_MESSAGE_START FrameMsgStart |
43 | 44 |
44 IPC_ENUM_TRAITS_MIN_MAX_VALUE(AccessibilityMode, | 45 IPC_ENUM_TRAITS_MIN_MAX_VALUE(AccessibilityMode, |
45 AccessibilityModeOff, | 46 AccessibilityModeOff, |
46 AccessibilityModeComplete) | 47 AccessibilityModeComplete) |
47 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::JavaScriptMessageType, | 48 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::JavaScriptMessageType, |
48 content::JAVASCRIPT_MESSAGE_TYPE_ALERT, | 49 content::JAVASCRIPT_MESSAGE_TYPE_ALERT, |
49 content::JAVASCRIPT_MESSAGE_TYPE_PROMPT) | 50 content::JAVASCRIPT_MESSAGE_TYPE_PROMPT) |
50 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_Navigate_Type::Value, | 51 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_Navigate_Type::Value, |
51 FrameMsg_Navigate_Type::NAVIGATE_TYPE_LAST) | 52 FrameMsg_Navigate_Type::NAVIGATE_TYPE_LAST) |
52 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_UILoadMetricsReportType::Value, | 53 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_UILoadMetricsReportType::Value, |
53 FrameMsg_UILoadMetricsReportType::REPORT_TYPE_LAST) | 54 FrameMsg_UILoadMetricsReportType::REPORT_TYPE_LAST) |
54 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::MediaType, | 55 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::MediaType, |
55 blink::WebContextMenuData::MediaTypeLast) | 56 blink::WebContextMenuData::MediaTypeLast) |
56 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::InputFieldType, | 57 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::InputFieldType, |
57 blink::WebContextMenuData::InputFieldTypeLast) | 58 blink::WebContextMenuData::InputFieldTypeLast) |
| 59 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebFrameOwnerProperties::ScrollingMode, |
| 60 blink::WebFrameOwnerProperties::ScrollingMode::Last) |
58 IPC_ENUM_TRAITS(blink::WebSandboxFlags) // Bitmask. | 61 IPC_ENUM_TRAITS(blink::WebSandboxFlags) // Bitmask. |
59 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTreeScopeType, | 62 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTreeScopeType, |
60 blink::WebTreeScopeType::Last) | 63 blink::WebTreeScopeType::Last) |
61 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType, ui::MENU_SOURCE_TYPE_LAST) | 64 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType, ui::MENU_SOURCE_TYPE_LAST) |
62 | 65 |
63 IPC_STRUCT_TRAITS_BEGIN(content::ColorSuggestion) | 66 IPC_STRUCT_TRAITS_BEGIN(content::ColorSuggestion) |
64 IPC_STRUCT_TRAITS_MEMBER(color) | 67 IPC_STRUCT_TRAITS_MEMBER(color) |
65 IPC_STRUCT_TRAITS_MEMBER(label) | 68 IPC_STRUCT_TRAITS_MEMBER(label) |
66 IPC_STRUCT_TRAITS_END() | 69 IPC_STRUCT_TRAITS_END() |
67 | 70 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 IPC_STRUCT_TRAITS_MEMBER(input_field_type) | 108 IPC_STRUCT_TRAITS_MEMBER(input_field_type) |
106 IPC_STRUCT_TRAITS_END() | 109 IPC_STRUCT_TRAITS_END() |
107 | 110 |
108 IPC_STRUCT_TRAITS_BEGIN(content::CustomContextMenuContext) | 111 IPC_STRUCT_TRAITS_BEGIN(content::CustomContextMenuContext) |
109 IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu) | 112 IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu) |
110 IPC_STRUCT_TRAITS_MEMBER(request_id) | 113 IPC_STRUCT_TRAITS_MEMBER(request_id) |
111 IPC_STRUCT_TRAITS_MEMBER(render_widget_id) | 114 IPC_STRUCT_TRAITS_MEMBER(render_widget_id) |
112 IPC_STRUCT_TRAITS_MEMBER(link_followed) | 115 IPC_STRUCT_TRAITS_MEMBER(link_followed) |
113 IPC_STRUCT_TRAITS_END() | 116 IPC_STRUCT_TRAITS_END() |
114 | 117 |
| 118 IPC_STRUCT_TRAITS_BEGIN(blink::WebFrameOwnerProperties) |
| 119 IPC_STRUCT_TRAITS_MEMBER(scrollingMode) |
| 120 IPC_STRUCT_TRAITS_MEMBER(marginWidth) |
| 121 IPC_STRUCT_TRAITS_MEMBER(marginHeight) |
| 122 IPC_STRUCT_TRAITS_END() |
| 123 |
115 IPC_STRUCT_TRAITS_BEGIN(content::TransitionElement) | 124 IPC_STRUCT_TRAITS_BEGIN(content::TransitionElement) |
116 IPC_STRUCT_TRAITS_MEMBER(id) | 125 IPC_STRUCT_TRAITS_MEMBER(id) |
117 IPC_STRUCT_TRAITS_MEMBER(rect) | 126 IPC_STRUCT_TRAITS_MEMBER(rect) |
118 IPC_STRUCT_TRAITS_END() | 127 IPC_STRUCT_TRAITS_END() |
119 | 128 |
120 | 129 |
121 IPC_STRUCT_BEGIN(FrameHostMsg_DidFailProvisionalLoadWithError_Params) | 130 IPC_STRUCT_BEGIN(FrameHostMsg_DidFailProvisionalLoadWithError_Params) |
122 // Error code as reported in the DidFailProvisionalLoad callback. | 131 // Error code as reported in the DidFailProvisionalLoad callback. |
123 IPC_STRUCT_MEMBER(int, error_code) | 132 IPC_STRUCT_MEMBER(int, error_code) |
124 // An error message generated from the error_code. This can be an empty | 133 // An error message generated from the error_code. This can be an empty |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 // inserted into the correct place in the frame tree. If this is | 353 // inserted into the correct place in the frame tree. If this is |
345 // MSG_ROUTING_NONE, the frame will be created as the leftmost child of its | 354 // MSG_ROUTING_NONE, the frame will be created as the leftmost child of its |
346 // parent frame, in front of any other children. | 355 // parent frame, in front of any other children. |
347 IPC_STRUCT_MEMBER(int, previous_sibling_routing_id) | 356 IPC_STRUCT_MEMBER(int, previous_sibling_routing_id) |
348 | 357 |
349 // When the new frame has a parent, |replication_state| holds the new frame's | 358 // When the new frame has a parent, |replication_state| holds the new frame's |
350 // properties replicated from the process rendering the parent frame, such as | 359 // properties replicated from the process rendering the parent frame, such as |
351 // the new frame's sandbox flags. | 360 // the new frame's sandbox flags. |
352 IPC_STRUCT_MEMBER(content::FrameReplicationState, replication_state) | 361 IPC_STRUCT_MEMBER(content::FrameReplicationState, replication_state) |
353 | 362 |
| 363 IPC_STRUCT_MEMBER(blink::WebFrameOwnerProperties, frame_owner_properties) |
| 364 |
354 // Specifies properties for a new RenderWidget that will be attached to the | 365 // Specifies properties for a new RenderWidget that will be attached to the |
355 // new RenderFrame (if one is needed). | 366 // new RenderFrame (if one is needed). |
356 IPC_STRUCT_MEMBER(FrameMsg_NewFrame_WidgetParams, widget_params) | 367 IPC_STRUCT_MEMBER(FrameMsg_NewFrame_WidgetParams, widget_params) |
357 IPC_STRUCT_END() | 368 IPC_STRUCT_END() |
358 | 369 |
359 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params) | 370 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params) |
360 IPC_STRUCT_MEMBER(GURL, url) | 371 IPC_STRUCT_MEMBER(GURL, url) |
361 IPC_STRUCT_MEMBER(content::Referrer, referrer) | 372 IPC_STRUCT_MEMBER(content::Referrer, referrer) |
362 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition) | 373 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition) |
363 IPC_STRUCT_MEMBER(bool, should_replace_current_entry) | 374 IPC_STRUCT_MEMBER(bool, should_replace_current_entry) |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 IPC_MESSAGE_ROUTED4(FrameMsg_FailedNavigation, | 674 IPC_MESSAGE_ROUTED4(FrameMsg_FailedNavigation, |
664 content::CommonNavigationParams, /* common_params */ | 675 content::CommonNavigationParams, /* common_params */ |
665 content::RequestNavigationParams, /* request_params */ | 676 content::RequestNavigationParams, /* request_params */ |
666 bool, /* stale_copy_in_cache */ | 677 bool, /* stale_copy_in_cache */ |
667 int /* error_code */) | 678 int /* error_code */) |
668 | 679 |
669 // Request to enumerate and return links to all savable resources in the frame | 680 // Request to enumerate and return links to all savable resources in the frame |
670 // Note: this covers only the immediate frame / doesn't cover subframes. | 681 // Note: this covers only the immediate frame / doesn't cover subframes. |
671 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks) | 682 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks) |
672 | 683 |
| 684 IPC_MESSAGE_ROUTED1(FrameMsg_SetFrameOwnerProperties, |
| 685 blink::WebFrameOwnerProperties /* frame_owner_properties */) |
| 686 |
673 #if defined(ENABLE_PLUGINS) | 687 #if defined(ENABLE_PLUGINS) |
674 // Notifies the renderer of updates to the Plugin Power Saver origin whitelist. | 688 // Notifies the renderer of updates to the Plugin Power Saver origin whitelist. |
675 IPC_MESSAGE_ROUTED1(FrameMsg_UpdatePluginContentOriginWhitelist, | 689 IPC_MESSAGE_ROUTED1(FrameMsg_UpdatePluginContentOriginWhitelist, |
676 std::set<url::Origin> /* origin_whitelist */) | 690 std::set<url::Origin> /* origin_whitelist */) |
677 #endif // defined(ENABLE_PLUGINS) | 691 #endif // defined(ENABLE_PLUGINS) |
678 | 692 |
679 // ----------------------------------------------------------------------------- | 693 // ----------------------------------------------------------------------------- |
680 // Messages sent from the renderer to the browser. | 694 // Messages sent from the renderer to the browser. |
681 | 695 |
682 // Blink and JavaScript error messages to log to the console | 696 // Blink and JavaScript error messages to log to the console |
683 // or debugger UI. | 697 // or debugger UI. |
684 IPC_MESSAGE_ROUTED4(FrameHostMsg_AddMessageToConsole, | 698 IPC_MESSAGE_ROUTED4(FrameHostMsg_AddMessageToConsole, |
685 int32, /* log level */ | 699 int32, /* log level */ |
686 base::string16, /* msg */ | 700 base::string16, /* msg */ |
687 int32, /* line number */ | 701 int32, /* line number */ |
688 base::string16 /* source id */ ) | 702 base::string16 /* source id */ ) |
689 | 703 |
690 // Sent by the renderer when a child frame is created in the renderer. | 704 // Sent by the renderer when a child frame is created in the renderer. |
691 // | 705 // |
692 // Each of these messages will have a corresponding FrameHostMsg_Detach message | 706 // Each of these messages will have a corresponding FrameHostMsg_Detach message |
693 // sent when the frame is detached from the DOM. | 707 // sent when the frame is detached from the DOM. |
694 IPC_SYNC_MESSAGE_CONTROL4_1(FrameHostMsg_CreateChildFrame, | 708 IPC_SYNC_MESSAGE_CONTROL5_1( |
695 int32 /* parent_routing_id */, | 709 FrameHostMsg_CreateChildFrame, |
696 blink::WebTreeScopeType /* scope */, | 710 int32 /* parent_routing_id */, |
697 std::string /* frame_name */, | 711 blink::WebTreeScopeType /* scope */, |
698 blink::WebSandboxFlags /* sandbox flags */, | 712 std::string /* frame_name */, |
699 int32 /* new_routing_id */) | 713 blink::WebSandboxFlags /* sandbox flags */, |
| 714 blink::WebFrameOwnerProperties /* frame_owner_properties */, |
| 715 int32 /* new_routing_id */) |
700 | 716 |
701 // Sent by the renderer to the parent RenderFrameHost when a child frame is | 717 // Sent by the renderer to the parent RenderFrameHost when a child frame is |
702 // detached from the DOM. | 718 // detached from the DOM. |
703 IPC_MESSAGE_ROUTED0(FrameHostMsg_Detach) | 719 IPC_MESSAGE_ROUTED0(FrameHostMsg_Detach) |
704 | 720 |
705 // Indicates the renderer process is gone. This actually is sent by the | 721 // Indicates the renderer process is gone. This actually is sent by the |
706 // browser process to itself, but keeps the interface cleaner. | 722 // browser process to itself, but keeps the interface cleaner. |
707 IPC_MESSAGE_ROUTED2(FrameHostMsg_RenderProcessGone, | 723 IPC_MESSAGE_ROUTED2(FrameHostMsg_RenderProcessGone, |
708 int, /* this really is base::TerminationStatus */ | 724 int, /* this really is base::TerminationStatus */ |
709 int /* exit_code */) | 725 int /* exit_code */) |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 // Notifies the browser that a page id was assigned. | 798 // Notifies the browser that a page id was assigned. |
783 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidAssignPageId, | 799 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidAssignPageId, |
784 int32 /* page_id */) | 800 int32 /* page_id */) |
785 | 801 |
786 // Notifies the browser that sandbox flags have changed for a subframe of this | 802 // Notifies the browser that sandbox flags have changed for a subframe of this |
787 // frame. | 803 // frame. |
788 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeSandboxFlags, | 804 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeSandboxFlags, |
789 int32 /* subframe_routing_id */, | 805 int32 /* subframe_routing_id */, |
790 blink::WebSandboxFlags /* updated_flags */) | 806 blink::WebSandboxFlags /* updated_flags */) |
791 | 807 |
| 808 // Notifies the browser that frame owner properties have changed for a subframe |
| 809 // of this frame. |
| 810 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeFrameOwnerProperties, |
| 811 int32 /* subframe_routing_id */, |
| 812 blink::WebFrameOwnerProperties /* frame_owner_properties */) |
| 813 |
792 // Changes the title for the page in the UI when the page is navigated or the | 814 // Changes the title for the page in the UI when the page is navigated or the |
793 // title changes. Sent for top-level frames. | 815 // title changes. Sent for top-level frames. |
794 IPC_MESSAGE_ROUTED2(FrameHostMsg_UpdateTitle, | 816 IPC_MESSAGE_ROUTED2(FrameHostMsg_UpdateTitle, |
795 base::string16 /* title */, | 817 base::string16 /* title */, |
796 blink::WebTextDirection /* title direction */) | 818 blink::WebTextDirection /* title direction */) |
797 | 819 |
798 // Change the encoding name of the page in UI when the page has detected | 820 // Change the encoding name of the page in UI when the page has detected |
799 // proper encoding name. Sent for top-level frames. | 821 // proper encoding name. Sent for top-level frames. |
800 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateEncoding, | 822 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateEncoding, |
801 std::string /* new encoding name */) | 823 std::string /* new encoding name */) |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1173 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, | 1195 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, |
1174 FrameHostMsg_ShowPopup_Params) | 1196 FrameHostMsg_ShowPopup_Params) |
1175 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) | 1197 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) |
1176 | 1198 |
1177 #endif | 1199 #endif |
1178 | 1200 |
1179 // Adding a new message? Stick to the sort order above: first platform | 1201 // Adding a new message? Stick to the sort order above: first platform |
1180 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then | 1202 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then |
1181 // platform independent FrameHostMsg, then ifdefs for platform specific | 1203 // platform independent FrameHostMsg, then ifdefs for platform specific |
1182 // FrameHostMsg. | 1204 // FrameHostMsg. |
OLD | NEW |