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

Unified Diff: content/common/frame_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: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/web_contents/web_contents_view_mac.mm ('k') | content/common/view_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/frame_messages.h
diff --git a/content/common/frame_messages.h b/content/common/frame_messages.h
index 255bdceb400c4ca6fe4ede5b4c29fc89d45fdefa..d77d9e6328d2ec9e3b4200f2a7266d1cbd211028 100644
--- a/content/common/frame_messages.h
+++ b/content/common/frame_messages.h
@@ -305,6 +305,33 @@ IPC_STRUCT_BEGIN(FrameHostMsg_BeginNavigation_Params)
IPC_STRUCT_MEMBER(bool, allow_download)
IPC_STRUCT_END()
+#if defined(OS_MACOSX) || defined(OS_ANDROID)
+// This message is used for supporting popup menus on Mac OS X and Android using
+// native controls. See the FrameHostMsg_ShowPopup message.
+IPC_STRUCT_BEGIN(FrameHostMsg_ShowPopup_Params)
+ // Position on the screen.
+ IPC_STRUCT_MEMBER(gfx::Rect, bounds)
+
+ // The height of each item in the menu.
+ IPC_STRUCT_MEMBER(int, item_height)
+
+ // The size of the font to use for those items.
+ IPC_STRUCT_MEMBER(double, item_font_size)
+
+ // The currently selected (displayed) item in the menu.
+ IPC_STRUCT_MEMBER(int, selected_item)
+
+ // The entire list of items in the popup menu.
+ IPC_STRUCT_MEMBER(std::vector<content::MenuItem>, popup_items)
+
+ // Whether items should be right-aligned.
+ IPC_STRUCT_MEMBER(bool, right_aligned)
+
+ // Whether this is a multi-select popup.
+ IPC_STRUCT_MEMBER(bool, allow_multiple_selection)
+IPC_STRUCT_END()
+#endif
+
// -----------------------------------------------------------------------------
// Messages sent from the browser to the renderer.
@@ -439,6 +466,21 @@ IPC_MESSAGE_ROUTED1(FrameMsg_AddStyleSheetByURL, std::string)
IPC_MESSAGE_ROUTED1(FrameMsg_SetAccessibilityMode,
AccessibilityMode)
+#if defined(OS_ANDROID)
+
+// External popup menus.
+IPC_MESSAGE_ROUTED2(FrameMsg_SelectPopupMenuItems,
+ bool /* user canceled the popup */,
+ std::vector<int> /* selected indices */)
+
+#elif defined(OS_MACOSX)
+
+// External popup menus.
+IPC_MESSAGE_ROUTED1(FrameMsg_SelectPopupMenuItem,
+ int /* selected index, -1 means no selection */)
+
+#endif
+
// -----------------------------------------------------------------------------
// Messages sent from the renderer to the browser.
@@ -718,3 +760,12 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_BeginNavigation,
// Sent once a paint happens after the first non empty layout. In other words
// after the frame has painted something.
IPC_MESSAGE_ROUTED0(FrameHostMsg_DidFirstVisuallyNonEmptyPaint)
+
+#if defined(OS_MACOSX) || defined(OS_ANDROID)
+
+// Message to show/hide a popup menu using native controls.
+IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup,
+ FrameHostMsg_ShowPopup_Params)
+IPC_MESSAGE_ROUTED0(FrameHostMsg_HidePopup)
+
+#endif
« no previous file with comments | « content/browser/web_contents/web_contents_view_mac.mm ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698