diff options
Diffstat (limited to 'content/renderer/external_popup_menu.cc')
-rw-r--r-- | content/renderer/external_popup_menu.cc | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/content/renderer/external_popup_menu.cc b/content/renderer/external_popup_menu.cc index a8c1ea8..218bb33 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 + |