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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 10436010: Multi-select <select> in 'external popup window' (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase after reverts and re-reverts.. Created 8 years, 7 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
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 2301a973f8d227eaddde3f892d5d19ccc22cb384..0a84ff3bbe5cfab21d29c94572a118d4b7ba189e 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -1533,6 +1533,19 @@ void RenderViewHostImpl::DidCancelPopupMenu() {
}
#endif
+#if defined(OS_ANDROID)
+void RenderViewHostImpl::DidSelectPopupMenuItems(
+ const std::vector<int>& selected_indices) {
+ Send(new ViewMsg_SelectPopupMenuItems(GetRoutingID(), false,
+ selected_indices));
+}
+
+void RenderViewHostImpl::DidCancelPopupMenu() {
+ Send(new ViewMsg_SelectPopupMenuItems(GetRoutingID(), true,
+ std::vector<int>()));
+}
+#endif
+
void RenderViewHostImpl::SendOrientationChangeEvent(int orientation) {
Send(new ViewMsg_OrientationChangeEvent(GetRoutingID(), orientation));
}
@@ -1788,13 +1801,19 @@ void RenderViewHostImpl::OnCancelDesktopNotification(int notification_id) {
GetProcess()->GetID(), GetRoutingID(), notification_id);
}
-#if defined(OS_MACOSX)
+#if defined(OS_MACOSX) || defined(OS_ANDROID)
void RenderViewHostImpl::OnMsgShowPopup(
const ViewHostMsg_ShowPopup_Params& params) {
- PopupMenuHelper popup_menu_helper(this);
- popup_menu_helper.ShowPopupMenu(params.bounds, params.item_height,
- params.item_font_size, params.selected_item,
- params.popup_items, params.right_aligned);
+ RenderViewHostDelegateView* view = delegate_->GetDelegateView();
+ if (view) {
+ view->ShowPopupMenu(params.bounds,
+ params.item_height,
+ params.item_font_size,
+ params.selected_item,
+ params.popup_items,
+ params.right_aligned,
+ params.allow_multiple_selection);
+ }
}
#endif

Powered by Google App Engine
This is Rietveld 408576698