summaryrefslogtreecommitdiffstats
path: root/src/core/web_contents_delegate_qt.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-04-26 18:00:58 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-04-26 18:00:58 +0200
commit911c676aa66db46176cfc8da19555d928ce0bd50 (patch)
tree003c4d417ddc63561fcc7c1a65e24270598ac989 /src/core/web_contents_delegate_qt.cpp
parentc8e0e6a9d375c76a6dbace4f14931be507307e1a (diff)
parentb3b95a5bf3f04c18182fcc4519ec8285e290037d (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r--src/core/web_contents_delegate_qt.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index 61aeda7bd..335c65880 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -51,6 +51,8 @@
#include "file_picker_controller.h"
#include "media_capture_devices_dispatcher.h"
#include "net/network_delegate_qt.h"
+#include "qwebengineregisterprotocolhandlerrequest.h"
+#include "register_protocol_handler_request_controller_impl.h"
#include "render_widget_host_view_qt.h"
#include "type_conversion.h"
#include "visited_links_manager_qt.h"
@@ -58,7 +60,6 @@
#include "web_contents_adapter_p.h"
#include "web_engine_context.h"
#include "web_engine_settings.h"
-#include "register_protocol_handler_permission_controller_impl.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h"
#include "components/web_cache/browser/web_cache_manager.h"
@@ -185,7 +186,7 @@ void WebContentsDelegateQt::NavigationStateChanged(content::WebContents* source,
// If there is a visible entry there are special cases when we dont wan't to use the actual URL
if (entry && newUrl.isEmpty())
- newUrl = shouldUseActualURL(entry) ? toQt(entry->GetURL()) : toQt(source->GetVisibleURL());
+ newUrl = shouldUseActualURL(entry) ? toQt(entry->GetURL()) : toQt(entry->GetVirtualURL());
if (m_url != newUrl) {
m_url = newUrl;
@@ -638,9 +639,9 @@ void WebContentsDelegateQt::RegisterProtocolHandler(content::WebContents *webCon
if (registry->SilentlyHandleRegisterHandlerRequest(handler))
return;
- QSharedPointer<RegisterProtocolHandlerPermissionController> controller(
- new RegisterProtocolHandlerPermissionControllerImpl(webContents, handler));
- m_viewClient->runRegisterProtocolHandlerPermissionRequest(std::move(controller));
+ QWebEngineRegisterProtocolHandlerRequest request(
+ QSharedPointer<RegisterProtocolHandlerRequestControllerImpl>::create(webContents, handler));
+ m_viewClient->runRegisterProtocolHandlerRequest(std::move(request));
}
void WebContentsDelegateQt::UnregisterProtocolHandler(content::WebContents *webContents, const std::string &protocol, const GURL &url, bool)