summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_adapter.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/web_contents_adapter.h')
-rw-r--r--src/core/web_contents_adapter.h60
1 files changed, 46 insertions, 14 deletions
diff --git a/src/core/web_contents_adapter.h b/src/core/web_contents_adapter.h
index d5dbcf122..e8e5359be 100644
--- a/src/core/web_contents_adapter.h
+++ b/src/core/web_contents_adapter.h
@@ -37,11 +37,23 @@
**
****************************************************************************/
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
#ifndef WEB_CONTENTS_ADAPTER_H
#define WEB_CONTENTS_ADAPTER_H
-#include "qtwebenginecoreglobal.h"
+#include "qtwebenginecoreglobal_p.h"
#include "web_contents_adapter_client.h"
+#include <memory>
#include <QtGui/qtgui-config.h>
#include <QtWebEngineCore/qwebenginehttprequest.h>
@@ -65,22 +77,25 @@ class QDropEvent;
class QMimeData;
class QPageLayout;
class QString;
+class QTemporaryDir;
class QWebChannel;
QT_END_NAMESPACE
namespace QtWebEngineCore {
-class BrowserContextQt;
class DevToolsFrontendQt;
-class MessagePassingInterface;
-class WebContentsAdapterPrivate;
class FaviconManager;
+class MessagePassingInterface;
+class ProfileQt;
+class RenderViewObserverHostQt;
+class WebChannelIPCTransportHost;
+class WebEngineContext;
-class QWEBENGINE_EXPORT WebContentsAdapter : public QEnableSharedFromThis<WebContentsAdapter> {
+class QWEBENGINECORE_PRIVATE_EXPORT WebContentsAdapter : public QEnableSharedFromThis<WebContentsAdapter> {
public:
static QSharedPointer<WebContentsAdapter> createFromSerializedNavigationHistory(QDataStream &input, WebContentsAdapterClient *adapterClient);
- // Takes ownership of the WebContents.
- WebContentsAdapter(content::WebContents *webContents = 0);
+ WebContentsAdapter();
+ WebContentsAdapter(std::unique_ptr<content::WebContents> webContents);
~WebContentsAdapter();
void setClient(WebContentsAdapterClient *adapterClient);
@@ -94,8 +109,6 @@ public:
void load(const QWebEngineHttpRequest &request);
void setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl);
- void reattachRWHV();
-
bool canGoBack() const;
bool canGoForward() const;
void stop();
@@ -172,12 +185,14 @@ public:
void grantMouseLockPermission(bool granted);
void dpiScaleChanged();
- void backgroundColorChanged();
+ void setBackgroundColor(const QColor &color);
QAccessibleInterface *browserAccessible();
- BrowserContextQt* browserContext();
- BrowserContextAdapter* browserContextAdapter();
+ ProfileQt* profile();
+ ProfileAdapter* profileAdapter();
+#if QT_CONFIG(webengine_webchannel)
QWebChannel *webChannel() const;
void setWebChannel(QWebChannel *, uint worldId);
+#endif
FaviconManager *faviconManager();
QPointF lastScrollOffset() const;
@@ -209,11 +224,28 @@ public:
private:
Q_DISABLE_COPY(WebContentsAdapter)
- Q_DECLARE_PRIVATE(WebContentsAdapter)
void waitForUpdateDragActionCalled();
bool handleDropDataFileContents(const content::DropData &dropData, QMimeData *mimeData);
- QScopedPointer<WebContentsAdapterPrivate> d_ptr;
+ ProfileAdapter *m_profileAdapter;
+ std::unique_ptr<content::WebContents> m_webContents;
+ std::unique_ptr<WebContentsDelegateQt> m_webContentsDelegate;
+ std::unique_ptr<RenderViewObserverHostQt> m_renderViewObserverHost;
+#if QT_CONFIG(webengine_webchannel)
+ std::unique_ptr<WebChannelIPCTransportHost> m_webChannelTransport;
+ QWebChannel *m_webChannel;
+ unsigned int m_webChannelWorld;
+#endif
+ 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