diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebKit2/UIProcess/gtk/WebContextMenuProxyGtk.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebKit2/UIProcess/gtk/WebContextMenuProxyGtk.h')
-rw-r--r-- | Source/WebKit2/UIProcess/gtk/WebContextMenuProxyGtk.h | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/Source/WebKit2/UIProcess/gtk/WebContextMenuProxyGtk.h b/Source/WebKit2/UIProcess/gtk/WebContextMenuProxyGtk.h index ded4b7a84..144be9829 100644 --- a/Source/WebKit2/UIProcess/gtk/WebContextMenuProxyGtk.h +++ b/Source/WebKit2/UIProcess/gtk/WebContextMenuProxyGtk.h @@ -28,42 +28,41 @@ #if ENABLE(CONTEXT_MENUS) +#include "WebContextMenuItemGtk.h" #include "WebContextMenuProxy.h" -#include <WebCore/ContextMenu.h> #include <WebCore/IntPoint.h> #include <wtf/HashMap.h> +#include <wtf/glib/GRefPtr.h> + +typedef struct _GMenu GMenu; namespace WebKit { +class WebContextMenuItem; class WebContextMenuItemData; class WebPageProxy; class WebContextMenuProxyGtk : public WebContextMenuProxy { public: - static PassRefPtr<WebContextMenuProxyGtk> create(GtkWidget* webView, WebPageProxy* page) - { - return adoptRef(new WebContextMenuProxyGtk(webView, page)); - } + WebContextMenuProxyGtk(GtkWidget*, WebPageProxy&, const ContextMenuContextData&, const UserData&); ~WebContextMenuProxyGtk(); - virtual void showContextMenu(const WebCore::IntPoint&, const Vector<WebContextMenuItemData>&); - virtual void hideContextMenu(); - - void populate(Vector<WebCore::ContextMenuItem>&); - GtkMenu* gtkMenu() const { return m_menu.platformDescription(); } + void populate(const Vector<WebContextMenuItemGtk>&); + GtkMenu* gtkMenu() const { return m_menu; } private: - WebContextMenuProxyGtk(GtkWidget*, WebPageProxy*); - - void append(WebCore::ContextMenuItem&); - void populate(const Vector<WebContextMenuItemData>&); + void show() override; + void showContextMenuWithItems(const Vector<WebContextMenuItemData>&) override; + void append(GMenu*, const WebContextMenuItemGtk&); + GRefPtr<GMenu> buildMenu(const Vector<WebContextMenuItemGtk>&); + void populate(const Vector<RefPtr<WebContextMenuItem>>&); static void menuPositionFunction(GtkMenu*, gint*, gint*, gboolean*, WebContextMenuProxyGtk*); GtkWidget* m_webView; WebPageProxy* m_page; - WebCore::ContextMenu m_menu; + GtkMenu* m_menu; WebCore::IntPoint m_popupPosition; - HashMap<unsigned long, GtkAction*> m_signalHandlers; + HashMap<unsigned long, void*> m_signalHandlers; }; |