Fix building on Mac

This commit is contained in:
Cheng Zhao 2014-11-28 19:50:10 +08:00
parent ef8b20af65
commit f78f94d4f1

View file

@ -58,10 +58,10 @@ void MenuMac::PopupAt(Window* window, int x, int y) {
if (!web_contents) if (!web_contents)
return; return;
NSView* view = web_contents->GetContentNativeView();
NSMenu* menu = [menu_controller menu];
base::scoped_nsobject<AtomMenuController> menu_controller( base::scoped_nsobject<AtomMenuController> menu_controller(
[[AtomMenuController alloc] initWithModel:model_.get()]); [[AtomMenuController alloc] initWithModel:model_.get()]);
NSMenu* menu = [menu_controller menu];
NSView* view = web_contents->GetContentNativeView();
// Show the menu. // Show the menu.
[menu popUpMenuPositioningItem:[menu itemAtIndex:0] [menu popUpMenuPositioningItem:[menu itemAtIndex:0]