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

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

Issue 501583003: Move external popup menus from WebViewClient to WebFrameClient, part 3/3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nicer ipc Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
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
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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 // should be the version number from the ViewHostMsg_FindMatchRects_Reply 879 // should be the version number from the ViewHostMsg_FindMatchRects_Reply
906 // they came in, so the renderer can tell if it needs to send updated rects. 880 // they came in, so the renderer can tell if it needs to send updated rects.
907 // Otherwise just pass -1 to always receive the list of rects. 881 // Otherwise just pass -1 to always receive the list of rects.
908 // 882 //
909 // There must be an active search string (it is probably most useful to call 883 // There must be an active search string (it is probably most useful to call
910 // this immediately after a ViewHostMsg_Find_Reply message arrives with 884 // this immediately after a ViewHostMsg_Find_Reply message arrives with
911 // final_update set to true). 885 // final_update set to true).
912 IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects, 886 IPC_MESSAGE_ROUTED1(ViewMsg_FindMatchRects,
913 int /* current_version */) 887 int /* current_version */)
914 888
915 // External popup menus.
916 IPC_MESSAGE_ROUTED2(ViewMsg_SelectPopupMenuItems,
917 bool /* user canceled the popup */,
918 std::vector<int> /* selected indices */)
919
920 // Notifies the renderer whether hiding/showing the top controls is enabled 889 // Notifies the renderer whether hiding/showing the top controls is enabled
921 // and whether or not to animate to the proper state. 890 // and whether or not to animate to the proper state.
922 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState, 891 IPC_MESSAGE_ROUTED3(ViewMsg_UpdateTopControlsState,
923 bool /* enable_hiding */, 892 bool /* enable_hiding */,
924 bool /* enable_showing */, 893 bool /* enable_showing */,
925 bool /* animate */) 894 bool /* animate */)
926 895
927 IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded) 896 IPC_MESSAGE_ROUTED0(ViewMsg_ShowImeIfNeeded)
928 897
929 // Sent by the browser when the renderer should generate a new frame. 898 // Sent by the browser when the renderer should generate a new frame.
(...skipping 21 matching lines...) Expand all
951 920
952 // Message sent from the browser to the renderer when the user starts or stops 921 // Message sent from the browser to the renderer when the user starts or stops
953 // resizing the view. 922 // resizing the view.
954 IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize, 923 IPC_MESSAGE_ROUTED1(ViewMsg_SetInLiveResize,
955 bool /* enable */) 924 bool /* enable */)
956 925
957 // Tell the renderer that plugin IME has completed. 926 // Tell the renderer that plugin IME has completed.
958 IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted, 927 IPC_MESSAGE_ROUTED2(ViewMsg_PluginImeCompositionCompleted,
959 base::string16 /* text */, 928 base::string16 /* text */,
960 int /* plugin_id */) 929 int /* plugin_id */)
961
962 // External popup menus.
963 IPC_MESSAGE_ROUTED1(ViewMsg_SelectPopupMenuItem,
964 int /* selected index, -1 means no selection */)
965 #endif 930 #endif
966 931
967 // Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame. 932 // Sent by the browser as a reply to ViewHostMsg_SwapCompositorFrame.
968 IPC_MESSAGE_ROUTED2(ViewMsg_SwapCompositorFrameAck, 933 IPC_MESSAGE_ROUTED2(ViewMsg_SwapCompositorFrameAck,
969 uint32 /* output_surface_id */, 934 uint32 /* output_surface_id */,
970 cc::CompositorFrameAck /* ack */) 935 cc::CompositorFrameAck /* ack */)
971 936
972 // Sent by browser to tell renderer compositor that some resources that were 937 // Sent by browser to tell renderer compositor that some resources that were
973 // given to the browser in a swap are not being used anymore. 938 // given to the browser in a swap are not being used anymore.
974 IPC_MESSAGE_ROUTED2(ViewMsg_ReclaimCompositorResources, 939 IPC_MESSAGE_ROUTED2(ViewMsg_ReclaimCompositorResources,
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can 1041 // Send in response to a ViewMsg_UpdateScreenRects so that the renderer can
1077 // throttle these messages. 1042 // throttle these messages.
1078 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK) 1043 IPC_MESSAGE_ROUTED0(ViewHostMsg_UpdateScreenRects_ACK)
1079 1044
1080 // Sent by the renderer process to request that the browser move the view. 1045 // Sent by the renderer process to request that the browser move the view.
1081 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and 1046 // This corresponds to the window.resizeTo() and window.moveTo() APIs, and
1082 // the browser may ignore this message. 1047 // the browser may ignore this message.
1083 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove, 1048 IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove,
1084 gfx::Rect /* position */) 1049 gfx::Rect /* position */)
1085 1050
1086 #if defined(OS_MACOSX) || defined(OS_ANDROID)
1087 // Message to show/hide a popup menu using native controls.
1088 IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowPopup,
1089 ViewHostMsg_ShowPopup_Params)
1090 IPC_MESSAGE_ROUTED0(ViewHostMsg_HidePopup)
1091 #endif
1092
1093 // Result of string search in the page. 1051 // Result of string search in the page.
1094 // Response to ViewMsg_Find with the results of the requested find-in-page 1052 // Response to ViewMsg_Find with the results of the requested find-in-page
1095 // search, the number of matches found and the selection rect (in screen 1053 // search, the number of matches found and the selection rect (in screen
1096 // coordinates) for the string found. If |final_update| is false, it signals 1054 // coordinates) for the string found. If |final_update| is false, it signals
1097 // that this is not the last Find_Reply message - more will be sent as the 1055 // that this is not the last Find_Reply message - more will be sent as the
1098 // scoping effort continues. 1056 // scoping effort continues.
1099 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply, 1057 IPC_MESSAGE_ROUTED5(ViewHostMsg_Find_Reply,
1100 int /* request_id */, 1058 int /* request_id */,
1101 int /* number of matches */, 1059 int /* number of matches */,
1102 gfx::Rect /* selection_rect */, 1060 gfx::Rect /* selection_rect */,
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
1670 // Since the browser keeps handles to the allocated transport DIBs, this 1628 // Since the browser keeps handles to the allocated transport DIBs, this
1671 // message is sent to tell the browser that it may release them when the 1629 // message is sent to tell the browser that it may release them when the
1672 // renderer is finished with them. 1630 // renderer is finished with them.
1673 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB, 1631 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB,
1674 TransportDIB::Id /* DIB id */) 1632 TransportDIB::Id /* DIB id */)
1675 #endif 1633 #endif
1676 1634
1677 // Adding a new message? Stick to the sort order above: first platform 1635 // Adding a new message? Stick to the sort order above: first platform
1678 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform 1636 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
1679 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. 1637 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698