From e63b35763907304089d961bc3e284178d36c69a3 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 17 Oct 2018 17:51:50 +0200 Subject: Adaptations for Chromium 70 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I8bb77784dbc8a0b9debd96a4c49421bd34e6a0df Reviewed-by: Michael Brüning Reviewed-by: Peter Varga Reviewed-by: Jüri Valdmann --- src/core/web_contents_adapter.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src/core/web_contents_adapter.cpp') diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index 0c29b3525..3cf9c0be9 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -43,15 +43,14 @@ #include "web_contents_adapter.h" -#include "browser_accessibility_qt.h" -#include "profile_adapter_client.h" -#include "profile_adapter.h" #include "devtools_frontend_qt.h" #include "download_manager_delegate_qt.h" #include "media_capture_devices_dispatcher.h" #if QT_CONFIG(webengine_printing_and_pdf) #include "printing/print_view_manager_qt.h" #endif +#include "profile_adapter_client.h" +#include "profile_adapter.h" #include "profile_qt.h" #include "qwebenginecallback_p.h" #include "render_view_observer_host_qt.h" @@ -105,10 +104,14 @@ #include #include #include -#include #include #include +// Can't include headers as qaccessible.h conflicts with Chromium headers. +namespace content { +extern QAccessibleInterface *toQAccessibleInterface(BrowserAccessibility *acc); +} + namespace QtWebEngineCore { #define CHECK_INITIALIZED(return_value) \ @@ -117,7 +120,7 @@ namespace QtWebEngineCore { #define CHECK_VALID_RENDER_WIDGET_HOST_VIEW(render_view_host) \ if (!render_view_host->IsRenderViewLive() && render_view_host->GetWidget()->GetView()) { \ - qWarning("Ignore navigation due to terminated render process with invalid RenderWidgetHostView."); \ + LOG(WARNING) << "Ignore navigation due to terminated render process with invalid RenderWidgetHostView."; \ return; \ } @@ -190,7 +193,7 @@ static QVariant fromJSValue(const base::Value *result) } case base::Value::Type::BINARY: { - QByteArray data(result->GetBlob().data(), result->GetBlob().size()); + QByteArray data(reinterpret_cast(result->GetBlob().data()), result->GetBlob().size()); ret.setValue(data); break; } @@ -932,8 +935,8 @@ QAccessibleInterface *WebContentsAdapter::browserAccessible() if (!manager) // FIXME! return nullptr; content::BrowserAccessibility *acc = manager->GetRoot(); - content::BrowserAccessibilityQt *accQt = static_cast(acc); - return accQt; + + return content::toQAccessibleInterface(acc); } #endif // QT_NO_ACCESSIBILITY -- cgit v1.2.3