| 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 "base/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
| 9 #include "base/process/process.h" | 9 #include "base/process/process.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 IPC_STRUCT_END() | 327 IPC_STRUCT_END() |
| 328 | 328 |
| 329 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params) | 329 IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params) |
| 330 IPC_STRUCT_MEMBER(gfx::Rect, anchor_rect) | 330 IPC_STRUCT_MEMBER(gfx::Rect, anchor_rect) |
| 331 IPC_STRUCT_MEMBER(blink::WebTextDirection, anchor_dir) | 331 IPC_STRUCT_MEMBER(blink::WebTextDirection, anchor_dir) |
| 332 IPC_STRUCT_MEMBER(gfx::Rect, focus_rect) | 332 IPC_STRUCT_MEMBER(gfx::Rect, focus_rect) |
| 333 IPC_STRUCT_MEMBER(blink::WebTextDirection, focus_dir) | 333 IPC_STRUCT_MEMBER(blink::WebTextDirection, focus_dir) |
| 334 IPC_STRUCT_MEMBER(bool, is_anchor_first) | 334 IPC_STRUCT_MEMBER(bool, is_anchor_first) |
| 335 IPC_STRUCT_END() | 335 IPC_STRUCT_END() |
| 336 | 336 |
| 337 // This message is used for supporting popup menus on Mac OS X using native | |
| 338 // Cocoa controls. The renderer sends us this message which we use to populate | |
| 339 // the popup menu. | |
| 340 IPC_STRUCT_BEGIN(ViewHostMsg_ShowPopup_Params) | |
| 341 // Position on the screen. | |
| 342 IPC_STRUCT_MEMBER(gfx::Rect, bounds) | |
| 343 | |
| 344 // The height of each item in the menu. | |
| 345 IPC_STRUCT_MEMBER(int, item_height) | |
| 346 | |
| 347 // The size of the font to use for those items. | |
| 348 IPC_STRUCT_MEMBER(double, item_font_size) | |
| 349 | |
| 350 // The currently selected (displayed) item in the menu. | |
| 351 IPC_STRUCT_MEMBER(int, selected_item) | |
| 352 | |
| 353 // The entire list of items in the popup menu. | |
| 354 IPC_STRUCT_MEMBER(std::vector<content::MenuItem>, popup_items) | |
| 355 | |
| 356 // Whether items should be right-aligned. | |
| 357 IPC_STRUCT_MEMBER(bool, right_aligned) | |
| 358 | |
| 359 // Whether this is a multi-select popup. | |
| 360 IPC_STRUCT_MEMBER(bool, allow_multiple_selection) | |
| 361 IPC_STRUCT_END() | |
| 362 | |
| 363 IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params) | 337 IPC_STRUCT_BEGIN(ViewHostMsg_TextInputState_Params) |
| 364 // The type of input field | 338 // The type of input field |
| 365 IPC_STRUCT_MEMBER(ui::TextInputType, type) | 339 IPC_STRUCT_MEMBER(ui::TextInputType, type) |
| 366 | 340 |
| 367 // The mode of input field | 341 // The mode of input field |
| 368 IPC_STRUCT_MEMBER(ui::TextInputMode, mode) | 342 IPC_STRUCT_MEMBER(ui::TextInputMode, mode) |
| 369 | 343 |
| 370 // The flags of the input field (autocorrect, autocomplete, etc.) | 344 // The flags of the input field (autocorrect, autocomplete, etc.) |
| 371 IPC_STRUCT_MEMBER(int, flags) | 345 IPC_STRUCT_MEMBER(int, flags) |
| 372 | 346 |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 902 // should be the version number from the ViewHostMsg_FindMatchRects_Reply | 876 // should be the version number from the ViewHostMsg_FindMatchRects_Reply |
| 903 // they came in, so the renderer can tell if it needs to send updated rects. | 877 // they came in, so the renderer can tell if it needs to send updated rects. |
| 904 // Otherwise just pass -1 to always receive the list of rects. | 878 // Otherwise just pass -1 to always receive the list of rects. |
| 905 // | 879 // |
| 906 // There must be an active search string (it is probably most useful to call | 880 // There must be an active search string (it is probably most useful to call |
| 907 // this immediately after a ViewHostMsg_Find_Reply message arrives with | 881 // this immediately after a ViewHostMsg_Find_Reply message arrives with |
| 908 // final_update set to true). | 882 // final_update set to true). |
| 909 IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects, | 883 IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects, |
| 910 int /* current_version */) | 884 int /* current_version */) |
| 911 | 885 |
| 912 // External popup menus. | |
| 913 IPC_MESSAGE_ROUTED2(ViewMsg_SelectPopupMenuItems, | |
| 914 bool /* user canceled the popup */, | |
| 915 std::vector<int> /* selected indices */) | |
| 916 | |
| 917 // Notifies the renderer whether hiding/showing the top controls is enabled | 886 // Notifies the renderer whether hiding/showing the top controls is enabled |
| 918 // and whether or not to animate to the proper state. | 887 // and whether or not to animate to the proper state. |
| 919 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState, | 888 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState, |
| 920 bool /* enable_hiding */, | 889 bool /* enable_hiding */, |
| 921 bool /* enable_showing */, | 890 bool /* enable_showing */, |
| 922 bool /* animate */) | 891 bool /* animate */) |
| 923 | 892 |
| 924 IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded) | 893 IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded) |
| 925 | 894 |
| 926 // Sent by the browser when the renderer should generate a new frame. | 895 // Sent by the browser when the renderer should generate a new frame. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 948 | 917 |
| 949 // Message sent from the browser to the renderer when the user starts or stops | 918 // Message sent from the browser to the renderer when the user starts or stops |
| 950 // resizing the view. | 919 // resizing the view. |
| 951 IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize, | 920 IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize, |
| 952 bool /* enable */) | 921 bool /* enable */) |
| 953 | 922 |
| 954 // Tell the renderer that plugin IME has completed. | 923 // Tell the renderer that plugin IME has completed. |
| 955 IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted, | 924 IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted, |
| 956 base::string16 /* text */, | 925 base::string16 /* text */, |
| 957 int /* plugin_id */) | 926 int /* plugin_id */) |
| 958 | |
| 959 // External popup menus. | |
| 960 IPC_MESSAGE_ROUTED1(ViewMsg_SelectPopupMenuItem, | |
| 961 int /* selected index, -1 means no selection */) | |
| 962 #endif | 927 #endif |
| 963 | 928 |
| 964 // Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame. | 929 // Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame. |
| 965 IPC_MESSAGE_ROUTED2(ViewMsg_SwapCompositorFrameAck, | 930 IPC_MESSAGE_ROUTED2(ViewMsg_SwapCompositorFrameAck, |
| 966 uint32 /* output_surface_id */, | 931 uint32 /* output_surface_id */, |
| 967 cc::CompositorFrameAck /* ack */) | 932 cc::CompositorFrameAck /* ack */) |
| 968 | 933 |
| 969 // Sent by browser to tell renderer compositor that some resources that were | 934 // Sent by browser to tell renderer compositor that some resources that were |
| 970 // given to the browser in a swap are not being used anymore. | 935 // given to the browser in a swap are not being used anymore. |
| 971 IPC_MESSAGE_ROUTED2(ViewMsg_ReclaimCompositorResources, | 936 IPC_MESSAGE_ROUTED2(ViewMsg_ReclaimCompositorResources, |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1073 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can | 1038 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can |
| 1074 // throttle these messages. | 1039 // throttle these messages. |
| 1075 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK) | 1040 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK) |
| 1076 | 1041 |
| 1077 // Sent by the renderer process to request that the browser move the view. | 1042 // Sent by the renderer process to request that the browser move the view. |
| 1078 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and | 1043 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and |
| 1079 // the browser may ignore this message. | 1044 // the browser may ignore this message. |
| 1080 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove, | 1045 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove, |
| 1081 gfx::Rect /* position */) | 1046 gfx::Rect /* position */) |
| 1082 | 1047 |
| 1083 #if defined(OS_MACOSX) || defined(OS_ANDROID) | |
| 1084 // Message to show/hide a popup menu using native controls. | |
| 1085 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowPopup, | |
| 1086 ViewHostMsg_ShowPopup_Params) | |
| 1087 IPC_MESSAGE_ROUTED0(ViewHostMsg_HidePopup) | |
| 1088 #endif | |
| 1089 | |
| 1090 // Result of string search in the page. | 1048 // Result of string search in the page. |
| 1091 // Response to ViewMsg_Find with the results of the requested find-in-page | 1049 // Response to ViewMsg_Find with the results of the requested find-in-page |
| 1092 // search, the number of matches found and the selection rect (in screen | 1050 // search, the number of matches found and the selection rect (in screen |
| 1093 // coordinates) for the string found. If |final_update| is false, it signals | 1051 // coordinates) for the string found. If |final_update| is false, it signals |
| 1094 // that this is not the last Find_Reply message - more will be sent as the | 1052 // that this is not the last Find_Reply message - more will be sent as the |
| 1095 // scoping effort continues. | 1053 // scoping effort continues. |
| 1096 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply, | 1054 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply, |
| 1097 int /* request_id */, | 1055 int /* request_id */, |
| 1098 int /* number of matches */, | 1056 int /* number of matches */, |
| 1099 gfx::Rect /* selection_rect */, | 1057 gfx::Rect /* selection_rect */, |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1667 // Since the browser keeps handles to the allocated transport DIBs, this | 1625 // Since the browser keeps handles to the allocated transport DIBs, this |
| 1668 // message is sent to tell the browser that it may release them when the | 1626 // message is sent to tell the browser that it may release them when the |
| 1669 // renderer is finished with them. | 1627 // renderer is finished with them. |
| 1670 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB, | 1628 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB, |
| 1671 TransportDIB::Id /* DIB id */) | 1629 TransportDIB::Id /* DIB id */) |
| 1672 #endif | 1630 #endif |
| 1673 | 1631 |
| 1674 // Adding a new message? Stick to the sort order above: first platform | 1632 // Adding a new message? Stick to the sort order above: first platform |
| 1675 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform | 1633 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform |
| 1676 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. | 1634 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. |
| OLD | NEW |