From b1d423a3fc2cb3eeacc2a3e91ac9bdd2211c2613 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Mon, 28 Jul 2014 17:29:14 +0200 Subject: 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 --- src/core/renderer/content_renderer_client_qt.cpp | 8 +++++--- src/core/renderer/content_renderer_client_qt.h | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src/core/renderer') diff --git a/src/core/renderer/content_renderer_client_qt.cpp b/src/core/renderer/content_renderer_client_qt.cpp index af1ba7dcb..ea91162a9 100644 --- a/src/core/renderer/content_renderer_client_qt.cpp +++ b/src/core/renderer/content_renderer_client_qt.cpp @@ -45,6 +45,7 @@ #include "chrome/common/localized_error.h" #include "components/visitedlink/renderer/visitedlink_slave.h" #include "content/public/renderer/render_thread.h" +#include "content/public/renderer/render_view.h" #include "net/base/net_errors.h" #include "third_party/WebKit/public/platform/WebURLError.h" #include "third_party/WebKit/public/platform/WebURLRequest.h" @@ -78,7 +79,7 @@ void ContentRendererClientQt::RenderViewCreated(content::RenderView* render_view } // To tap into the chromium localized strings. Ripped from the chrome layer (highly simplified). -void ContentRendererClientQt::GetNavigationErrorStrings(blink::WebFrame *frame, const blink::WebURLRequest &failed_request, const blink::WebURLError &error, const std::string &accept_languages, std::string *error_html, base::string16 *error_description) +void ContentRendererClientQt::GetNavigationErrorStrings(content::RenderView* render_view, blink::WebFrame *frame, const blink::WebURLRequest &failed_request, const blink::WebURLError &error, std::string *error_html, base::string16 *error_description) { Q_UNUSED(frame) @@ -92,8 +93,9 @@ void ContentRendererClientQt::GetNavigationErrorStrings(blink::WebFrame *frame, const std::string locale = content::RenderThread::Get()->GetLocale(); // TODO(elproxy): We could potentially get better diagnostics here by first calling NetErrorHelper::GetErrorStringsForDnsProbe LocalizedError::GetStrings(error.reason, error.domain.utf8(), - error.unreachableURL, isPost, locale, - accept_languages, &error_strings); + error.unreachableURL, isPost, error.staleCopyInCache && !isPost, + locale, render_view->GetAcceptLanguages(), scoped_ptr(), + &error_strings); resource_id = IDR_NET_ERROR_HTML; diff --git a/src/core/renderer/content_renderer_client_qt.h b/src/core/renderer/content_renderer_client_qt.h index ea284db97..d87817cf4 100644 --- a/src/core/renderer/content_renderer_client_qt.h +++ b/src/core/renderer/content_renderer_client_qt.h @@ -55,9 +55,9 @@ public: virtual void RenderThreadStarted() Q_DECL_OVERRIDE; virtual void RenderViewCreated(content::RenderView *render_view) Q_DECL_OVERRIDE; - virtual bool ShouldSuppressErrorPage(const GURL &) Q_DECL_OVERRIDE { return true; } - virtual void GetNavigationErrorStrings(blink::WebFrame* frame, const blink::WebURLRequest& failed_request, const blink::WebURLError& error - , const std::string& accept_languages, std::string* error_html, base::string16* error_description) Q_DECL_OVERRIDE; + virtual bool ShouldSuppressErrorPage(content::RenderFrame *, const GURL &) Q_DECL_OVERRIDE { return true; } + virtual void GetNavigationErrorStrings(content::RenderView* render_view, blink::WebFrame* frame, const blink::WebURLRequest& failed_request + , const blink::WebURLError& error, std::string* error_html, base::string16* error_description) Q_DECL_OVERRIDE; virtual unsigned long long VisitedLinkHash(const char *canonicalUrl, size_t length) Q_DECL_OVERRIDE; virtual bool IsLinkVisited(unsigned long long linkHash) Q_DECL_OVERRIDE; -- cgit v1.2.3