summaryrefslogtreecommitdiffstats
path: root/lib/web_contents_view_qt.h
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@digia.com>2013-06-05 20:58:06 +0200
committerZeno Albisser <zeno.albisser@digia.com>2013-06-05 20:58:06 +0200
commitdb4b7526ad416469882373b87407d3c5ffb1d3cd (patch)
tree6ebdf87121e4ede2ccf6ac0d7dc6fd1548cd0cdb /lib/web_contents_view_qt.h
parent5f7883e96157733f38e28f4f03ef8e25ebd9fd73 (diff)
Implement support for QtQuick2.
The current preliminary implementation uses the QQuickPaintedItem. The RasterWindow is being replaced by an abstract NativeViewQt class, which can be instantiated as QWidgetNativeView or QQuickNativeView. The NativeViewContainerQt builds a wrapper around an instance of these classes and serves as a common api towards chromium. Due to the current design where the view is being created by the shell, we introduce a browser_window.qml which provides a very basic browser UI. The content is then being injected into an item within that browser window. Just executing the example the "regular" way will launch the Widgets example. To launch the QtQuick2 example, the environment variable QQUICKWEBENGINE must be defined.
Diffstat (limited to 'lib/web_contents_view_qt.h')
-rw-r--r--lib/web_contents_view_qt.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/web_contents_view_qt.h b/lib/web_contents_view_qt.h
index f5269141a..ed4e9af17 100644
--- a/lib/web_contents_view_qt.h
+++ b/lib/web_contents_view_qt.h
@@ -48,7 +48,7 @@
#include "content/port/browser/render_view_host_delegate_view.h"
#include "content/port/browser/web_contents_view_port.h"
#include "render_widget_host_view_qt.h"
-#include "raster_window.h"
+#include "native_view_container_qt.h"
class WebContentsViewQt
: public content::WebContentsViewPort
@@ -56,7 +56,7 @@ class WebContentsViewQt
{
public:
WebContentsViewQt(content::WebContents* web_contents)
- : m_windowContainer(new RasterWindowContainer)
+ : m_windowContainer(new NativeViewContainerQt)
{ }
content::RenderWidgetHostView* CreateViewForWidget(content::RenderWidgetHost* render_widget_host)
@@ -106,10 +106,10 @@ public:
virtual void ShowPopupMenu(const gfx::Rect& bounds, int item_height, double item_font_size, int selected_item,
const std::vector<WebMenuItem>& items, bool right_aligned, bool allow_multiple_selection) { QT_NOT_YET_IMPLEMENTED }
- RasterWindowContainer* windowContainer() { return m_windowContainer; }
+ NativeViewContainerQt* windowContainer() { return m_windowContainer; }
private:
- RasterWindowContainer* m_windowContainer;
+ NativeViewContainerQt* m_windowContainer;
};
#endif