Chromium Code Reviews| Index: content/public/browser/web_contents_view_delegate.h |
| diff --git a/content/public/browser/web_contents_view_delegate.h b/content/public/browser/web_contents_view_delegate.h |
| index 7be6c6f6fc83ad2d43ee3b316692cecc0646e19f..4a7caf110d4fc589b169f9b5d94e4f77dd7aa77d 100644 |
| --- a/content/public/browser/web_contents_view_delegate.h |
| +++ b/content/public/browser/web_contents_view_delegate.h |
| @@ -9,6 +9,8 @@ |
| #import <Cocoa/Cocoa.h> |
| #endif |
| +#include <vector> |
| + |
| #include "base/callback_forward.h" |
| #include "content/common/content_export.h" |
| #include "ui/gfx/native_widget_types.h" |
| @@ -32,6 +34,7 @@ class RenderFrameHost; |
| class RenderWidgetHost; |
| class WebDragDestDelegate; |
| struct ContextMenuParams; |
| +struct MenuItem; |
| // This interface allows a client to extend the functionality of the |
| // WebContentsView implementation. |
| @@ -59,8 +62,25 @@ class CONTENT_EXPORT WebContentsViewDelegate { |
| virtual void TakeFocus(bool reverse); |
| virtual void SizeChanged(const gfx::Size& size); |
| - // Returns a newly-created delegate for the RenderWidgetHostViewMac, to handle |
| - // events on the responder chain. |
| +#if defined(USE_EXTERNAL_POPUP_MENU) |
|
Avi (use Gerrit)
2016/06/03 20:57:48
&& USE(AURA)
or whatever the ifdef there is.
haibinlu
2016/06/03 21:36:09
Done.
|
| + // Shows a popup menu with the specified items. |
| + // This method should call RenderFrameHost::DidSelectPopupMenuItem[s]() or |
| + // RenderFrameHost::DidCancelPopupMenu() based on the user action. |
| + virtual void ShowPopupMenu(RenderFrameHost* render_frame_host, |
| + const gfx::Rect& bounds, |
| + int item_height, |
| + double item_font_size, |
| + int selected_item, |
| + const std::vector<MenuItem>& items, |
| + bool right_aligned, |
| + bool allow_multiple_selection) {} |
| + |
| + // Hides a popup menu opened by ShowPopupMenu(). |
| + virtual void HidePopupMenu() {} |
| +#endif |
| + |
| +// Returns a newly-created delegate for the RenderWidgetHostViewMac, to handle |
| +// events on the responder chain. |
| #if defined(__OBJC__) |
| virtual NSObject<RenderWidgetHostViewMacDelegate>* |
| CreateRenderWidgetHostViewDelegate( |