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

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: remove dep patch Created 5 years, 3 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"
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/transition_element.h" 27 #include "content/public/common/transition_element.h"
28 #include "ipc/ipc_message_macros.h" 28 #include "ipc/ipc_message_macros.h"
29 #include "third_party/WebKit/public/web/WebFrameOwnerProperties.h"
29 #include "third_party/WebKit/public/web/WebTreeScopeType.h" 30 #include "third_party/WebKit/public/web/WebTreeScopeType.h"
30 #include "ui/gfx/ipc/gfx_param_traits.h" 31 #include "ui/gfx/ipc/gfx_param_traits.h"
31 #include "url/gurl.h" 32 #include "url/gurl.h"
32 #include "url/origin.h" 33 #include "url/origin.h"
33 34
34 #undef IPC_MESSAGE_EXPORT 35 #undef IPC_MESSAGE_EXPORT
35 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 36 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
36 37
37 #define IPC_MESSAGE_START FrameMsgStart 38 #define IPC_MESSAGE_START FrameMsgStart
38 39
39 IPC_ENUM_TRAITS_MIN_MAX_VALUE(AccessibilityMode, 40 IPC_ENUM_TRAITS_MIN_MAX_VALUE(AccessibilityMode,
40 AccessibilityModeOff, 41 AccessibilityModeOff,
41 AccessibilityModeComplete) 42 AccessibilityModeComplete)
42 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::JavaScriptMessageType, 43 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::JavaScriptMessageType,
43 content::JAVASCRIPT_MESSAGE_TYPE_ALERT, 44 content::JAVASCRIPT_MESSAGE_TYPE_ALERT,
44 content::JAVASCRIPT_MESSAGE_TYPE_PROMPT) 45 content::JAVASCRIPT_MESSAGE_TYPE_PROMPT)
45 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_Navigate_Type::Value, 46 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_Navigate_Type::Value,
46 FrameMsg_Navigate_Type::NAVIGATE_TYPE_LAST) 47 FrameMsg_Navigate_Type::NAVIGATE_TYPE_LAST)
47 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_UILoadMetricsReportType::Value, 48 IPC_ENUM_TRAITS_MAX_VALUE(FrameMsg_UILoadMetricsReportType::Value,
48 FrameMsg_UILoadMetricsReportType::REPORT_TYPE_LAST) 49 FrameMsg_UILoadMetricsReportType::REPORT_TYPE_LAST)
49 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::MediaType, 50 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::MediaType,
50 blink::WebContextMenuData::MediaTypeLast) 51 blink::WebContextMenuData::MediaTypeLast)
51 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::InputFieldType, 52 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebContextMenuData::InputFieldType,
52 blink::WebContextMenuData::InputFieldTypeLast) 53 blink::WebContextMenuData::InputFieldTypeLast)
54 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebFrameOwnerProperties::ScrollingMode,
55 blink::WebFrameOwnerProperties::ScrollingModeLast)
53 IPC_ENUM_TRAITS(blink::WebSandboxFlags) // Bitmask. 56 IPC_ENUM_TRAITS(blink::WebSandboxFlags) // Bitmask.
54 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTreeScopeType, 57 IPC_ENUM_TRAITS_MAX_VALUE(blink::WebTreeScopeType,
55 blink::WebTreeScopeType::Last) 58 blink::WebTreeScopeType::Last)
56 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType, ui::MENU_SOURCE_TYPE_LAST) 59 IPC_ENUM_TRAITS_MAX_VALUE(ui::MenuSourceType, ui::MENU_SOURCE_TYPE_LAST)
57 60
58 IPC_STRUCT_TRAITS_BEGIN(content::ColorSuggestion) 61 IPC_STRUCT_TRAITS_BEGIN(content::ColorSuggestion)
59 IPC_STRUCT_TRAITS_MEMBER(color) 62 IPC_STRUCT_TRAITS_MEMBER(color)
60 IPC_STRUCT_TRAITS_MEMBER(label) 63 IPC_STRUCT_TRAITS_MEMBER(label)
61 IPC_STRUCT_TRAITS_END() 64 IPC_STRUCT_TRAITS_END()
62 65
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 IPC_STRUCT_TRAITS_MEMBER(input_field_type) 103 IPC_STRUCT_TRAITS_MEMBER(input_field_type)
101 IPC_STRUCT_TRAITS_END() 104 IPC_STRUCT_TRAITS_END()
102 105
103 IPC_STRUCT_TRAITS_BEGIN(content::CustomContextMenuContext) 106 IPC_STRUCT_TRAITS_BEGIN(content::CustomContextMenuContext)
104 IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu) 107 IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu)
105 IPC_STRUCT_TRAITS_MEMBER(request_id) 108 IPC_STRUCT_TRAITS_MEMBER(request_id)
106 IPC_STRUCT_TRAITS_MEMBER(render_widget_id) 109 IPC_STRUCT_TRAITS_MEMBER(render_widget_id)
107 IPC_STRUCT_TRAITS_MEMBER(link_followed) 110 IPC_STRUCT_TRAITS_MEMBER(link_followed)
108 IPC_STRUCT_TRAITS_END() 111 IPC_STRUCT_TRAITS_END()
109 112
113 IPC_STRUCT_TRAITS_BEGIN(blink::WebFrameOwnerProperties)
114 IPC_STRUCT_TRAITS_MEMBER(scrollingMode)
115 IPC_STRUCT_TRAITS_MEMBER(marginWidth)
116 IPC_STRUCT_TRAITS_MEMBER(marginHeight)
117 IPC_STRUCT_TRAITS_END()
118
110 IPC_STRUCT_TRAITS_BEGIN(content::TransitionElement) 119 IPC_STRUCT_TRAITS_BEGIN(content::TransitionElement)
111 IPC_STRUCT_TRAITS_MEMBER(id) 120 IPC_STRUCT_TRAITS_MEMBER(id)
112 IPC_STRUCT_TRAITS_MEMBER(rect) 121 IPC_STRUCT_TRAITS_MEMBER(rect)
113 IPC_STRUCT_TRAITS_END() 122 IPC_STRUCT_TRAITS_END()
114 123
115 124
116 IPC_STRUCT_BEGIN(FrameHostMsg_DidFailProvisionalLoadWithError_Params) 125 IPC_STRUCT_BEGIN(FrameHostMsg_DidFailProvisionalLoadWithError_Params)
117 // Error code as reported in the DidFailProvisionalLoad callback. 126 // Error code as reported in the DidFailProvisionalLoad callback.
118 IPC_STRUCT_MEMBER(int, error_code) 127 IPC_STRUCT_MEMBER(int, error_code)
119 // An error message generated from the error_code. This can be an empty 128 // An error message generated from the error_code. This can be an empty
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 344
336 // If a valid |proxy_routing_id| is provided, the new frame will be 345 // If a valid |proxy_routing_id| is provided, the new frame will be
337 // configured to replace the proxy on commit. 346 // configured to replace the proxy on commit.
338 IPC_STRUCT_MEMBER(int, proxy_routing_id) 347 IPC_STRUCT_MEMBER(int, proxy_routing_id)
339 348
340 // When the new frame has a parent, |replication_state| holds the new frame's 349 // When the new frame has a parent, |replication_state| holds the new frame's
341 // properties replicated from the process rendering the parent frame, such as 350 // properties replicated from the process rendering the parent frame, such as
342 // the new frame's sandbox flags. 351 // the new frame's sandbox flags.
343 IPC_STRUCT_MEMBER(content::FrameReplicationState, replication_state) 352 IPC_STRUCT_MEMBER(content::FrameReplicationState, replication_state)
344 353
354 IPC_STRUCT_MEMBER(blink::WebFrameOwnerProperties, frame_owner_properties)
355
345 // Specifies properties for a new RenderWidget that will be attached to the 356 // Specifies properties for a new RenderWidget that will be attached to the
346 // new RenderFrame (if one is needed). 357 // new RenderFrame (if one is needed).
347 IPC_STRUCT_MEMBER(FrameMsg_NewFrame_WidgetParams, widget_params) 358 IPC_STRUCT_MEMBER(FrameMsg_NewFrame_WidgetParams, widget_params)
348 IPC_STRUCT_END() 359 IPC_STRUCT_END()
349 360
350 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params) 361 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params)
351 IPC_STRUCT_MEMBER(GURL, url) 362 IPC_STRUCT_MEMBER(GURL, url)
352 IPC_STRUCT_MEMBER(content::Referrer, referrer) 363 IPC_STRUCT_MEMBER(content::Referrer, referrer)
353 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition) 364 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition)
354 IPC_STRUCT_MEMBER(bool, should_replace_current_entry) 365 IPC_STRUCT_MEMBER(bool, should_replace_current_entry)
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 IPC_MESSAGE_ROUTED4(FrameHostMsg_AddMessageToConsole, 668 IPC_MESSAGE_ROUTED4(FrameHostMsg_AddMessageToConsole,
658 int32, /* log level */ 669 int32, /* log level */
659 base::string16, /* msg */ 670 base::string16, /* msg */
660 int32, /* line number */ 671 int32, /* line number */
661 base::string16 /* source id */ ) 672 base::string16 /* source id */ )
662 673
663 // Sent by the renderer when a child frame is created in the renderer. 674 // Sent by the renderer when a child frame is created in the renderer.
664 // 675 //
665 // Each of these messages will have a corresponding FrameHostMsg_Detach message 676 // Each of these messages will have a corresponding FrameHostMsg_Detach message
666 // sent when the frame is detached from the DOM. 677 // sent when the frame is detached from the DOM.
667 IPC_SYNC_MESSAGE_CONTROL4_1(FrameHostMsg_CreateChildFrame, 678 IPC_SYNC_MESSAGE_CONTROL5_1(
668 int32 /* parent_routing_id */, 679 FrameHostMsg_CreateChildFrame,
669 blink::WebTreeScopeType /* scope */, 680 int32 /* parent_routing_id */,
670 std::string /* frame_name */, 681 blink::WebTreeScopeType /* scope */,
671 blink::WebSandboxFlags /* sandbox flags */, 682 std::string /* frame_name */,
672 int32 /* new_routing_id */) 683 blink::WebSandboxFlags /* sandbox flags */,
684 blink::WebFrameOwnerProperties /* frame_owner_properties */,
685 int32 /* new_routing_id */)
673 686
674 // Sent by the renderer to the parent RenderFrameHost when a child frame is 687 // Sent by the renderer to the parent RenderFrameHost when a child frame is
675 // detached from the DOM. 688 // detached from the DOM.
676 IPC_MESSAGE_ROUTED0(FrameHostMsg_Detach) 689 IPC_MESSAGE_ROUTED0(FrameHostMsg_Detach)
677 690
678 // Indicates the renderer process is gone. This actually is sent by the 691 // Indicates the renderer process is gone. This actually is sent by the
679 // browser process to itself, but keeps the interface cleaner. 692 // browser process to itself, but keeps the interface cleaner.
680 IPC_MESSAGE_ROUTED2(FrameHostMsg_RenderProcessGone, 693 IPC_MESSAGE_ROUTED2(FrameHostMsg_RenderProcessGone,
681 int, /* this really is base::TerminationStatus */ 694 int, /* this really is base::TerminationStatus */
682 int /* exit_code */) 695 int /* exit_code */)
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 // Notifies the browser that a page id was assigned. 768 // Notifies the browser that a page id was assigned.
756 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidAssignPageId, 769 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidAssignPageId,
757 int32 /* page_id */) 770 int32 /* page_id */)
758 771
759 // Notifies the browser that sandbox flags have changed for a subframe of this 772 // Notifies the browser that sandbox flags have changed for a subframe of this
760 // frame. 773 // frame.
761 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeSandboxFlags, 774 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeSandboxFlags,
762 int32 /* subframe_routing_id */, 775 int32 /* subframe_routing_id */,
763 blink::WebSandboxFlags /* updated_flags */) 776 blink::WebSandboxFlags /* updated_flags */)
764 777
778 // Notifies the browser that "scrolling" property has changed for a subframe of
779 // this frame.
780 IPC_MESSAGE_ROUTED2(
781 FrameHostMsg_DidChangeScrollingMode,
782 int32 /* subframe_routing_id */,
783 blink::WebFrameOwnerProperties::ScrollingMode /* scrolling_mode */)
784
785 // Notifies the browser that "marginwidth" property has changed for a subframe
786 // of this frame.
787 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeMarginWidth,
788 int32 /* subframe_routing_id */,
789 int /* margin_width */)
790
791 // Notifies the browser that "marginheight" property has changed for a subframe
792 // of this frame.
793 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeMarginHeight,
794 int32 /* subframe_routing_id */,
795 int /* margin_height */)
796
765 // Changes the title for the page in the UI when the page is navigated or the 797 // Changes the title for the page in the UI when the page is navigated or the
766 // title changes. Sent for top-level frames. 798 // title changes. Sent for top-level frames.
767 IPC_MESSAGE_ROUTED2(FrameHostMsg_UpdateTitle, 799 IPC_MESSAGE_ROUTED2(FrameHostMsg_UpdateTitle,
768 base::string16 /* title */, 800 base::string16 /* title */,
769 blink::WebTextDirection /* title direction */) 801 blink::WebTextDirection /* title direction */)
770 802
771 // Change the encoding name of the page in UI when the page has detected 803 // Change the encoding name of the page in UI when the page has detected
772 // proper encoding name. Sent for top-level frames. 804 // proper encoding name. Sent for top-level frames.
773 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateEncoding, 805 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateEncoding,
774 std::string /* new encoding name */) 806 std::string /* new encoding name */)
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 FrameMsg_PostMessage_Params) 1055 FrameMsg_PostMessage_Params)
1024 1056
1025 #if defined(OS_MACOSX) || defined(OS_ANDROID) 1057 #if defined(OS_MACOSX) || defined(OS_ANDROID)
1026 1058
1027 // Message to show/hide a popup menu using native controls. 1059 // Message to show/hide a popup menu using native controls.
1028 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, 1060 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup,
1029 FrameHostMsg_ShowPopup_Params) 1061 FrameHostMsg_ShowPopup_Params)
1030 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) 1062 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup)
1031 1063
1032 #endif 1064 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698