Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Side by Side Diff: content/common/frame_messages.h

Issue 1307013004: Propagate scrolling/marginwidth/marginheight property values to child frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments for tests + merge blink/cr changes. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 // inserted into the correct place in the frame tree. If this is 354 // inserted into the correct place in the frame tree. If this is
346 // MSG_ROUTING_NONE, the frame will be created as the leftmost child of its 355 // MSG_ROUTING_NONE, the frame will be created as the leftmost child of its
347 // parent frame, in front of any other children. 356 // parent frame, in front of any other children.
348 IPC_STRUCT_MEMBER(int, previous_sibling_routing_id) 357 IPC_STRUCT_MEMBER(int, previous_sibling_routing_id)
349 358
350 // When the new frame has a parent, |replication_state| holds the new frame's 359 // When the new frame has a parent, |replication_state| holds the new frame's
351 // properties replicated from the process rendering the parent frame, such as 360 // properties replicated from the process rendering the parent frame, such as
352 // the new frame's sandbox flags. 361 // the new frame's sandbox flags.
353 IPC_STRUCT_MEMBER(content::FrameReplicationState, replication_state) 362 IPC_STRUCT_MEMBER(content::FrameReplicationState, replication_state)
354 363
364 IPC_STRUCT_MEMBER(blink::WebFrameOwnerProperties, frame_owner_properties)
alexmos 2015/10/02 21:24:20 Following the pattern for other members, let's add
lazyboy 2015/10/05 22:16:08 Done.
365
355 // Specifies properties for a new RenderWidget that will be attached to the 366 // Specifies properties for a new RenderWidget that will be attached to the
356 // new RenderFrame (if one is needed). 367 // new RenderFrame (if one is needed).
357 IPC_STRUCT_MEMBER(FrameMsg_NewFrame_WidgetParams, widget_params) 368 IPC_STRUCT_MEMBER(FrameMsg_NewFrame_WidgetParams, widget_params)
358 IPC_STRUCT_END() 369 IPC_STRUCT_END()
359 370
360 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params) 371 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params)
361 IPC_STRUCT_MEMBER(GURL, url) 372 IPC_STRUCT_MEMBER(GURL, url)
362 IPC_STRUCT_MEMBER(content::Referrer, referrer) 373 IPC_STRUCT_MEMBER(content::Referrer, referrer)
363 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition) 374 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition)
364 IPC_STRUCT_MEMBER(bool, should_replace_current_entry) 375 IPC_STRUCT_MEMBER(bool, should_replace_current_entry)
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 // Note: this covers only the immediate frame / doesn't cover subframes. 682 // Note: this covers only the immediate frame / doesn't cover subframes.
672 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks) 683 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks)
673 684
674 // Get html data by serializing the target frame and replacing all resource 685 // Get html data by serializing the target frame and replacing all resource
675 // links with a path to the local copy passed in the message payload. 686 // links with a path to the local copy passed in the message payload.
676 IPC_MESSAGE_ROUTED3(FrameMsg_GetSerializedHtmlWithLocalLinks, 687 IPC_MESSAGE_ROUTED3(FrameMsg_GetSerializedHtmlWithLocalLinks,
677 std::vector<GURL> /* urls that have local copy */, 688 std::vector<GURL> /* urls that have local copy */,
678 std::vector<base::FilePath> /* paths of local copy */, 689 std::vector<base::FilePath> /* paths of local copy */,
679 base::FilePath /* local directory path */) 690 base::FilePath /* local directory path */)
680 691
692 IPC_MESSAGE_ROUTED1(FrameMsg_SetFrameOwnerProperties,
693 blink::WebFrameOwnerProperties /* frame_owner_properties */)
694
681 #if defined(ENABLE_PLUGINS) 695 #if defined(ENABLE_PLUGINS)
682 // Notifies the renderer of updates to the Plugin Power Saver origin whitelist. 696 // Notifies the renderer of updates to the Plugin Power Saver origin whitelist.
683 IPC_MESSAGE_ROUTED1(FrameMsg_UpdatePluginContentOriginWhitelist, 697 IPC_MESSAGE_ROUTED1(FrameMsg_UpdatePluginContentOriginWhitelist,
684 std::set<url::Origin> /* origin_whitelist */) 698 std::set<url::Origin> /* origin_whitelist */)
685 #endif // defined(ENABLE_PLUGINS) 699 #endif // defined(ENABLE_PLUGINS)
686 700
687 // ----------------------------------------------------------------------------- 701 // -----------------------------------------------------------------------------
688 // Messages sent from the renderer to the browser. 702 // Messages sent from the renderer to the browser.
689 703
690 // Blink and JavaScript error messages to log to the console 704 // Blink and JavaScript error messages to log to the console
691 // or debugger UI. 705 // or debugger UI.
692 IPC_MESSAGE_ROUTED4(FrameHostMsg_AddMessageToConsole, 706 IPC_MESSAGE_ROUTED4(FrameHostMsg_AddMessageToConsole,
693 int32, /* log level */ 707 int32, /* log level */
694 base::string16, /* msg */ 708 base::string16, /* msg */
695 int32, /* line number */ 709 int32, /* line number */
696 base::string16 /* source id */ ) 710 base::string16 /* source id */ )
697 711
698 // Sent by the renderer when a child frame is created in the renderer. 712 // Sent by the renderer when a child frame is created in the renderer.
699 // 713 //
700 // Each of these messages will have a corresponding FrameHostMsg_Detach message 714 // Each of these messages will have a corresponding FrameHostMsg_Detach message
701 // sent when the frame is detached from the DOM. 715 // sent when the frame is detached from the DOM.
702 IPC_SYNC_MESSAGE_CONTROL4_1(FrameHostMsg_CreateChildFrame, 716 IPC_SYNC_MESSAGE_CONTROL5_1(
703 int32 /* parent_routing_id */, 717 FrameHostMsg_CreateChildFrame,
704 blink::WebTreeScopeType /* scope */, 718 int32 /* parent_routing_id */,
705 std::string /* frame_name */, 719 blink::WebTreeScopeType /* scope */,
706 blink::WebSandboxFlags /* sandbox flags */, 720 std::string /* frame_name */,
707 int32 /* new_routing_id */) 721 blink::WebSandboxFlags /* sandbox flags */,
722 blink::WebFrameOwnerProperties /* frame_owner_properties */,
723 int32 /* new_routing_id */)
708 724
709 // Sent by the renderer to the parent RenderFrameHost when a child frame is 725 // Sent by the renderer to the parent RenderFrameHost when a child frame is
710 // detached from the DOM. 726 // detached from the DOM.
711 IPC_MESSAGE_ROUTED0(FrameHostMsg_Detach) 727 IPC_MESSAGE_ROUTED0(FrameHostMsg_Detach)
712 728
713 // Indicates the renderer process is gone. This actually is sent by the 729 // Indicates the renderer process is gone. This actually is sent by the
714 // browser process to itself, but keeps the interface cleaner. 730 // browser process to itself, but keeps the interface cleaner.
715 IPC_MESSAGE_ROUTED2(FrameHostMsg_RenderProcessGone, 731 IPC_MESSAGE_ROUTED2(FrameHostMsg_RenderProcessGone,
716 int, /* this really is base::TerminationStatus */ 732 int, /* this really is base::TerminationStatus */
717 int /* exit_code */) 733 int /* exit_code */)
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 // Notifies the browser that a page id was assigned. 806 // Notifies the browser that a page id was assigned.
791 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidAssignPageId, 807 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidAssignPageId,
792 int32 /* page_id */) 808 int32 /* page_id */)
793 809
794 // Notifies the browser that sandbox flags have changed for a subframe of this 810 // Notifies the browser that sandbox flags have changed for a subframe of this
795 // frame. 811 // frame.
796 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeSandboxFlags, 812 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeSandboxFlags,
797 int32 /* subframe_routing_id */, 813 int32 /* subframe_routing_id */,
798 blink::WebSandboxFlags /* updated_flags */) 814 blink::WebSandboxFlags /* updated_flags */)
799 815
816 // Notifies the browser that frame owner properties have changed for a subframe
817 // of this frame.
818 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeFrameOwnerProperties,
819 int32 /* subframe_routing_id */,
820 blink::WebFrameOwnerProperties /* frame_owner_properties */)
821
800 // Changes the title for the page in the UI when the page is navigated or the 822 // Changes the title for the page in the UI when the page is navigated or the
801 // title changes. Sent for top-level frames. 823 // title changes. Sent for top-level frames.
802 IPC_MESSAGE_ROUTED2(FrameHostMsg_UpdateTitle, 824 IPC_MESSAGE_ROUTED2(FrameHostMsg_UpdateTitle,
803 base::string16 /* title */, 825 base::string16 /* title */,
804 blink::WebTextDirection /* title direction */) 826 blink::WebTextDirection /* title direction */)
805 827
806 // Change the encoding name of the page in UI when the page has detected 828 // Change the encoding name of the page in UI when the page has detected
807 // proper encoding name. Sent for top-level frames. 829 // proper encoding name. Sent for top-level frames.
808 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateEncoding, 830 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateEncoding,
809 std::string /* new encoding name */) 831 std::string /* new encoding name */)
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, 1212 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup,
1191 FrameHostMsg_ShowPopup_Params) 1213 FrameHostMsg_ShowPopup_Params)
1192 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) 1214 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup)
1193 1215
1194 #endif 1216 #endif
1195 1217
1196 // Adding a new message? Stick to the sort order above: first platform 1218 // Adding a new message? Stick to the sort order above: first platform
1197 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then 1219 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then
1198 // platform independent FrameHostMsg, then ifdefs for platform specific 1220 // platform independent FrameHostMsg, then ifdefs for platform specific
1199 // FrameHostMsg. 1221 // FrameHostMsg.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698