diff --git a/atom/browser/api/atom_api_menu_views.cc b/atom/browser/api/atom_api_menu_views.cc index ed751e8dc030..c8c7ceb50acb 100644 --- a/atom/browser/api/atom_api_menu_views.cc +++ b/atom/browser/api/atom_api_menu_views.cc @@ -21,9 +21,10 @@ void MenuViews::Popup(Window* window) { } void MenuViews::PopupAt(Window* window, int x, int y) { - NativeWindow* nativeWindowViews = static_cast(window->window()); - content::RenderWidgetHostView* view = nativeWindowViews->GetWebContents()->GetRenderWidgetHostView(); - gfx::Point viewOrigin = view->GetViewBounds().origin(); + NativeWindow* nativeWindowViews = + static_cast(window->window()); + gfx::Point viewOrigin = nativeWindowViews->GetWebContents() + ->GetRenderWidgetHostView()->GetViewBounds().origin(); PopupAtPoint(window, gfx::Point(viewOrigin.x() + x, viewOrigin.y() + y)); }