summaryrefslogtreecommitdiffstats
path: root/lib/render_widget_host_view_qt_delegate_quick.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/render_widget_host_view_qt_delegate_quick.h')
-rw-r--r--lib/render_widget_host_view_qt_delegate_quick.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/lib/render_widget_host_view_qt_delegate_quick.h b/lib/render_widget_host_view_qt_delegate_quick.h
new file mode 100644
index 000000000..20725c621
--- /dev/null
+++ b/lib/render_widget_host_view_qt_delegate_quick.h
@@ -0,0 +1,59 @@
+#ifndef RENDER_WIDGET_HOST_VIEW_QT_DELEGATE_QUICK_H
+#define RENDER_WIDGET_HOST_VIEW_QT_DELEGATE_QUICK_H
+
+#include "shared/render_widget_host_view_qt_delegate.h"
+
+#include <QQuickPaintedItem>
+
+class BackingStoreQt;
+class QWindow;
+class QQuickItem;
+class QFocusEvent;
+class QMouseEvent;
+class QKeyEvent;
+class QWheelEvent;
+
+namespace content {
+ class RenderWidgetHostViewQt;
+}
+
+class RenderWidgetHostViewQtDelegateQuick : public QQuickPaintedItem, public RenderWidgetHostViewQtDelegate
+{
+ Q_OBJECT
+public:
+ RenderWidgetHostViewQtDelegateQuick(content::RenderWidgetHostViewQt* view, QQuickItem *parent = 0);
+
+ virtual void setBackingStore(BackingStoreQt* backingStore);
+ virtual QRectF screenRect() const;
+ virtual void show();
+ virtual void hide();
+ virtual bool isVisible() const;
+ virtual QWindow* window() const;
+ virtual void update(const QRect& rect = QRect());
+
+ void paint(QPainter *painter);
+
+ void focusInEvent(QFocusEvent*);
+ void focusOutEvent(QFocusEvent*);
+ void mousePressEvent(QMouseEvent*);
+ void mouseMoveEvent(QMouseEvent*);
+ void mouseReleaseEvent(QMouseEvent*);
+ void mouseDoubleClickEvent(QMouseEvent*);
+ void keyPressEvent(QKeyEvent*);
+ void keyReleaseEvent(QKeyEvent*);
+ void wheelEvent(QWheelEvent*);
+
+protected Q_SLOTS:
+ void resizeBackingStore();
+
+protected:
+ QSGNode* updatePaintNode(QSGNode * oldNode, UpdatePaintNodeData * data);
+ void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry);
+
+private:
+ BackingStoreQt* m_backingStore;
+ content::RenderWidgetHostViewQt *m_view;
+
+};
+
+#endif