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

Unified Diff: content/renderer/external_popup_menu.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
« no previous file with comments | « content/renderer/external_popup_menu.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/external_popup_menu.cc
diff --git a/content/renderer/external_popup_menu.cc b/content/renderer/external_popup_menu.cc
index a8c1ea852b37e48763c4056122be2505d74d0c7d..218bb33c18c83606c50723ecbf57151d8c7ec307 100644
--- a/content/renderer/external_popup_menu.cc
+++ b/content/renderer/external_popup_menu.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -27,6 +27,8 @@ void ExternalPopupMenu::show(const WebKit::WebRect& bounds) {
for (size_t i = 0; i < popup_menu_info_.items.size(); ++i)
popup_params.popup_items.push_back(WebMenuItem(popup_menu_info_.items[i]));
popup_params.right_aligned = popup_menu_info_.rightAligned;
+ popup_params.allow_multiple_selection =
+ popup_menu_info_.allowMultipleSelection;
render_view_->Send(
new ViewHostMsg_ShowPopup(render_view_->routing_id(), popup_params));
}
@@ -36,6 +38,7 @@ void ExternalPopupMenu::close() {
render_view_ = NULL;
}
+#if defined(OS_MACOSX)
void ExternalPopupMenu::DidSelectItem(int index) {
if (!popup_menu_client_)
return;
@@ -44,3 +47,17 @@ void ExternalPopupMenu::DidSelectItem(int index) {
else
popup_menu_client_->didAcceptIndex(index);
}
+#endif
+
+#if defined(OS_ANDROID)
+void ExternalPopupMenu::DidSelectItems(bool canceled,
+ const std::vector<int>& indices) {
+ if (!popup_menu_client_)
+ return;
+ if (canceled)
+ popup_menu_client_->didCancel();
+ else
+ popup_menu_client_->didAcceptIndices(indices);
+}
+#endif
+
« no previous file with comments | « content/renderer/external_popup_menu.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698