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

Unified Diff: content/browser/web_contents/web_contents_view_mac.mm

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/web_contents/web_contents_view_mac.mm
diff --git a/content/browser/web_contents/web_contents_view_mac.mm b/content/browser/web_contents/web_contents_view_mac.mm
index b03012f43d9b5f51b0097d3fd1e7f93c264dc4f7..8ceb079948baa7295abdf0146a74a7b192158e20 100644
--- a/content/browser/web_contents/web_contents_view_mac.mm
+++ b/content/browser/web_contents/web_contents_view_mac.mm
@@ -10,6 +10,7 @@
#import "base/mac/scoped_sending_event.h"
#import "base/message_pump_mac.h"
+#include "content/browser/renderer_host/popup_menu_helper_mac.h"
#include "content/browser/renderer_host/render_view_host_factory.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_view_mac.h"
@@ -287,6 +288,21 @@ void WebContentsViewMac::ShowContextMenu(
DLOG(ERROR) << "Cannot show context menus without a delegate.";
}
+// Display a popup menu for WebKit using Cocoa widgets.
+void WebContentsViewMac::ShowPopupMenu(
+ const gfx::Rect& bounds,
+ int item_height,
+ double item_font_size,
+ int selected_item,
+ const std::vector<WebMenuItem>& items,
+ bool right_aligned,
+ bool allow_multiple_selection) {
+ PopupMenuHelper popup_menu_helper(web_contents_->GetRenderViewHost());
+ popup_menu_helper.ShowPopupMenu(bounds, item_height, item_font_size,
+ selected_item, items, right_aligned,
+ allow_multiple_selection);
+}
+
bool WebContentsViewMac::IsEventTracking() const {
return base::MessagePumpMac::IsHandlingSendEvent();
}
« no previous file with comments | « content/browser/web_contents/web_contents_view_mac.h ('k') | content/browser/web_contents/web_contents_view_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698