diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-02-07 11:35:08 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-03-23 00:24:54 +0000 |
commit | ce6a1a74d16deecf0c150aa1f5bae2cc6a95e7b1 (patch) | |
tree | e1ce3f92b50c0c0e5140019134e70e70a1ddb88d /src/core/renderer/content_renderer_client_qt.cpp | |
parent | 5c6201f6c393967e9284bb9841281d286126541d (diff) |
Adaptations for Chromium 73
Change-Id: I565d1e327852110a5abebed3388d7cd6986bef06
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/renderer/content_renderer_client_qt.cpp')
-rw-r--r-- | src/core/renderer/content_renderer_client_qt.cpp | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/core/renderer/content_renderer_client_qt.cpp b/src/core/renderer/content_renderer_client_qt.cpp index a166186a5..fa1e20f24 100644 --- a/src/core/renderer/content_renderer_client_qt.cpp +++ b/src/core/renderer/content_renderer_client_qt.cpp @@ -70,7 +70,6 @@ #include "net/base/net_errors.h" #include "services/service_manager/public/cpp/connector.h" #include "services/service_manager/public/cpp/interface_provider.h" -#include "services/service_manager/public/cpp/service_context.h" #include "third_party/blink/public/platform/web_url_error.h" #include "third_party/blink/public/platform/web_url_request.h" #include "third_party/blink/public/web/web_security_policy.h" @@ -238,28 +237,35 @@ bool ContentRendererClientQt::ShouldSuppressErrorPage(content::RenderFrame *fram } // To tap into the chromium localized strings. Ripped from the chrome layer (highly simplified). -void ContentRendererClientQt::PrepareErrorPage(content::RenderFrame* renderFrame, const blink::WebURLRequest &failedRequest, +void ContentRendererClientQt::PrepareErrorPage(content::RenderFrame *renderFrame, const blink::WebURLError &web_error, + const std::string &httpMethod, + bool ignoring_cache, std::string *errorHtml) { - GetNavigationErrorStringsInternal(renderFrame, failedRequest, + Q_UNUSED(ignoring_cache); + GetNavigationErrorStringsInternal(renderFrame, httpMethod, error_page::Error::NetError(web_error.url(), web_error.reason(), web_error.has_copy_in_cache()), errorHtml); } -void ContentRendererClientQt::PrepareErrorPageForHttpStatusError(content::RenderFrame* renderFrame, const blink::WebURLRequest& failedRequest, - const GURL& unreachable_url, int http_status, - std::string* errorHtml) +void ContentRendererClientQt::PrepareErrorPageForHttpStatusError(content::RenderFrame *renderFrame, + const GURL &unreachable_url, + const std::string &httpMethod, + bool ignoring_cache, + int http_status, + std::string *errorHtml) { - GetNavigationErrorStringsInternal(renderFrame, failedRequest, + Q_UNUSED(ignoring_cache); + GetNavigationErrorStringsInternal(renderFrame, httpMethod, error_page::Error::HttpError(unreachable_url, http_status), errorHtml); } -void ContentRendererClientQt::GetNavigationErrorStringsInternal(content::RenderFrame *renderFrame, const blink::WebURLRequest &failedRequest, const error_page::Error &error, std::string *errorHtml) +void ContentRendererClientQt::GetNavigationErrorStringsInternal(content::RenderFrame *renderFrame, const std::string &httpMethod, const error_page::Error &error, std::string *errorHtml) { Q_UNUSED(renderFrame) - const bool isPost = QByteArray::fromStdString(failedRequest.HttpMethod().Utf8()) == QByteArrayLiteral("POST"); + const bool isPost = QByteArray::fromStdString(httpMethod) == QByteArrayLiteral("POST"); if (errorHtml) { // Use a local error page. @@ -457,8 +463,8 @@ static media::SupportedCodecs GetSupportedCodecs(const std::vector<media::VideoC supported_codecs |= media::EME_CODEC_VP8; break; case media::VideoCodec::kCodecVP9: - supported_codecs |= media::EME_CODEC_LEGACY_VP9; - supported_codecs |= media::EME_CODEC_VP9; + supported_codecs |= media::EME_CODEC_VP9_PROFILE0; + supported_codecs |= media::EME_CODEC_VP9_PROFILE2; break; #if BUILDFLAG(USE_PROPRIETARY_CODECS) case media::VideoCodec::kCodecH264: |