diff options
Diffstat (limited to 'lib/web_contents_adapter_client.h')
-rw-r--r-- | lib/web_contents_adapter_client.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/web_contents_adapter_client.h b/lib/web_contents_adapter_client.h index 39968a8a5..8e92ead7c 100644 --- a/lib/web_contents_adapter_client.h +++ b/lib/web_contents_adapter_client.h @@ -47,12 +47,28 @@ #include <QString> #include <QUrl> - class RenderWidgetHostViewQt; class RenderWidgetHostViewQtDelegate; class WebContentsAdapter; class WebContentsDelegateQt; +// FIXME: make this ref-counted and implicitely shared and expose as public API maybe ? +class WebEngineContextMenuData { + +public: + QPoint pos; + QUrl linkUrl; + QString linkText; + QString selectedText; +// Some likely candidates for future additions as we add support for the related actions: +// bool isImageBlocked; +// bool isEditable; +// bool isSpellCheckingEnabled; +// QStringList spellCheckingSuggestions; +// <enum tbd> mediaType; +// ... +}; + class QWEBENGINE_EXPORT WebContentsAdapterClient { public: enum CompositingMode { @@ -87,6 +103,7 @@ public: virtual void loadFinished(bool success) = 0; virtual void focusContainer() = 0; virtual void adoptNewWindow(WebContentsAdapter *newWebContents, WindowOpenDisposition disposition) = 0; + virtual bool contextMenuRequested(const WebEngineContextMenuData&) = 0; }; #endif // WEB_CONTENTS_ADAPTER_CLIENT_H |