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

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 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 b2624fb26f1583ab6a4cf11bc7e7f21ee0db8177..93de712f06efc7c7481c2058752e9f520eefbfd5 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -1531,6 +1531,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));
}
@@ -1786,13 +1799,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
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/browser/renderer_host/render_view_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698