| Index: chrome/browser/tab_contents/tab_contents_view_mac.mm
|
| ===================================================================
|
| --- chrome/browser/tab_contents/tab_contents_view_mac.mm (revision 63740)
|
| +++ chrome/browser/tab_contents/tab_contents_view_mac.mm (working copy)
|
| @@ -20,6 +20,7 @@
|
| #include "chrome/browser/renderer_host/render_view_host_factory.h"
|
| #include "chrome/browser/renderer_host/render_widget_host.h"
|
| #include "chrome/browser/renderer_host/render_widget_host_view_mac.h"
|
| +#include "chrome/browser/tab_contents/popup_menu_helper_mac.h"
|
| #include "chrome/browser/tab_contents/render_view_context_menu_mac.h"
|
| #include "chrome/browser/tab_contents/tab_contents.h"
|
| #include "chrome/browser/tab_contents/tab_contents_delegate.h"
|
| @@ -252,6 +253,19 @@
|
| menu.Init();
|
| }
|
|
|
| +// Display a popup menu for WebKit using Cocoa widgets.
|
| +void TabContentsViewMac::ShowPopupMenu(
|
| + const gfx::Rect& bounds,
|
| + int item_height,
|
| + double item_font_size,
|
| + int selected_item,
|
| + const std::vector<WebMenuItem>& items,
|
| + bool right_aligned) {
|
| + PopupMenuHelper popup_menu_helper(tab_contents()->render_view_host());
|
| + popup_menu_helper.ShowPopupMenu(bounds, item_height, item_font_size,
|
| + selected_item, items, right_aligned);
|
| +}
|
| +
|
| RenderWidgetHostView* TabContentsViewMac::CreateNewWidgetInternal(
|
| int route_id,
|
| WebKit::WebPopupType popup_type) {
|
| @@ -263,9 +277,6 @@
|
| static_cast<RenderWidgetHostViewMac*>(widget_view);
|
| [widget_view_mac->native_view() retain];
|
|
|
| - // |widget_view_mac| needs to know how to position itself in our view.
|
| - widget_view_mac->set_parent_view(cocoa_view_);
|
| -
|
| return widget_view;
|
| }
|
|
|
|
|