OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 page rendering. | 5 // IPC messages for page rendering. |
6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "content/public/common/common_param_traits.h" | 27 #include "content/public/common/common_param_traits.h" |
28 #include "content/public/common/favicon_url.h" | 28 #include "content/public/common/favicon_url.h" |
29 #include "content/public/common/file_chooser_file_info.h" | 29 #include "content/public/common/file_chooser_file_info.h" |
30 #include "content/public/common/file_chooser_params.h" | 30 #include "content/public/common/file_chooser_params.h" |
31 #include "content/public/common/menu_item.h" | 31 #include "content/public/common/menu_item.h" |
32 #include "content/public/common/message_port_types.h" | 32 #include "content/public/common/message_port_types.h" |
33 #include "content/public/common/page_state.h" | 33 #include "content/public/common/page_state.h" |
34 #include "content/public/common/page_zoom.h" | 34 #include "content/public/common/page_zoom.h" |
35 #include "content/public/common/referrer.h" | 35 #include "content/public/common/referrer.h" |
36 #include "content/public/common/renderer_preferences.h" | 36 #include "content/public/common/renderer_preferences.h" |
37 #include "content/public/common/stop_find_action.h" | |
38 #include "content/public/common/three_d_api_types.h" | 37 #include "content/public/common/three_d_api_types.h" |
39 #include "content/public/common/window_container_type.h" | 38 #include "content/public/common/window_container_type.h" |
40 #include "ipc/ipc_channel_handle.h" | 39 #include "ipc/ipc_channel_handle.h" |
41 #include "ipc/ipc_message_macros.h" | 40 #include "ipc/ipc_message_macros.h" |
42 #include "media/audio/audio_parameters.h" | 41 #include "media/audio/audio_parameters.h" |
43 #include "media/base/channel_layout.h" | 42 #include "media/base/channel_layout.h" |
44 #include "media/base/media_log_event.h" | 43 #include "media/base/media_log_event.h" |
45 #include "net/base/network_change_notifier.h" | 44 #include "net/base/network_change_notifier.h" |
46 #include "third_party/WebKit/public/platform/WebDisplayMode.h" | 45 #include "third_party/WebKit/public/platform/WebDisplayMode.h" |
47 #include "third_party/WebKit/public/platform/WebFloatPoint.h" | 46 #include "third_party/WebKit/public/platform/WebFloatPoint.h" |
48 #include "third_party/WebKit/public/platform/WebFloatRect.h" | 47 #include "third_party/WebKit/public/platform/WebFloatRect.h" |
49 #include "third_party/WebKit/public/platform/WebScreenInfo.h" | 48 #include "third_party/WebKit/public/platform/WebScreenInfo.h" |
50 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationType.h" | 49 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationType.h" |
51 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h" | 50 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h" |
52 #include "third_party/WebKit/public/web/WebFindOptions.h" | |
53 #include "third_party/WebKit/public/web/WebMediaPlayerAction.h" | 51 #include "third_party/WebKit/public/web/WebMediaPlayerAction.h" |
54 #include "third_party/WebKit/public/web/WebPluginAction.h" | 52 #include "third_party/WebKit/public/web/WebPluginAction.h" |
55 #include "third_party/WebKit/public/web/WebPopupType.h" | 53 #include "third_party/WebKit/public/web/WebPopupType.h" |
56 #include "third_party/WebKit/public/web/WebSharedWorkerCreationContextType.h" | 54 #include "third_party/WebKit/public/web/WebSharedWorkerCreationContextType.h" |
57 #include "third_party/WebKit/public/web/WebSharedWorkerCreationErrors.h" | 55 #include "third_party/WebKit/public/web/WebSharedWorkerCreationErrors.h" |
58 #include "third_party/WebKit/public/web/WebTextDirection.h" | 56 #include "third_party/WebKit/public/web/WebTextDirection.h" |
59 #include "third_party/skia/include/core/SkBitmap.h" | 57 #include "third_party/skia/include/core/SkBitmap.h" |
60 #include "ui/base/ime/text_input_mode.h" | 58 #include "ui/base/ime/text_input_mode.h" |
61 #include "ui/base/ime/text_input_type.h" | 59 #include "ui/base/ime/text_input_type.h" |
62 #include "ui/base/ui_base_types.h" | 60 #include "ui/base/ui_base_types.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 content::NavigationGestureLast) | 102 content::NavigationGestureLast) |
105 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::PageZoom, | 103 IPC_ENUM_TRAITS_MIN_MAX_VALUE(content::PageZoom, |
106 content::PageZoom::PAGE_ZOOM_OUT, | 104 content::PageZoom::PAGE_ZOOM_OUT, |
107 content::PageZoom::PAGE_ZOOM_IN) | 105 content::PageZoom::PAGE_ZOOM_IN) |
108 IPC_ENUM_TRAITS_MAX_VALUE(gfx::FontRenderParams::Hinting, | 106 IPC_ENUM_TRAITS_MAX_VALUE(gfx::FontRenderParams::Hinting, |
109 gfx::FontRenderParams::HINTING_MAX) | 107 gfx::FontRenderParams::HINTING_MAX) |
110 IPC_ENUM_TRAITS_MAX_VALUE(gfx::FontRenderParams::SubpixelRendering, | 108 IPC_ENUM_TRAITS_MAX_VALUE(gfx::FontRenderParams::SubpixelRendering, |
111 gfx::FontRenderParams::SUBPIXEL_RENDERING_MAX) | 109 gfx::FontRenderParams::SUBPIXEL_RENDERING_MAX) |
112 IPC_ENUM_TRAITS_MAX_VALUE(content::TapMultipleTargetsStrategy, | 110 IPC_ENUM_TRAITS_MAX_VALUE(content::TapMultipleTargetsStrategy, |
113 content::TAP_MULTIPLE_TARGETS_STRATEGY_MAX) | 111 content::TAP_MULTIPLE_TARGETS_STRATEGY_MAX) |
114 IPC_ENUM_TRAITS_MAX_VALUE(content::StopFindAction, | |
115 content::STOP_FIND_ACTION_LAST) | |
116 IPC_ENUM_TRAITS_MAX_VALUE(content::ThreeDAPIType, | 112 IPC_ENUM_TRAITS_MAX_VALUE(content::ThreeDAPIType, |
117 content::THREE_D_API_TYPE_LAST) | 113 content::THREE_D_API_TYPE_LAST) |
118 IPC_ENUM_TRAITS_MAX_VALUE(media::MediaLogEvent::Type, | 114 IPC_ENUM_TRAITS_MAX_VALUE(media::MediaLogEvent::Type, |
119 media::MediaLogEvent::TYPE_LAST) | 115 media::MediaLogEvent::TYPE_LAST) |
120 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputMode, ui::TEXT_INPUT_MODE_MAX) | 116 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputMode, ui::TEXT_INPUT_MODE_MAX) |
121 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputType, ui::TEXT_INPUT_TYPE_MAX) | 117 IPC_ENUM_TRAITS_MAX_VALUE(ui::TextInputType, ui::TEXT_INPUT_TYPE_MAX) |
122 | 118 |
123 #if defined(OS_MACOSX) | 119 #if defined(OS_MACOSX) |
124 IPC_ENUM_TRAITS_MAX_VALUE( | 120 IPC_ENUM_TRAITS_MAX_VALUE( |
125 blink::WebScrollbarButtonsPlacement, | 121 blink::WebScrollbarButtonsPlacement, |
126 blink::WebScrollbarButtonsPlacement::WebScrollbarButtonsPlacementLast) | 122 blink::WebScrollbarButtonsPlacement::WebScrollbarButtonsPlacementLast) |
127 | 123 |
128 IPC_ENUM_TRAITS_MAX_VALUE(blink::ScrollerStyle, blink::ScrollerStyleOverlay) | 124 IPC_ENUM_TRAITS_MAX_VALUE(blink::ScrollerStyle, blink::ScrollerStyleOverlay) |
129 #endif | 125 #endif |
130 | 126 |
131 IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions) | |
132 IPC_STRUCT_TRAITS_MEMBER(forward) | |
133 IPC_STRUCT_TRAITS_MEMBER(matchCase) | |
134 IPC_STRUCT_TRAITS_MEMBER(findNext) | |
135 IPC_STRUCT_TRAITS_END() | |
136 | |
137 IPC_STRUCT_TRAITS_BEGIN(blink::WebMediaPlayerAction) | 127 IPC_STRUCT_TRAITS_BEGIN(blink::WebMediaPlayerAction) |
138 IPC_STRUCT_TRAITS_MEMBER(type) | 128 IPC_STRUCT_TRAITS_MEMBER(type) |
139 IPC_STRUCT_TRAITS_MEMBER(enable) | 129 IPC_STRUCT_TRAITS_MEMBER(enable) |
140 IPC_STRUCT_TRAITS_END() | 130 IPC_STRUCT_TRAITS_END() |
141 | 131 |
142 IPC_STRUCT_TRAITS_BEGIN(blink::WebPluginAction) | 132 IPC_STRUCT_TRAITS_BEGIN(blink::WebPluginAction) |
143 IPC_STRUCT_TRAITS_MEMBER(type) | 133 IPC_STRUCT_TRAITS_MEMBER(type) |
144 IPC_STRUCT_TRAITS_MEMBER(enable) | 134 IPC_STRUCT_TRAITS_MEMBER(enable) |
145 IPC_STRUCT_TRAITS_END() | 135 IPC_STRUCT_TRAITS_END() |
146 | 136 |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 // node. | 667 // node. |
678 IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus, | 668 IPC_MESSAGE_ROUTED1(ViewMsg_SetInitialFocus, |
679 bool /* reverse */) | 669 bool /* reverse */) |
680 | 670 |
681 // Sent to inform the renderer to invoke a context menu. | 671 // Sent to inform the renderer to invoke a context menu. |
682 // The parameter specifies the location in the render view's coordinates. | 672 // The parameter specifies the location in the render view's coordinates. |
683 IPC_MESSAGE_ROUTED2(ViewMsg_ShowContextMenu, | 673 IPC_MESSAGE_ROUTED2(ViewMsg_ShowContextMenu, |
684 ui::MenuSourceType, | 674 ui::MenuSourceType, |
685 gfx::Point /* location where menu should be shown */) | 675 gfx::Point /* location where menu should be shown */) |
686 | 676 |
687 // Sent when the user wants to search for a word on the page (find in page). | |
688 IPC_MESSAGE_ROUTED3(ViewMsg_Find, | |
689 int /* request_id */, | |
690 base::string16 /* search_text */, | |
691 blink::WebFindOptions) | |
692 | |
693 // This message notifies the renderer that the user has closed the FindInPage | |
694 // window (and what action to take regarding the selection). | |
695 IPC_MESSAGE_ROUTED1(ViewMsg_StopFinding, | |
696 content::StopFindAction /* action */) | |
697 | |
698 // Copies the image at location x, y to the clipboard (if there indeed is an | 677 // Copies the image at location x, y to the clipboard (if there indeed is an |
699 // image at that location). | 678 // image at that location). |
700 IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt, | 679 IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt, |
701 int /* x */, | 680 int /* x */, |
702 int /* y */) | 681 int /* y */) |
703 | 682 |
704 // Saves the image at location x, y to the disk (if there indeed is an | 683 // Saves the image at location x, y to the disk (if there indeed is an |
705 // image at that location). | 684 // image at that location). |
706 IPC_MESSAGE_ROUTED2(ViewMsg_SaveImageAt, | 685 IPC_MESSAGE_ROUTED2(ViewMsg_SaveImageAt, |
707 int /* x */, | 686 int /* x */, |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 int /* AppleAquaColorVariant */, | 886 int /* AppleAquaColorVariant */, |
908 std::string /* AppleHighlightedTextColor */, | 887 std::string /* AppleHighlightedTextColor */, |
909 std::string /* AppleHighlightColor */) | 888 std::string /* AppleHighlightColor */) |
910 #endif | 889 #endif |
911 | 890 |
912 #if defined(OS_ANDROID) | 891 #if defined(OS_ANDROID) |
913 // Tells the renderer to suspend/resume the webkit timers. | 892 // Tells the renderer to suspend/resume the webkit timers. |
914 IPC_MESSAGE_CONTROL1(ViewMsg_SetWebKitSharedTimersSuspended, | 893 IPC_MESSAGE_CONTROL1(ViewMsg_SetWebKitSharedTimersSuspended, |
915 bool /* suspend */) | 894 bool /* suspend */) |
916 | 895 |
917 // Sent when the browser wants the bounding boxes of the current find matches. | |
918 // | |
919 // If match rects are already cached on the browser side, |current_version| | |
920 // should be the version number from the ViewHostMsg_FindMatchRects_Reply | |
921 // they came in, so the renderer can tell if it needs to send updated rects. | |
922 // Otherwise just pass -1 to always receive the list of rects. | |
923 // | |
924 // There must be an active search string (it is probably most useful to call | |
925 // this immediately after a ViewHostMsg_Find_Reply message arrives with | |
926 // final_update set to true). | |
927 IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects, | |
928 int /* current_version */) | |
929 | |
930 // Notifies the renderer whether hiding/showing the top controls is enabled | 896 // Notifies the renderer whether hiding/showing the top controls is enabled |
931 // and whether or not to animate to the proper state. | 897 // and whether or not to animate to the proper state. |
932 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState, | 898 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState, |
933 bool /* enable_hiding */, | 899 bool /* enable_hiding */, |
934 bool /* enable_showing */, | 900 bool /* enable_showing */, |
935 bool /* animate */) | 901 bool /* animate */) |
936 | 902 |
937 IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded) | 903 IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded) |
938 | 904 |
939 // Extracts the data at the given rect, returning it through the | 905 // Extracts the data at the given rect, returning it through the |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1064 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can | 1030 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can |
1065 // throttle these messages. | 1031 // throttle these messages. |
1066 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK) | 1032 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK) |
1067 | 1033 |
1068 // Sent by the renderer process to request that the browser move the view. | 1034 // Sent by the renderer process to request that the browser move the view. |
1069 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and | 1035 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and |
1070 // the browser may ignore this message. | 1036 // the browser may ignore this message. |
1071 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove, | 1037 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove, |
1072 gfx::Rect /* position */) | 1038 gfx::Rect /* position */) |
1073 | 1039 |
1074 // Result of string search in the page. | |
1075 // Response to ViewMsg_Find with the results of the requested find-in-page | |
1076 // search, the number of matches found and the selection rect (in screen | |
1077 // coordinates) for the string found. If |final_update| is false, it signals | |
1078 // that this is not the last Find_Reply message - more will be sent as the | |
1079 // scoping effort continues. | |
1080 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply, | |
1081 int /* request_id */, | |
1082 int /* number of matches */, | |
1083 gfx::Rect /* selection_rect */, | |
1084 int /* active_match_ordinal */, | |
1085 bool /* final_update */) | |
1086 | |
1087 // Indicates that the render view has been closed in respose to a | 1040 // Indicates that the render view has been closed in respose to a |
1088 // Close message. | 1041 // Close message. |
1089 IPC_MESSAGE_CONTROL1(ViewHostMsg_Close_ACK, | 1042 IPC_MESSAGE_CONTROL1(ViewHostMsg_Close_ACK, |
1090 int /* old_route_id */) | 1043 int /* old_route_id */) |
1091 | 1044 |
1092 // Indicates that the current page has been closed, after a ClosePage | 1045 // Indicates that the current page has been closed, after a ClosePage |
1093 // message. | 1046 // message. |
1094 IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK) | 1047 IPC_MESSAGE_ROUTED0(ViewHostMsg_ClosePage_ACK) |
1095 | 1048 |
1096 // Notifies the browser that we have session history information. | 1049 // Notifies the browser that we have session history information. |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1357 // TODO(kenrb): This, and all ViewHostMsg_* messages that actually pertain to | 1310 // TODO(kenrb): This, and all ViewHostMsg_* messages that actually pertain to |
1358 // RenderWidget(Host), should be renamed to WidgetHostMsg_*. | 1311 // RenderWidget(Host), should be renamed to WidgetHostMsg_*. |
1359 // See https://crbug.com/537793. | 1312 // See https://crbug.com/537793. |
1360 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidFirstPaintAfterLoad) | 1313 IPC_MESSAGE_ROUTED0(ViewHostMsg_DidFirstPaintAfterLoad) |
1361 | 1314 |
1362 // Sent by the renderer to deliver a compositor proto to the browser. | 1315 // Sent by the renderer to deliver a compositor proto to the browser. |
1363 IPC_MESSAGE_ROUTED1(ViewHostMsg_ForwardCompositorProto, | 1316 IPC_MESSAGE_ROUTED1(ViewHostMsg_ForwardCompositorProto, |
1364 std::vector<uint8_t> /* proto */) | 1317 std::vector<uint8_t> /* proto */) |
1365 | 1318 |
1366 #if defined(OS_ANDROID) | 1319 #if defined(OS_ANDROID) |
1367 // Response to ViewMsg_FindMatchRects. | |
1368 // | |
1369 // |version| will contain the current version number of the renderer's find | |
1370 // match list (incremented whenever they change), which should be passed in the | |
1371 // next call to ViewMsg_FindMatchRects. | |
1372 // | |
1373 // |rects| will either contain a list of the enclosing rects of all matches | |
1374 // found by the most recent Find operation, or will be empty if |version| is not | |
1375 // greater than the |current_version| passed to ViewMsg_FindMatchRects (hence | |
1376 // your locally cached rects should still be valid). The rect coords will be | |
1377 // custom normalized fractions of the document size. The rects will be sorted by | |
1378 // frame traversal order starting in the main frame, then by dom order. | |
1379 // | |
1380 // |active_rect| will contain the bounding box of the active find-in-page match | |
1381 // marker, in similarly normalized coords (or an empty rect if there isn't one). | |
1382 IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply, | |
1383 int /* version */, | |
1384 std::vector<gfx::RectF> /* rects */, | |
1385 gfx::RectF /* active_rect */) | |
1386 | |
1387 // Start an android intent with the given URI. | 1320 // Start an android intent with the given URI. |
1388 IPC_MESSAGE_ROUTED2(ViewHostMsg_StartContentIntent, | 1321 IPC_MESSAGE_ROUTED2(ViewHostMsg_StartContentIntent, |
1389 GURL /* content_url */, | 1322 GURL /* content_url */, |
1390 bool /* is_main_frame */) | 1323 bool /* is_main_frame */) |
1391 | 1324 |
1392 // Reply to the ViewMsg_ExtractSmartClipData message. | 1325 // Reply to the ViewMsg_ExtractSmartClipData message. |
1393 IPC_MESSAGE_ROUTED3(ViewHostMsg_SmartClipDataExtracted, | 1326 IPC_MESSAGE_ROUTED3(ViewHostMsg_SmartClipDataExtracted, |
1394 base::string16 /* text */, | 1327 base::string16 /* text */, |
1395 base::string16 /* html */, | 1328 base::string16 /* html */, |
1396 gfx::Rect /* rect */) | 1329 gfx::Rect /* rect */) |
(...skipping 13 matching lines...) Expand all Loading... |
1410 // Instructs the browser to start plugin IME. | 1343 // Instructs the browser to start plugin IME. |
1411 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme) | 1344 IPC_MESSAGE_ROUTED0(ViewHostMsg_StartPluginIme) |
1412 | 1345 |
1413 // Receives content of a web page as plain text. | 1346 // Receives content of a web page as plain text. |
1414 IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted, std::string) | 1347 IPC_MESSAGE_ROUTED1(ViewMsg_GetRenderedTextCompleted, std::string) |
1415 #endif | 1348 #endif |
1416 | 1349 |
1417 // Adding a new message? Stick to the sort order above: first platform | 1350 // Adding a new message? Stick to the sort order above: first platform |
1418 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform | 1351 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform |
1419 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. | 1352 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. |
OLD | NEW |