summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_adapter.h
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2018-05-03 13:56:59 +0200
committerMichal Klocek <michal.klocek@qt.io>2018-05-07 15:59:22 +0000
commitc470b7362cc19fa0d6d20ab8ddff0eb787cf7763 (patch)
tree7cf9a615638035f6570cb2c9e4f4fcbc178c9240 /src/core/web_contents_adapter.h
parent911c676aa66db46176cfc8da19555d928ce0bd50 (diff)
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 <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/web_contents_adapter.h')
-rw-r--r--src/core/web_contents_adapter.h25
1 files changed, 22 insertions, 3 deletions
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 <memory>
#include <QtGui/qtgui-config.h>
#include <QtWebEngineCore/qwebenginehttprequest.h>
@@ -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<WebContentsAdapter> {
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<WebContentsAdapterPrivate> d_ptr;
+ QSharedPointer<BrowserContextAdapter> m_browserContextAdapter;
+ std::unique_ptr<content::WebContents> m_webContents;
+ std::unique_ptr<WebContentsDelegateQt> m_webContentsDelegate;
+ std::unique_ptr<RenderViewObserverHostQt> m_renderViewObserverHost;
+ std::unique_ptr<WebChannelIPCTransportHost> m_webChannelTransport;
+ QWebChannel *m_webChannel;
+ unsigned int m_webChannelWorld;
+ WebContentsAdapterClient *m_adapterClient;
+ quint64 m_nextRequestId;
+ int m_lastFindRequestId;
+ std::unique_ptr<content::DropData> m_currentDropData;
+ uint m_currentDropAction;
+ bool m_updateDragActionCalled;
+ QPointF m_lastDragClientPos;
+ QPointF m_lastDragScreenPos;
+ std::unique_ptr<QTemporaryDir> m_dndTmpDir;
+ DevToolsFrontendQt *m_devToolsFrontend;
};
} // namespace QtWebEngineCore