diff options
author | Pierre Rossi <pierre.rossi@digia.com> | 2014-01-30 18:26:21 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-12 13:15:24 +0100 |
commit | 9c198939be1ef064d1a2430a4b9991f2fe16f359 (patch) | |
tree | 1b081d0379c82c8cc34a0d80aa2846e36f37951e /src/webenginewidgets/api/qwebenginepage_p.h | |
parent | f2cd2e0a32e8da3a0fbff6271dd9c257d8e8867f (diff) |
[Widgets] RenderWidgetHostViewQtDelegate refactoring
Break up the delegate implementation into two distinct subclasses.
The first one offers a way for the WebPage to tap into the
RenderWidgetHostView directly, while a different implementation
that is backed by a top-level widget can be used to show WebUI
popups on screen.
This has the benefit of not having a child widget in the webview
among other things. It also fixes our popups and allows them to fall
outside the window frame.
Change-Id: I80dc1e4f21bb91ff47c75a626d330f88eacce8c6
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'src/webenginewidgets/api/qwebenginepage_p.h')
-rw-r--r-- | src/webenginewidgets/api/qwebenginepage_p.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/webenginewidgets/api/qwebenginepage_p.h b/src/webenginewidgets/api/qwebenginepage_p.h index 0fa4299d8..b905cee6d 100644 --- a/src/webenginewidgets/api/qwebenginepage_p.h +++ b/src/webenginewidgets/api/qwebenginepage_p.h @@ -45,6 +45,7 @@ #include "qwebenginepage.h" #include "web_contents_adapter_client.h" +#include "render_widget_host_view_qt_delegate_webpage.h" #include <QtCore/private/qobject_p.h> #include <QtCore/qcompilerdetection.h> #include <QSharedData> @@ -66,6 +67,7 @@ public: ~QWebEnginePagePrivate(); virtual RenderWidgetHostViewQtDelegate* CreateRenderWidgetHostViewQtDelegate(RenderWidgetHostViewQtDelegateClient *client, RenderingMode mode) Q_DECL_OVERRIDE; + virtual RenderWidgetHostViewQtDelegate* CreateRenderWidgetHostViewQtDelegateForPopup(RenderWidgetHostViewQtDelegateClient *client, RenderingMode) Q_DECL_OVERRIDE; virtual void titleChanged(const QString&) Q_DECL_OVERRIDE; virtual void urlChanged(const QUrl&) Q_DECL_OVERRIDE; virtual void iconChanged(const QUrl&) Q_DECL_OVERRIDE; @@ -99,6 +101,7 @@ public: mutable QAction *actions[QWebEnginePage::WebActionCount]; bool m_isLoading; WebEngineContextMenuData m_menuData; + QPointer<RenderWidgetHostViewQtDelegateWebPage> m_rwhvDelegate; typedef QtWebEnginePrivate::QWebEngineCallbackPrivateBase<const QVariant&> VariantCallback; typedef QtWebEnginePrivate::QWebEngineCallbackPrivateBase<const QString&> StringCallback; |