diff options
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r-- | src/core/web_contents_delegate_qt.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp index ab398ec44..40fc0934d 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_request_controller_impl.h" #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" #include "components/web_cache/browser/web_cache_manager.h" @@ -638,9 +639,9 @@ void WebContentsDelegateQt::RegisterProtocolHandler(content::WebContents *webCon if (registry->SilentlyHandleRegisterHandlerRequest(handler)) return; - QSharedPointer<RegisterProtocolHandlerRequestController> controller( - new RegisterProtocolHandlerRequestControllerImpl(webContents, handler)); - m_viewClient->runRegisterProtocolHandlerRequest(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) |