From 052bd4cd6cd91f2e1ecdccb330d0a2d88bcbc691 Mon Sep 17 00:00:00 2001 From: Zeno Albisser Date: Mon, 13 May 2013 15:34:13 +0200 Subject: Adding a preliminary implementation of shell_qt. --- ...atch-add-some-Qt-member-functions-to-Rend.patch | 150 +++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 patches/0001-Temporary-patch-add-some-Qt-member-functions-to-Rend.patch (limited to 'patches') diff --git a/patches/0001-Temporary-patch-add-some-Qt-member-functions-to-Rend.patch b/patches/0001-Temporary-patch-add-some-Qt-member-functions-to-Rend.patch new file mode 100644 index 000000000..8ab997e13 --- /dev/null +++ b/patches/0001-Temporary-patch-add-some-Qt-member-functions-to-Rend.patch @@ -0,0 +1,150 @@ +From 30b08c80f4b17fada28703f2e15c98207875e771 Mon Sep 17 00:00:00 2001 +From: Zeno Albisser +Date: Tue, 14 May 2013 10:52:58 +0200 +Subject: [PATCH] Temporary patch: add some Qt member functions to + RenderWidgetHostView. + +This patch should be removed again, once we manage to avoid the use of +GetNativeView() or we manage to make gfx::NativeView a QWindow.w +--- + content/browser/renderer_host/render_widget_host_view_gtk.h | 1 + + content/browser/web_contents/web_contents_view_gtk.cc | 7 +++++++ + content/browser/web_contents/web_contents_view_gtk.h | 1 + + content/content_shell.gypi | 1 - + content/public/browser/render_widget_host_view.h | 3 +++ + content/public/browser/web_contents_view.h | 2 ++ + content/shell/shell.cc | 1 + + content/shell/shell.h | 2 ++ + 8 files changed, 17 insertions(+), 1 deletion(-) + +diff --git a/content/browser/renderer_host/render_widget_host_view_gtk.h b/content/browser/renderer_host/render_widget_host_view_gtk.h +index 46daaac..271ad19 100644 +--- a/content/browser/renderer_host/render_widget_host_view_gtk.h ++++ b/content/browser/renderer_host/render_widget_host_view_gtk.h +@@ -55,6 +55,7 @@ class CONTENT_EXPORT RenderWidgetHostViewGtk + virtual RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE; + virtual void SetSize(const gfx::Size& size) OVERRIDE; + virtual void SetBounds(const gfx::Rect& rect) OVERRIDE; ++ virtual gfx::NativeView GetNativeViewGTK() const { return gfx::NativeView(); }; + virtual gfx::NativeView GetNativeView() const OVERRIDE; + virtual gfx::NativeViewId GetNativeViewId() const OVERRIDE; + virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE; +diff --git a/content/browser/web_contents/web_contents_view_gtk.cc b/content/browser/web_contents/web_contents_view_gtk.cc +index 9cb9212..8202258 100644 +--- a/content/browser/web_contents/web_contents_view_gtk.cc ++++ b/content/browser/web_contents/web_contents_view_gtk.cc +@@ -115,6 +115,13 @@ gfx::NativeView WebContentsViewGtk::GetNativeView() const { + return expanded_.get(); + } + ++QWindow* WebContentsViewGtk::GetNativeViewQt() const { ++ RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); ++ if (!rwhv) ++ return NULL; ++ return rwhv->GetNativeViewQt(); ++} ++ + gfx::NativeView WebContentsViewGtk::GetContentNativeView() const { + RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView(); + if (!rwhv) +diff --git a/content/browser/web_contents/web_contents_view_gtk.h b/content/browser/web_contents/web_contents_view_gtk.h +index a5a15a2..f4a5a93 100644 +--- a/content/browser/web_contents/web_contents_view_gtk.h ++++ b/content/browser/web_contents/web_contents_view_gtk.h +@@ -46,6 +46,7 @@ class CONTENT_EXPORT WebContentsViewGtk + // WebContentsView implementation -------------------------------------------- + + virtual gfx::NativeView GetNativeView() const OVERRIDE; ++ virtual QWindow* GetNativeViewQt() const OVERRIDE; + virtual gfx::NativeView GetContentNativeView() const OVERRIDE; + virtual gfx::NativeWindow GetTopLevelNativeWindow() const OVERRIDE; + virtual void GetContainerBounds(gfx::Rect* out) const OVERRIDE; +diff --git a/content/content_shell.gypi b/content/content_shell.gypi +index 1bf233b..fc6bf96 100644 +--- a/content/content_shell.gypi ++++ b/content/content_shell.gypi +@@ -82,7 +82,6 @@ + 'shell/shell.h', + 'shell/shell_android.cc', + 'shell/shell_aura.cc', +- 'shell/shell_gtk.cc', + 'shell/shell_mac.mm', + 'shell/shell_win.cc', + 'shell/shell_application_mac.h', +diff --git a/content/public/browser/render_widget_host_view.h b/content/public/browser/render_widget_host_view.h +index b881748..3eccb42 100644 +--- a/content/public/browser/render_widget_host_view.h ++++ b/content/public/browser/render_widget_host_view.h +@@ -18,6 +18,7 @@ + #endif + + class GURL; ++class QWindow; + + namespace gfx { + class Rect; +@@ -76,7 +77,9 @@ class CONTENT_EXPORT RenderWidgetHostView { + + // Retrieves the native view used to contain plugins and identify the + // renderer in IPC messages. ++ virtual gfx::NativeView GetNativeViewGTK() const { return 0; }; + virtual gfx::NativeView GetNativeView() const = 0; ++ virtual QWindow* GetNativeViewQt() const { return 0; } + virtual gfx::NativeViewId GetNativeViewId() const = 0; + virtual gfx::NativeViewAccessible GetNativeViewAccessible() = 0; + +diff --git a/content/public/browser/web_contents_view.h b/content/public/browser/web_contents_view.h +index d0a7309..9cfddb4 100644 +--- a/content/public/browser/web_contents_view.h ++++ b/content/public/browser/web_contents_view.h +@@ -15,6 +15,7 @@ + #include "ui/gfx/size.h" + + struct WebDropData; ++class QWindow; + + namespace content { + +@@ -27,6 +28,7 @@ class CONTENT_EXPORT WebContentsView { + + // Returns the native widget that contains the contents of the tab. + virtual gfx::NativeView GetNativeView() const = 0; ++ virtual QWindow* GetNativeViewQt() const { return 0; } + + // Returns the native widget with the main content of the tab (i.e. the main + // render view host, though there may be many popups in the tab as children of +diff --git a/content/shell/shell.cc b/content/shell/shell.cc +index 5eac7af..3e4bd60 100644 +--- a/content/shell/shell.cc ++++ b/content/shell/shell.cc +@@ -46,6 +46,7 @@ Shell::Shell(WebContents* web_contents) + : devtools_frontend_(NULL), + is_fullscreen_(false), + window_(NULL), ++ m_window(NULL), + url_edit_view_(NULL), + #if defined(OS_WIN) && !defined(USE_AURA) + default_edit_wnd_proc_(0), +diff --git a/content/shell/shell.h b/content/shell/shell.h +index 736bd3f..4d028cf 100644 +--- a/content/shell/shell.h ++++ b/content/shell/shell.h +@@ -37,6 +37,7 @@ class ViewsDelegate; + } + #endif + ++class QWidget; + class GURL; + namespace content { + +@@ -219,6 +220,7 @@ class Shell : public WebContentsDelegate, + bool is_fullscreen_; + + gfx::NativeWindow window_; ++ QWidget* m_window; + gfx::NativeEditView url_edit_view_; + + // Notification manager +-- +1.8.1.2 + -- cgit v1.2.3