summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2013-07-04 16:25:59 +0200
committerPierre Rossi <pierre.rossi@gmail.com>2013-07-04 18:37:59 +0200
commit0875045c9714fbac897a8b9f277bb1b1ccfef962 (patch)
tree7a5f5c125f7250b43a2b83d5664317caf7a3a1d5
parent8d46c7e1d447c4d2fbc9e57ff53456ddf72ee4e3 (diff)
Fix linking of QtWebEngineProcess
Since the global factory function content::CreateWebContentsView is also needed by the web process and we exclude all implementations we have to place the definition of it in the shared static lib. However, to prevent the need for moving platform layer classes back to the shared static lib we have to revert back to use ContentBrowserClient::OverrideCreateWebContentsView in the API layer to create our platform WebContentsViewQt and make the global factory function definition empty. Change-Id: I9d46524b22458b26a043c80df02b4a5fa7d91a55 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
-rw-r--r--lib/content_browser_client_qt.cpp8
-rw-r--r--lib/content_browser_client_qt.h1
-rw-r--r--lib/qquickwebcontentsview.cpp1
-rw-r--r--lib/qwebcontentsview.cpp1
-rw-r--r--lib/web_contents_view_qt.cpp11
-rw-r--r--lib/web_contents_view_qt.h2
-rw-r--r--shared/shared_globals.cpp6
-rw-r--r--shared/shared_globals.h7
8 files changed, 23 insertions, 14 deletions
diff --git a/lib/content_browser_client_qt.cpp b/lib/content_browser_client_qt.cpp
index 048e4f9c2..2a56fdeab 100644
--- a/lib/content_browser_client_qt.cpp
+++ b/lib/content_browser_client_qt.cpp
@@ -93,6 +93,14 @@ private:
DISALLOW_COPY_AND_ASSIGN(BrowserMainPartsQt);
};
+content::WebContentsViewPort* ContentBrowserClientQt::OverrideCreateWebContentsView(content::WebContents* web_contents,
+ content::RenderViewHostDelegateView** render_view_host_delegate_view)
+{
+ WebContentsViewQt* rv = new WebContentsViewQt(web_contents);
+ *render_view_host_delegate_view = rv;
+ return rv;
+}
+
content::BrowserMainParts *ContentBrowserClientQt::CreateBrowserMainParts(const content::MainFunctionParams &parameters)
{
m_browserMainParts = new BrowserMainPartsQt(parameters);
diff --git a/lib/content_browser_client_qt.h b/lib/content_browser_client_qt.h
index 352918233..32481ad60 100644
--- a/lib/content_browser_client_qt.h
+++ b/lib/content_browser_client_qt.h
@@ -65,6 +65,7 @@ class BrowserMainPartsQt;
class ContentBrowserClientQt : public content::ContentBrowserClient {
public:
+ virtual content::WebContentsViewPort* OverrideCreateWebContentsView(content::WebContents* , content::RenderViewHostDelegateView**) Q_DECL_OVERRIDE;
virtual content::BrowserMainParts* CreateBrowserMainParts(const content::MainFunctionParams& parameters) Q_DECL_OVERRIDE;
diff --git a/lib/qquickwebcontentsview.cpp b/lib/qquickwebcontentsview.cpp
index 9841d4a77..64dfdafb0 100644
--- a/lib/qquickwebcontentsview.cpp
+++ b/lib/qquickwebcontentsview.cpp
@@ -48,7 +48,6 @@
#include "content_browser_client_qt.h"
#include "render_widget_host_view_qt_delegate_quick.h"
#include "web_contents_delegate_qt.h"
-#include "web_contents_view_qt.h"
#include <QUrl>
diff --git a/lib/qwebcontentsview.cpp b/lib/qwebcontentsview.cpp
index 506a83853..fced1e1be 100644
--- a/lib/qwebcontentsview.cpp
+++ b/lib/qwebcontentsview.cpp
@@ -47,7 +47,6 @@
#include "content_browser_client_qt.h"
#include "render_widget_host_view_qt_delegate_widget.h"
#include "web_contents_delegate_qt.h"
-#include "web_contents_view_qt.h"
#include "web_engine_context.h"
#include <QStackedLayout>
diff --git a/lib/web_contents_view_qt.cpp b/lib/web_contents_view_qt.cpp
index 2fc791af4..1ac83ca47 100644
--- a/lib/web_contents_view_qt.cpp
+++ b/lib/web_contents_view_qt.cpp
@@ -47,17 +47,6 @@
#include "content/browser/renderer_host/render_view_host_impl.h"
-namespace content {
-WebContentsViewPort* CreateWebContentsView(WebContentsImpl* web_contents,
- WebContentsViewDelegate* delegate,
- RenderViewHostDelegateView** render_view_host_delegate_view)
-{
- WebContentsViewQt* rv = new WebContentsViewQt(web_contents, delegate);
- *render_view_host_delegate_view = rv;
- return rv;
-}
-}
-
WebContentsViewQtClient::WebContentsViewQtClient()
// This has to be the first thing we do.
: context(WebEngineContext::current())
diff --git a/lib/web_contents_view_qt.h b/lib/web_contents_view_qt.h
index 8af3a24dd..456329201 100644
--- a/lib/web_contents_view_qt.h
+++ b/lib/web_contents_view_qt.h
@@ -67,7 +67,7 @@ class WebContentsViewQt
, public content::RenderViewHostDelegateView
{
public:
- WebContentsViewQt(content::WebContents*, content::WebContentsViewDelegate*)
+ WebContentsViewQt(content::WebContents* web_contents)
: m_client(0)
{ }
diff --git a/shared/shared_globals.cpp b/shared/shared_globals.cpp
index 69687e6e2..bb2fcfb39 100644
--- a/shared/shared_globals.cpp
+++ b/shared/shared_globals.cpp
@@ -64,6 +64,12 @@ void GetScreenInfoFromNativeWindow(QWindow* window, WebKit::WebScreenInfo* resul
}
namespace content {
+WebContentsViewPort* CreateWebContentsView(WebContentsImpl*,
+ WebContentsViewDelegate*,
+ RenderViewHostDelegateView**)
+{
+ return 0;
+}
RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost*) {
// WebContentsViewQt should take care of this directly.
diff --git a/shared/shared_globals.h b/shared/shared_globals.h
index 0972c3a9e..1e4b9183a 100644
--- a/shared/shared_globals.h
+++ b/shared/shared_globals.h
@@ -44,6 +44,13 @@
#include "third_party/WebKit/public/platform/WebScreenInfo.h"
+namespace content {
+class WebContentsImpl;
+class WebContentsViewPort;
+class WebContentsViewDelegate;
+class RenderViewHostDelegateView;
+} // namespace content
+
class QWindow;
void GetScreenInfoFromNativeWindow(QWindow* window, WebKit::WebScreenInfo* results);