diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-07-28 17:29:14 +0200 |
---|---|---|
committer | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-08-14 16:43:32 +0200 |
commit | b1d423a3fc2cb3eeacc2a3e91ac9bdd2211c2613 (patch) | |
tree | 53f39e4e7c6a76d19a92fc23fde0728e6df95fc7 /src/core/chromium_overrides.cpp | |
parent | f987b713b9f4e363056bf5174a762acb5b77ed79 (diff) |
Update the QtWebEngineCore library to run on top of Chromium 37
Most of the patch is about upstream classes/methods that changed.
Other important details:
- icu data files are now used by default
- cygwin is no longer required to build on Windows
- RenderFrameHost has been replacing RenderViewHost in a few places,
following the separate process iframes support in Chromium
- The user agent is accessed through ContentClient::GetUserAgent
instead of from the command line switches
Change-Id: I86cc93aff7ce31176a80b0b4a5d54025674a451c
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'src/core/chromium_overrides.cpp')
-rw-r--r-- | src/core/chromium_overrides.cpp | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/src/core/chromium_overrides.cpp b/src/core/chromium_overrides.cpp index a1758768d..dafd50f7c 100644 --- a/src/core/chromium_overrides.cpp +++ b/src/core/chromium_overrides.cpp @@ -43,9 +43,10 @@ #include "gl_context_qt.h" #include "qtwebenginecoreglobal.h" +#include "web_contents_view_qt.h" #include "base/values.h" -#include "content/browser/renderer_host/render_widget_host_view_base.h" #include "content/browser/renderer_host/pepper/pepper_truetype_font_list.h" +#include "content/browser/renderer_host/render_widget_host_view_base.h" #include "content/common/font_list.h" #include <QGuiApplication> @@ -58,7 +59,7 @@ #endif #if defined(USE_X11) -#include "base/message_loop/message_pump_x11.h" +#include "ui/gfx/x/x11_types.h" #endif #if defined(USE_AURA) && !defined(USE_OZONE) @@ -85,38 +86,30 @@ void GetScreenInfoFromNativeWindow(QWindow* window, blink::WebScreenInfo* result *results = r; } -namespace base { - #if defined(USE_X11) -Display* MessagePumpForUI::GetDefaultXDisplay() { - static void *display = GLContextHelper::getXDisplay(); - return static_cast<Display*>(display); +XDisplay* GetQtXDisplay() +{ + return static_cast<XDisplay*>(GLContextHelper::getXDisplay()); } #endif -} - namespace content { class WebContentsImpl; -class WebContentsViewPort; +class WebContentsView; class WebContentsViewDelegate; class RenderViewHostDelegateView; -WebContentsViewPort* CreateWebContentsView(WebContentsImpl*, - WebContentsViewDelegate*, - RenderViewHostDelegateView**) +WebContentsView* CreateWebContentsView(WebContentsImpl *web_contents, + WebContentsViewDelegate *, + RenderViewHostDelegateView **render_view_host_delegate_view) { - return 0; -} - -RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost*) { - // WebContentsViewQt should take care of this directly. - Q_UNREACHABLE(); - return NULL; + WebContentsViewQt* rv = new WebContentsViewQt(web_contents); + *render_view_host_delegate_view = rv; + return rv; } // static -void RenderWidgetHostViewPort::GetDefaultScreenInfo(blink::WebScreenInfo* results) { +void RenderWidgetHostViewBase::GetDefaultScreenInfo(blink::WebScreenInfo* results) { QWindow dummy; GetScreenInfoFromNativeWindow(&dummy, results); } @@ -163,7 +156,7 @@ namespace gfx { // Stubs for these unused functions that are stripped in case // of a release aura build but a debug build needs the symbols. -RenderText* RenderText::CreateInstance() +RenderText* RenderText::CreateNativeInstance() { QT_NOT_USED; return 0; |