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

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: content_unittests compile fix Created 5 years, 1 month 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
« no previous file with comments | « content/common/DEPS ('k') | content/public/test/mock_render_thread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::LoFiState, 66 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::LoFiState,
64 content::LOFI_UNSPECIFIED, 67 content::LOFI_UNSPECIFIED,
65 content::LOFI_ON) 68 content::LOFI_ON)
66 69
67 IPC_STRUCT_TRAITS_BEGIN(content::ColorSuggestion) 70 IPC_STRUCT_TRAITS_BEGIN(content::ColorSuggestion)
68 IPC_STRUCT_TRAITS_MEMBER(color) 71 IPC_STRUCT_TRAITS_MEMBER(color)
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 IPC_STRUCT_TRAITS_MEMBER(input_field_type) 112 IPC_STRUCT_TRAITS_MEMBER(input_field_type)
110 IPC_STRUCT_TRAITS_END() 113 IPC_STRUCT_TRAITS_END()
111 114
112 IPC_STRUCT_TRAITS_BEGIN(content::CustomContextMenuContext) 115 IPC_STRUCT_TRAITS_BEGIN(content::CustomContextMenuContext)
113 IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu) 116 IPC_STRUCT_TRAITS_MEMBER(is_pepper_menu)
114 IPC_STRUCT_TRAITS_MEMBER(request_id) 117 IPC_STRUCT_TRAITS_MEMBER(request_id)
115 IPC_STRUCT_TRAITS_MEMBER(render_widget_id) 118 IPC_STRUCT_TRAITS_MEMBER(render_widget_id)
116 IPC_STRUCT_TRAITS_MEMBER(link_followed) 119 IPC_STRUCT_TRAITS_MEMBER(link_followed)
117 IPC_STRUCT_TRAITS_END() 120 IPC_STRUCT_TRAITS_END()
118 121
122 IPC_STRUCT_TRAITS_BEGIN(blink::WebFrameOwnerProperties)
123 IPC_STRUCT_TRAITS_MEMBER(scrollingMode)
124 IPC_STRUCT_TRAITS_MEMBER(marginWidth)
125 IPC_STRUCT_TRAITS_MEMBER(marginHeight)
126 IPC_STRUCT_TRAITS_END()
127
119 IPC_STRUCT_TRAITS_BEGIN(content::TransitionElement) 128 IPC_STRUCT_TRAITS_BEGIN(content::TransitionElement)
120 IPC_STRUCT_TRAITS_MEMBER(id) 129 IPC_STRUCT_TRAITS_MEMBER(id)
121 IPC_STRUCT_TRAITS_MEMBER(rect) 130 IPC_STRUCT_TRAITS_MEMBER(rect)
122 IPC_STRUCT_TRAITS_END() 131 IPC_STRUCT_TRAITS_END()
123 132
124 IPC_STRUCT_TRAITS_BEGIN(content::PageImportanceSignals) 133 IPC_STRUCT_TRAITS_BEGIN(content::PageImportanceSignals)
125 IPC_STRUCT_TRAITS_MEMBER(had_form_interaction) 134 IPC_STRUCT_TRAITS_MEMBER(had_form_interaction)
126 IPC_STRUCT_TRAITS_END() 135 IPC_STRUCT_TRAITS_END()
127 136
128 IPC_STRUCT_BEGIN(FrameHostMsg_DidFailProvisionalLoadWithError_Params) 137 IPC_STRUCT_BEGIN(FrameHostMsg_DidFailProvisionalLoadWithError_Params)
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 // inserted into the correct place in the frame tree. If this is 362 // inserted into the correct place in the frame tree. If this is
354 // MSG_ROUTING_NONE, the frame will be created as the leftmost child of its 363 // MSG_ROUTING_NONE, the frame will be created as the leftmost child of its
355 // parent frame, in front of any other children. 364 // parent frame, in front of any other children.
356 IPC_STRUCT_MEMBER(int, previous_sibling_routing_id) 365 IPC_STRUCT_MEMBER(int, previous_sibling_routing_id)
357 366
358 // When the new frame has a parent, |replication_state| holds the new frame's 367 // When the new frame has a parent, |replication_state| holds the new frame's
359 // properties replicated from the process rendering the parent frame, such as 368 // properties replicated from the process rendering the parent frame, such as
360 // the new frame's sandbox flags. 369 // the new frame's sandbox flags.
361 IPC_STRUCT_MEMBER(content::FrameReplicationState, replication_state) 370 IPC_STRUCT_MEMBER(content::FrameReplicationState, replication_state)
362 371
372 // When the new frame has a parent, |frame_owner_properties| holds the
373 // properties of the HTMLFrameOwnerElement from the parent process.
374 // Note that unlike FrameReplicationState, this is not replicated for remote
375 // frames.
376 IPC_STRUCT_MEMBER(blink::WebFrameOwnerProperties, frame_owner_properties)
377
363 // Specifies properties for a new RenderWidget that will be attached to the 378 // Specifies properties for a new RenderWidget that will be attached to the
364 // new RenderFrame (if one is needed). 379 // new RenderFrame (if one is needed).
365 IPC_STRUCT_MEMBER(FrameMsg_NewFrame_WidgetParams, widget_params) 380 IPC_STRUCT_MEMBER(FrameMsg_NewFrame_WidgetParams, widget_params)
366 IPC_STRUCT_END() 381 IPC_STRUCT_END()
367 382
368 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params) 383 IPC_STRUCT_BEGIN(FrameHostMsg_OpenURL_Params)
369 IPC_STRUCT_MEMBER(GURL, url) 384 IPC_STRUCT_MEMBER(GURL, url)
370 IPC_STRUCT_MEMBER(content::Referrer, referrer) 385 IPC_STRUCT_MEMBER(content::Referrer, referrer)
371 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition) 386 IPC_STRUCT_MEMBER(WindowOpenDisposition, disposition)
372 IPC_STRUCT_MEMBER(bool, should_replace_current_entry) 387 IPC_STRUCT_MEMBER(bool, should_replace_current_entry)
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 // Note: this covers only the immediate frame / doesn't cover subframes. 697 // Note: this covers only the immediate frame / doesn't cover subframes.
683 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks) 698 IPC_MESSAGE_ROUTED0(FrameMsg_GetSavableResourceLinks)
684 699
685 // Get html data by serializing the target frame and replacing all resource 700 // Get html data by serializing the target frame and replacing all resource
686 // links with a path to the local copy passed in the message payload. 701 // links with a path to the local copy passed in the message payload.
687 IPC_MESSAGE_ROUTED3(FrameMsg_GetSerializedHtmlWithLocalLinks, 702 IPC_MESSAGE_ROUTED3(FrameMsg_GetSerializedHtmlWithLocalLinks,
688 std::vector<GURL> /* urls that have local copy */, 703 std::vector<GURL> /* urls that have local copy */,
689 std::vector<base::FilePath> /* paths of local copy */, 704 std::vector<base::FilePath> /* paths of local copy */,
690 base::FilePath /* local directory path */) 705 base::FilePath /* local directory path */)
691 706
707 IPC_MESSAGE_ROUTED1(FrameMsg_SetFrameOwnerProperties,
708 blink::WebFrameOwnerProperties /* frame_owner_properties */)
709
692 #if defined(ENABLE_PLUGINS) 710 #if defined(ENABLE_PLUGINS)
693 // Notifies the renderer of updates to the Plugin Power Saver origin whitelist. 711 // Notifies the renderer of updates to the Plugin Power Saver origin whitelist.
694 IPC_MESSAGE_ROUTED1(FrameMsg_UpdatePluginContentOriginWhitelist, 712 IPC_MESSAGE_ROUTED1(FrameMsg_UpdatePluginContentOriginWhitelist,
695 std::set<url::Origin> /* origin_whitelist */) 713 std::set<url::Origin> /* origin_whitelist */)
696 #endif // defined(ENABLE_PLUGINS) 714 #endif // defined(ENABLE_PLUGINS)
697 715
698 // ----------------------------------------------------------------------------- 716 // -----------------------------------------------------------------------------
699 // Messages sent from the renderer to the browser. 717 // Messages sent from the renderer to the browser.
700 718
701 // Blink and JavaScript error messages to log to the console 719 // Blink and JavaScript error messages to log to the console
702 // or debugger UI. 720 // or debugger UI.
703 IPC_MESSAGE_ROUTED4(FrameHostMsg_AddMessageToConsole, 721 IPC_MESSAGE_ROUTED4(FrameHostMsg_AddMessageToConsole,
704 int32, /* log level */ 722 int32, /* log level */
705 base::string16, /* msg */ 723 base::string16, /* msg */
706 int32, /* line number */ 724 int32, /* line number */
707 base::string16 /* source id */ ) 725 base::string16 /* source id */ )
708 726
709 // Sent by the renderer when a child frame is created in the renderer. 727 // Sent by the renderer when a child frame is created in the renderer.
710 // 728 //
711 // Each of these messages will have a corresponding FrameHostMsg_Detach message 729 // Each of these messages will have a corresponding FrameHostMsg_Detach message
712 // sent when the frame is detached from the DOM. 730 // sent when the frame is detached from the DOM.
713 IPC_SYNC_MESSAGE_CONTROL4_1(FrameHostMsg_CreateChildFrame, 731 IPC_SYNC_MESSAGE_CONTROL5_1(
714 int32 /* parent_routing_id */, 732 FrameHostMsg_CreateChildFrame,
715 blink::WebTreeScopeType /* scope */, 733 int32 /* parent_routing_id */,
716 std::string /* frame_name */, 734 blink::WebTreeScopeType /* scope */,
717 blink::WebSandboxFlags /* sandbox flags */, 735 std::string /* frame_name */,
718 int32 /* new_routing_id */) 736 blink::WebSandboxFlags /* sandbox flags */,
737 blink::WebFrameOwnerProperties /* frame_owner_properties */,
738 int32 /* new_routing_id */)
719 739
720 // Sent by the renderer to the parent RenderFrameHost when a child frame is 740 // Sent by the renderer to the parent RenderFrameHost when a child frame is
721 // detached from the DOM. 741 // detached from the DOM.
722 IPC_MESSAGE_ROUTED0(FrameHostMsg_Detach) 742 IPC_MESSAGE_ROUTED0(FrameHostMsg_Detach)
723 743
724 // Indicates the renderer process is gone. This actually is sent by the 744 // Indicates the renderer process is gone. This actually is sent by the
725 // browser process to itself, but keeps the interface cleaner. 745 // browser process to itself, but keeps the interface cleaner.
726 IPC_MESSAGE_ROUTED2(FrameHostMsg_RenderProcessGone, 746 IPC_MESSAGE_ROUTED2(FrameHostMsg_RenderProcessGone,
727 int, /* this really is base::TerminationStatus */ 747 int, /* this really is base::TerminationStatus */
728 int /* exit_code */) 748 int /* exit_code */)
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 // Notifies the browser that a page id was assigned. 821 // Notifies the browser that a page id was assigned.
802 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidAssignPageId, 822 IPC_MESSAGE_ROUTED1(FrameHostMsg_DidAssignPageId,
803 int32 /* page_id */) 823 int32 /* page_id */)
804 824
805 // Notifies the browser that sandbox flags have changed for a subframe of this 825 // Notifies the browser that sandbox flags have changed for a subframe of this
806 // frame. 826 // frame.
807 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeSandboxFlags, 827 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeSandboxFlags,
808 int32 /* subframe_routing_id */, 828 int32 /* subframe_routing_id */,
809 blink::WebSandboxFlags /* updated_flags */) 829 blink::WebSandboxFlags /* updated_flags */)
810 830
831 // Notifies the browser that frame owner properties have changed for a subframe
832 // of this frame.
833 IPC_MESSAGE_ROUTED2(FrameHostMsg_DidChangeFrameOwnerProperties,
834 int32 /* subframe_routing_id */,
835 blink::WebFrameOwnerProperties /* frame_owner_properties */)
836
811 // Changes the title for the page in the UI when the page is navigated or the 837 // Changes the title for the page in the UI when the page is navigated or the
812 // title changes. Sent for top-level frames. 838 // title changes. Sent for top-level frames.
813 IPC_MESSAGE_ROUTED2(FrameHostMsg_UpdateTitle, 839 IPC_MESSAGE_ROUTED2(FrameHostMsg_UpdateTitle,
814 base::string16 /* title */, 840 base::string16 /* title */,
815 blink::WebTextDirection /* title direction */) 841 blink::WebTextDirection /* title direction */)
816 842
817 // Change the encoding name of the page in UI when the page has detected 843 // Change the encoding name of the page in UI when the page has detected
818 // proper encoding name. Sent for top-level frames. 844 // proper encoding name. Sent for top-level frames.
819 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateEncoding, 845 IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdateEncoding,
820 std::string /* new encoding name */) 846 std::string /* new encoding name */)
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup, 1227 IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup,
1202 FrameHostMsg_ShowPopup_Params) 1228 FrameHostMsg_ShowPopup_Params)
1203 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup) 1229 IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup)
1204 1230
1205 #endif 1231 #endif
1206 1232
1207 // Adding a new message? Stick to the sort order above: first platform 1233 // Adding a new message? Stick to the sort order above: first platform
1208 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then 1234 // independent FrameMsg, then ifdefs for platform specific FrameMsg, then
1209 // platform independent FrameHostMsg, then ifdefs for platform specific 1235 // platform independent FrameHostMsg, then ifdefs for platform specific
1210 // FrameHostMsg. 1236 // FrameHostMsg.
OLDNEW
« no previous file with comments | « content/common/DEPS ('k') | content/public/test/mock_render_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698