diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-06-10 13:57:42 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-09-09 15:19:10 +0200 |
commit | 455619d3875e0e0e7a03734806d61c7998735cd4 (patch) | |
tree | 3e2558da4525819ad9bd5e46ee9f471c73aa8d5f /src/core/web_contents_delegate_qt.cpp | |
parent | cd61343ceb4a3de8ce16082917a2f197b2481d08 (diff) |
Adaptations for Chromium 83
Change-Id: I63ed851426b18623d549ceaf87f1b6eeec527966
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r-- | src/core/web_contents_delegate_qt.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp index e75a461e2..d5a3934fe 100644 --- a/src/core/web_contents_delegate_qt.cpp +++ b/src/core/web_contents_delegate_qt.cpp @@ -62,6 +62,8 @@ #include "web_engine_settings.h" #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" +#include "components/error_page/common/error.h" +#include "components/error_page/common/localized_error.h" #include "components/web_cache/browser/web_cache_manager.h" #include "content/browser/frame_host/render_frame_host_impl.h" #include "content/browser/renderer_host/render_widget_host_impl.h" @@ -75,7 +77,6 @@ #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/web_contents.h" -#include "content/public/common/favicon_url.h" #include "content/public/common/frame_navigate_params.h" #include "content/public/common/url_constants.h" #include "content/public/common/web_preferences.h" @@ -239,7 +240,9 @@ void WebContentsDelegateQt::AddNewContents(content::WebContents* source, std::un // so set it here. Note the actual value doesn't really matter here. Only the second value does, but we try // to give the correct user-agent anyway. if (newAdapter) - newAdapter->webContents()->SetUserAgentOverride(newAdapter->profileAdapter()->httpUserAgent().toStdString(), true); + newAdapter->webContents()->SetUserAgentOverride( + blink::UserAgentOverride::UserAgentOnly(newAdapter->profileAdapter()->httpUserAgent().toStdString()), + true); if (newAdapter && !newAdapter->isInitialized()) newAdapter->loadDefault(); if (was_blocked) @@ -514,11 +517,12 @@ void WebContentsDelegateQt::DidFinishLoad(content::RenderFrameHost* render_frame EmitLoadFinished(true /* success */ , toQt(validated_url), false /* isErrorPage */, http_statuscode); } -void WebContentsDelegateQt::DidUpdateFaviconURL(const std::vector<content::FaviconURL> &candidates) +void WebContentsDelegateQt::DidUpdateFaviconURL(const std::vector<blink::mojom::FaviconURLPtr> &candidates) + { QList<FaviconInfo> faviconCandidates; faviconCandidates.reserve(static_cast<int>(candidates.size())); - for (const content::FaviconURL &candidate : candidates) { + for (const blink::mojom::FaviconURLPtr &candidate : candidates) { // Store invalid candidates too for later debugging via API faviconCandidates.append(toFaviconInfo(candidate)); } @@ -659,7 +663,7 @@ void WebContentsDelegateQt::RequestToLockMouse(content::WebContents *web_content Q_UNUSED(user_gesture); if (last_unlocked_by_target) - web_contents->GotResponseToLockMouseRequest(true); + web_contents->GotResponseToLockMouseRequest(blink::mojom::PointerLockResult::kSuccess); else m_viewClient->runMouseLockPermissionRequest(toQt(web_contents->GetLastCommittedURL().GetOrigin())); } |