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" |
(...skipping 10 matching lines...) Expand all Loading... |
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_importance_signals.h" | 25 #include "content/public/common/page_importance_signals.h" |
26 #include "content/public/common/page_state.h" | 26 #include "content/public/common/page_state.h" |
27 #include "content/public/common/resource_response.h" | 27 #include "content/public/common/resource_response.h" |
28 #include "content/public/common/three_d_api_types.h" | 28 #include "content/public/common/three_d_api_types.h" |
29 #include "content/public/common/transition_element.h" | 29 #include "content/public/common/transition_element.h" |
30 #include "ipc/ipc_message_macros.h" | 30 #include "ipc/ipc_message_macros.h" |
| 31 #include "third_party/WebKit/public/web/WebFrameOwnerProperties.h" |
31 #include "third_party/WebKit/public/web/WebTreeScopeType.h" | 32 #include "third_party/WebKit/public/web/WebTreeScopeType.h" |
32 #include "ui/gfx/ipc/gfx_param_traits.h" | 33 #include "ui/gfx/ipc/gfx_param_traits.h" |
33 #include "url/gurl.h" | 34 #include "url/gurl.h" |
34 #include "url/origin.h" | 35 #include "url/origin.h" |
35 | 36 |
36 #if defined(ENABLE_PLUGINS) | 37 #if defined(ENABLE_PLUGINS) |
37 #include "content/common/pepper_renderer_instance_data.h" | 38 #include "content/common/pepper_renderer_instance_data.h" |
38 #endif | 39 #endif |
39 | 40 |
40 #undef IPC_MESSAGE_EXPORT | 41 #undef IPC_MESSAGE_EXPORT |
41 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 42 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
42 | 43 |
43 #define IPC_MESSAGE_START FrameMsgStart | 44 #define IPC_MESSAGE_START FrameMsgStart |
44 | 45 |
45 IPC_ENUM_TRAITS_MIN_MAX_VALUE(AccessibilityMode, | 46 IPC_ENUM_TRAITS_MIN_MAX_VALUE(AccessibilityMode, |
46 AccessibilityModeOff, | 47 AccessibilityModeOff, |
47 AccessibilityModeComplete) | 48 AccessibilityModeComplete) |
48 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::JavaScriptMessageType, | 49 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::JavaScriptMessageType, |
49 content::JAVASCRIPT_MESSAGE_TYPE_ALERT, | 50 content::JAVASCRIPT_MESSAGE_TYPE_ALERT, |
50 content::JAVASCRIPT_MESSAGE_TYPE_PROMPT) | 51 content::JAVASCRIPT_MESSAGE_TYPE_PROMPT) |
51 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_Navigate_Type::Value, | 52 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_Navigate_Type::Value, |
52 FrameMsg_Navigate_Type::NAVIGATE_TYPE_LAST) | 53 FrameMsg_Navigate_Type::NAVIGATE_TYPE_LAST) |
53 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_UILoadMetricsReportType::Value, | 54 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_UILoadMetricsReportType::Value, |
54 FrameMsg_UILoadMetricsReportType::REPORT_TYPE_LAST) | 55 FrameMsg_UILoadMetricsReportType::REPORT_TYPE_LAST) |
55 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::MediaType, | 56 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::MediaType, |
56 blink::WebContextMenuData::MediaTypeLast) | 57 blink::WebContextMenuData::MediaTypeLast) |
57 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::InputFieldType, | 58 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::InputFieldType, |
58 blink::WebContextMenuData::InputFieldTypeLast) | 59 blink::WebContextMenuData::InputFieldTypeLast) |
| 60 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebFrameOwnerProperties::ScrollingMode, |
| 61 blink::WebFrameOwnerProperties::ScrollingMode::Last) |
59 IPC_ENUM_TRAITS(blink::WebSandboxFlags) // Bitmask. | 62 IPC_ENUM_TRAITS(blink::WebSandboxFlags) // Bitmask. |
60 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTreeScopeType, | 63 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTreeScopeType, |
61 blink::WebTreeScopeType::Last) | 64 blink::WebTreeScopeType::Last) |
62 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType, ui::MENU_SOURCE_TYPE_LAST) | 65 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType, ui::MENU_SOURCE_TYPE_LAST) |
63 | 66 |
64 IPC_STRUCT_TRAITS_BEGIN(content::ColorSuggestion) | 67 IPC_STRUCT_TRAITS_BEGIN(content::ColorSuggestion) |
65 IPC_STRUCT_TRAITS_MEMBER(color) | 68 IPC_STRUCT_TRAITS_MEMBER(color) |
66 IPC_STRUCT_TRAITS_MEMBER(label) | 69 IPC_STRUCT_TRAITS_MEMBER(label) |
67 IPC_STRUCT_TRAITS_END() | 70 IPC_STRUCT_TRAITS_END() |
68 | 71 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 IPC_STRUCT_TRAITS_MEMBER(input_field_type) | 109 IPC_STRUCT_TRAITS_MEMBER(input_field_type) |
107 IPC_STRUCT_TRAITS_END() | 110 IPC_STRUCT_TRAITS_END() |
108 | 111 |
109 IPC_STRUCT_TRAITS_BEGIN(content::CustomContextMenuContext) | 112 IPC_STRUCT_TRAITS_BEGIN(content::CustomContextMenuContext) |
110 IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu) | 113 IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu) |
111 IPC_STRUCT_TRAITS_MEMBER(request_id) | 114 IPC_STRUCT_TRAITS_MEMBER(request_id) |
112 IPC_STRUCT_TRAITS_MEMBER(render_widget_id) | 115 IPC_STRUCT_TRAITS_MEMBER(render_widget_id) |
113 IPC_STRUCT_TRAITS_MEMBER(link_followed) | 116 IPC_STRUCT_TRAITS_MEMBER(link_followed) |
114 IPC_STRUCT_TRAITS_END() | 117 IPC_STRUCT_TRAITS_END() |
115 | 118 |
| 119 IPC_STRUCT_TRAITS_BEGIN(blink::WebFrameOwnerProperties) |
| 120 IPC_STRUCT_TRAITS_MEMBER(scrollingMode) |
| 121 IPC_STRUCT_TRAITS_MEMBER(marginWidth) |
| 122 IPC_STRUCT_TRAITS_MEMBER(marginHeight) |
| 123 IPC_STRUCT_TRAITS_END() |
| 124 |
116 IPC_STRUCT_TRAITS_BEGIN(content::TransitionElement) | 125 IPC_STRUCT_TRAITS_BEGIN(content::TransitionElement) |
117 IPC_STRUCT_TRAITS_MEMBER(id) | 126 IPC_STRUCT_TRAITS_MEMBER(id) |
118 IPC_STRUCT_TRAITS_MEMBER(rect) | 127 IPC_STRUCT_TRAITS_MEMBER(rect) |
119 IPC_STRUCT_TRAITS_END() | 128 IPC_STRUCT_TRAITS_END() |
120 | 129 |
121 IPC_STRUCT_TRAITS_BEGIN(content::PageImportanceSignals) | 130 IPC_STRUCT_TRAITS_BEGIN(content::PageImportanceSignals) |
122 IPC_STRUCT_TRAITS_MEMBER(had_form_interaction) | 131 IPC_STRUCT_TRAITS_MEMBER(had_form_interaction) |
123 IPC_STRUCT_TRAITS_END() | 132 IPC_STRUCT_TRAITS_END() |
124 | 133 |
125 IPC_STRUCT_BEGIN(FrameHostMsg_DidFailProvisionalLoadWithError_Params) | 134 IPC_STRUCT_BEGIN(FrameHostMsg_DidFailProvisionalLoadWithError_Params) |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 // inserted into the correct place in the frame tree. If this is | 357 // inserted into the correct place in the frame tree. If this is |
349 // MSG_ROUTING_NONE, the frame will be created as the leftmost child of its | 358 // MSG_ROUTING_NONE, the frame will be created as the leftmost child of its |
350 // parent frame, in front of any other children. | 359 // parent frame, in front of any other children. |
351 IPC_STRUCT_MEMBER(int, previous_sibling_routing_id) | 360 IPC_STRUCT_MEMBER(int, previous_sibling_routing_id) |
352 | 361 |
353 // When the new frame has a parent, |replication_state| holds the new frame's | 362 // When the new frame has a parent, |replication_state| holds the new frame's |
354 // properties replicated from the process rendering the parent frame, such as | 363 // properties replicated from the process rendering the parent frame, such as |
355 // the new frame's sandbox flags. | 364 // the new frame's sandbox flags. |
356 IPC_STRUCT_MEMBER(content::FrameReplicationState, replication_state) | 365 IPC_STRUCT_MEMBER(content::FrameReplicationState, replication_state) |
357 | 366 |
| 367 // When the new frame has a parent, |frame_owner_properties| holds the |
| 368 // properties of the HTMLFrameOwnerElement from the parent process. |
| 369 // Note that unlike FrameReplicationState, this is not replicated for remote |
| 370 // frames. |
| 371 IPC_STRUCT_MEMBER(blink::WebFrameOwnerProperties, frame_owner_properties) |
| 372 |
358 // Specifies properties for a new RenderWidget that will be attached to the | 373 // Specifies properties for a new RenderWidget that will be attached to the |
359 // new RenderFrame (if one is needed). | 374 // new RenderFrame (if one is needed). |
360 IPC_STRUCT_MEMBER(FrameMsg_NewFrame_WidgetParams, widget_params) | 375 IPC_STRUCT_MEMBER(FrameMsg_NewFrame_WidgetParams, widget_params) |
361 IPC_STRUCT_END() | 376 IPC_STRUCT_END() |
362 | 377 |
363 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params) | 378 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params) |
364 IPC_STRUCT_MEMBER(GURL, url) | 379 IPC_STRUCT_MEMBER(GURL, url) |
365 IPC_STRUCT_MEMBER(content::Referrer, referrer) | 380 IPC_STRUCT_MEMBER(content::Referrer, referrer) |
366 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition) | 381 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition) |
367 IPC_STRUCT_MEMBER(bool, should_replace_current_entry) | 382 IPC_STRUCT_MEMBER(bool, should_replace_current_entry) |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 // Note: this covers only the immediate frame / doesn't cover subframes. | 692 // Note: this covers only the immediate frame / doesn't cover subframes. |
678 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks) | 693 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks) |
679 | 694 |
680 // Get html data by serializing the target frame and replacing all resource | 695 // Get html data by serializing the target frame and replacing all resource |
681 // links with a path to the local copy passed in the message payload. | 696 // links with a path to the local copy passed in the message payload. |
682 IPC_MESSAGE_ROUTED3(FrameMsg_GetSerializedHtmlWithLocalLinks, | 697 IPC_MESSAGE_ROUTED3(FrameMsg_GetSerializedHtmlWithLocalLinks, |
683 std::vector<GURL> /* urls that have local copy */, | 698 std::vector<GURL> /* urls that have local copy */, |
684 std::vector<base::FilePath> /* paths of local copy */, | 699 std::vector<base::FilePath> /* paths of local copy */, |
685 base::FilePath /* local directory path */) | 700 base::FilePath /* local directory path */) |
686 | 701 |
| 702 IPC_MESSAGE_ROUTED1(FrameMsg_SetFrameOwnerProperties, |
| 703 blink::WebFrameOwnerProperties /* frame_owner_properties */) |
| 704 |
687 #if defined(ENABLE_PLUGINS) | 705 #if defined(ENABLE_PLUGINS) |
688 // Notifies the renderer of updates to the Plugin Power Saver origin whitelist. | 706 // Notifies the renderer of updates to the Plugin Power Saver origin whitelist. |
689 IPC_MESSAGE_ROUTED1(FrameMsg_UpdatePluginContentOriginWhitelist, | 707 IPC_MESSAGE_ROUTED1(FrameMsg_UpdatePluginContentOriginWhitelist, |
690 std::set<url::Origin> /* origin_whitelist */) | 708 std::set<url::Origin> /* origin_whitelist */) |
691 #endif // defined(ENABLE_PLUGINS) | 709 #endif // defined(ENABLE_PLUGINS) |
692 | 710 |
693 // ----------------------------------------------------------------------------- | 711 // ----------------------------------------------------------------------------- |
694 // Messages sent from the renderer to the browser. | 712 // Messages sent from the renderer to the browser. |
695 | 713 |
696 // Blink and JavaScript error messages to log to the console | 714 // Blink and JavaScript error messages to log to the console |
697 // or debugger UI. | 715 // or debugger UI. |
698 IPC_MESSAGE_ROUTED4(FrameHostMsg_AddMessageToConsole, | 716 IPC_MESSAGE_ROUTED4(FrameHostMsg_AddMessageToConsole, |
699 int32, /* log level */ | 717 int32, /* log level */ |
700 base::string16, /* msg */ | 718 base::string16, /* msg */ |
701 int32, /* line number */ | 719 int32, /* line number */ |
702 base::string16 /* source id */ ) | 720 base::string16 /* source id */ ) |
703 | 721 |
704 // Sent by the renderer when a child frame is created in the renderer. | 722 // Sent by the renderer when a child frame is created in the renderer. |
705 // | 723 // |
706 // Each of these messages will have a corresponding FrameHostMsg_Detach message | 724 // Each of these messages will have a corresponding FrameHostMsg_Detach message |
707 // sent when the frame is detached from the DOM. | 725 // sent when the frame is detached from the DOM. |
708 IPC_SYNC_MESSAGE_CONTROL4_1(FrameHostMsg_CreateChildFrame, | 726 IPC_SYNC_MESSAGE_CONTROL5_1( |
709 int32 /* parent_routing_id */, | 727 FrameHostMsg_CreateChildFrame, |
710 blink::WebTreeScopeType /* scope */, | 728 int32 /* parent_routing_id */, |
711 std::string /* frame_name */, | 729 blink::WebTreeScopeType /* scope */, |
712 blink::WebSandboxFlags /* sandbox flags */, | 730 std::string /* frame_name */, |
713 int32 /* new_routing_id */) | 731 blink::WebSandboxFlags /* sandbox flags */, |
| 732 blink::WebFrameOwnerProperties /* frame_owner_properties */, |
| 733 int32 /* new_routing_id */) |
714 | 734 |
715 // Sent by the renderer to the parent RenderFrameHost when a child frame is | 735 // Sent by the renderer to the parent RenderFrameHost when a child frame is |
716 // detached from the DOM. | 736 // detached from the DOM. |
717 IPC_MESSAGE_ROUTED0(FrameHostMsg_Detach) | 737 IPC_MESSAGE_ROUTED0(FrameHostMsg_Detach) |
718 | 738 |
719 // Indicates the renderer process is gone. This actually is sent by the | 739 // Indicates the renderer process is gone. This actually is sent by the |
720 // browser process to itself, but keeps the interface cleaner. | 740 // browser process to itself, but keeps the interface cleaner. |
721 IPC_MESSAGE_ROUTED2(FrameHostMsg_RenderProcessGone, | 741 IPC_MESSAGE_ROUTED2(FrameHostMsg_RenderProcessGone, |
722 int, /* this really is base::TerminationStatus */ | 742 int, /* this really is base::TerminationStatus */ |
723 int /* exit_code */) | 743 int /* exit_code */) |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 // Notifies the browser that a page id was assigned. | 816 // Notifies the browser that a page id was assigned. |
797 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidAssignPageId, | 817 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidAssignPageId, |
798 int32 /* page_id */) | 818 int32 /* page_id */) |
799 | 819 |
800 // Notifies the browser that sandbox flags have changed for a subframe of this | 820 // Notifies the browser that sandbox flags have changed for a subframe of this |
801 // frame. | 821 // frame. |
802 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeSandboxFlags, | 822 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeSandboxFlags, |
803 int32 /* subframe_routing_id */, | 823 int32 /* subframe_routing_id */, |
804 blink::WebSandboxFlags /* updated_flags */) | 824 blink::WebSandboxFlags /* updated_flags */) |
805 | 825 |
| 826 // Notifies the browser that frame owner properties have changed for a subframe |
| 827 // of this frame. |
| 828 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeFrameOwnerProperties, |
| 829 int32 /* subframe_routing_id */, |
| 830 blink::WebFrameOwnerProperties /* frame_owner_properties */) |
| 831 |
806 // Changes the title for the page in the UI when the page is navigated or the | 832 // Changes the title for the page in the UI when the page is navigated or the |
807 // title changes. Sent for top-level frames. | 833 // title changes. Sent for top-level frames. |
808 IPC_MESSAGE_ROUTED2(FrameHostMsg_UpdateTitle, | 834 IPC_MESSAGE_ROUTED2(FrameHostMsg_UpdateTitle, |
809 base::string16 /* title */, | 835 base::string16 /* title */, |
810 blink::WebTextDirection /* title direction */) | 836 blink::WebTextDirection /* title direction */) |
811 | 837 |
812 // Change the encoding name of the page in UI when the page has detected | 838 // Change the encoding name of the page in UI when the page has detected |
813 // proper encoding name. Sent for top-level frames. | 839 // proper encoding name. Sent for top-level frames. |
814 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateEncoding, | 840 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateEncoding, |
815 std::string /* new encoding name */) | 841 std::string /* new encoding name */) |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1196 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, | 1222 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, |
1197 FrameHostMsg_ShowPopup_Params) | 1223 FrameHostMsg_ShowPopup_Params) |
1198 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) | 1224 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) |
1199 | 1225 |
1200 #endif | 1226 #endif |
1201 | 1227 |
1202 // Adding a new message? Stick to the sort order above: first platform | 1228 // Adding a new message? Stick to the sort order above: first platform |
1203 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then | 1229 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then |
1204 // platform independent FrameHostMsg, then ifdefs for platform specific | 1230 // platform independent FrameHostMsg, then ifdefs for platform specific |
1205 // FrameHostMsg. | 1231 // FrameHostMsg. |
OLD | NEW |