diff options
author | Pierre Rossi <pierre.rossi@digia.com> | 2013-07-10 16:27:48 +0200 |
---|---|---|
committer | Pierre Rossi <pierre.rossi@gmail.com> | 2013-07-31 13:39:50 +0200 |
commit | 67d042d04f2b6cbe98f4eba2a50ed0d374165cae (patch) | |
tree | ff24cf732fa98750400a29354219ffbd70c84e1c /lib/render_widget_host_view_qt_delegate.h | |
parent | 519367a98334b658a93ed1ba096dba92858445c7 (diff) |
Split out the Widgets and QtQuick integration
This is the first step to making proper Qt Modules out of QtWebEngine.
The Widgets integration becomes a proper C++ Qt Module while we make
the QtQuick side a QML plugin for now (could probably be promoted if
the need arises).
Code-wise, this means the introduction of a WebContentsAdapterClient
interface that is subclassed by the private implementation of our API
classes for delegation of things that are UI specific. Functionality
from WebContents and the like is exposed via the WebContentsAdapter.
Change-Id: I4ca3395b9fe8502a24e36002cfd5af44067bb6e8
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'lib/render_widget_host_view_qt_delegate.h')
-rw-r--r-- | lib/render_widget_host_view_qt_delegate.h | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/lib/render_widget_host_view_qt_delegate.h b/lib/render_widget_host_view_qt_delegate.h index ac57e5784..b58fefcce 100644 --- a/lib/render_widget_host_view_qt_delegate.h +++ b/lib/render_widget_host_view_qt_delegate.h @@ -42,19 +42,21 @@ #ifndef RENDER_WIDGET_HOST_VIEW_QT_DELEGATE_H #define RENDER_WIDGET_HOST_VIEW_QT_DELEGATE_H -#include "base/memory/scoped_ptr.h" +#include "qtwebengineglobal.h" -#include "render_widget_host_view_qt.h" #include <QRect> +#include <QScopedPointer> +class BackingStoreQt; +class QEvent; +class QPainter; class QWindow; +class RenderWidgetHostViewQt; + +class QWEBENGINE_EXPORT RenderWidgetHostViewQtDelegate { -class RenderWidgetHostViewQtDelegate { -protected: - scoped_ptr<RenderWidgetHostViewQt> m_view; - RenderWidgetHostViewQtDelegate(RenderWidgetHostViewQt* view) : m_view(view) { Q_ASSERT(m_view); } public: - virtual ~RenderWidgetHostViewQtDelegate() {} + virtual ~RenderWidgetHostViewQtDelegate(); virtual QRectF screenRect() const = 0; virtual void setKeyboardFocus() = 0; virtual bool hasKeyboardFocus() = 0; @@ -63,6 +65,18 @@ public: virtual bool isVisible() const = 0; virtual QWindow* window() const = 0; virtual void update(const QRect& rect = QRect()) = 0; + void resetView(RenderWidgetHostViewQt*); + +protected: + RenderWidgetHostViewQtDelegate(); + void paint(QPainter*, const QRectF& boundingRect); + void fetchBackingStore(); + void notifyResize(); + bool forwardEvent(QEvent*); + +private: + QScopedPointer<RenderWidgetHostViewQt> m_view; + BackingStoreQt *m_backingStore; }; #endif |