From c470b7362cc19fa0d6d20ab8ddff0eb787cf7763 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Thu, 3 May 2018 13:56:59 +0200 Subject: Reduce boilerplate code for WebContentsAdapter We do not need WebContentsAdapterPrivate. Remove it. This change also removes scoped ref to WebEngineContext in WebContentsAdapter. Change-Id: I0a9acec4d5500342ffa41865cfc775fdb0e68ac4 Reviewed-by: Qt CI Bot Reviewed-by: Allan Sandfeld Jensen --- src/core/web_contents_adapter.h | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'src/core/web_contents_adapter.h') diff --git a/src/core/web_contents_adapter.h b/src/core/web_contents_adapter.h index 111100bba..794ed867b 100644 --- a/src/core/web_contents_adapter.h +++ b/src/core/web_contents_adapter.h @@ -42,6 +42,7 @@ #include "qtwebenginecoreglobal.h" #include "web_contents_adapter_client.h" +#include #include #include @@ -64,6 +65,7 @@ class QDragMoveEvent; class QMimeData; class QPageLayout; class QString; +class QTemporaryDir; class QWebChannel; QT_END_NAMESPACE @@ -72,8 +74,10 @@ namespace QtWebEngineCore { class BrowserContextQt; class DevToolsFrontendQt; class MessagePassingInterface; -class WebContentsAdapterPrivate; class FaviconManager; +class WebEngineContext; +class RenderViewObserverHostQt; +class WebChannelIPCTransportHost; class QWEBENGINE_EXPORT WebContentsAdapter : public QEnableSharedFromThis { public: @@ -208,11 +212,26 @@ public: private: Q_DISABLE_COPY(WebContentsAdapter) - Q_DECLARE_PRIVATE(WebContentsAdapter) void waitForUpdateDragActionCalled(); bool handleDropDataFileContents(const content::DropData &dropData, QMimeData *mimeData); - QScopedPointer d_ptr; + QSharedPointer m_browserContextAdapter; + std::unique_ptr m_webContents; + std::unique_ptr m_webContentsDelegate; + std::unique_ptr m_renderViewObserverHost; + std::unique_ptr m_webChannelTransport; + QWebChannel *m_webChannel; + unsigned int m_webChannelWorld; + WebContentsAdapterClient *m_adapterClient; + quint64 m_nextRequestId; + int m_lastFindRequestId; + std::unique_ptr m_currentDropData; + uint m_currentDropAction; + bool m_updateDragActionCalled; + QPointF m_lastDragClientPos; + QPointF m_lastDragScreenPos; + std::unique_ptr m_dndTmpDir; + DevToolsFrontendQt *m_devToolsFrontend; }; } // namespace QtWebEngineCore -- cgit v1.2.3