diff options
Diffstat (limited to 'src/core/content_browser_client_qt.cpp')
-rw-r--r-- | src/core/content_browser_client_qt.cpp | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp index 99a3aa3f4..f55e52eec 100644 --- a/src/core/content_browser_client_qt.cpp +++ b/src/core/content_browser_client_qt.cpp @@ -68,7 +68,6 @@ #include "net/proxying_restricted_cookie_manager_qt.h" #include "net/proxying_url_loader_factory_qt.h" #include "net/system_network_context_manager.h" -#include "ozone/gl_share_context_qt.h" #include "platform_notification_service_qt.h" #include "profile_qt.h" #include "profile_io_data_qt.h" @@ -87,11 +86,6 @@ #include "api/qwebenginecookiestore_p.h" #include "api/qwebengineurlrequestinfo_p.h" -#if QT_CONFIG(opengl) -#include <QOpenGLContext> -#include <QOpenGLExtraFunctions> -#endif - #if QT_CONFIG(webengine_geolocation) #include "base/memory/ptr_util.h" #include "location_provider_qt.h" @@ -154,11 +148,6 @@ #include <QGuiApplication> #include <QStandardPaths> -#include <qpa/qplatformnativeinterface.h> - -QT_BEGIN_NAMESPACE -Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context(); -QT_END_NAMESPACE // Implement IsHandledProtocol as declared in //url/url_util_qt.h. namespace url { @@ -248,13 +237,6 @@ void ContentBrowserClientQt::RenderProcessWillLaunch(content::RenderProcessHost renderer_configuration->SetInitialConfiguration(is_incognito_process); } -gl::GLShareGroup *ContentBrowserClientQt::GetInProcessGpuShareGroup() -{ - if (!m_shareGroupQt.get()) - m_shareGroupQt = new ShareGroupQt; - return m_shareGroupQt.get(); -} - content::MediaObserver *ContentBrowserClientQt::GetMediaObserver() { return MediaCaptureDevicesDispatcher::GetInstance(); @@ -846,12 +828,12 @@ std::vector<std::unique_ptr<content::NavigationThrottle>> ContentBrowserClientQt base::BindRepeating(&navigationThrottleCallback), navigation_interception::SynchronyMode::kSync)); -#if BUILDFLAG(ENABLE_PDF) -#if BUILDFLAG(ENABLE_EXTENSIONS) - MaybeAddThrottle(extensions::PDFIFrameNavigationThrottleQt::MaybeCreateThrottleFor(navigation_handle), &throttles); -#endif // BUILDFLAG(ENABLE_EXTENSIONS) +#if BUILDFLAG(ENABLE_PDF) && BUILDFLAG(ENABLE_EXTENSIONS) + MaybeAddThrottle( + extensions::PDFIFrameNavigationThrottleQt::MaybeCreateThrottleFor(navigation_handle), + &throttles); MaybeAddThrottle(pdf::PdfNavigationThrottle::MaybeCreateThrottleFor(navigation_handle, std::make_unique<PdfStreamDelegateQt>()), &throttles); -#endif // BUILDFLAG(ENABLE_PDF) +#endif // BUILDFLAG(ENABLE_PDF) && BUIDLFLAG(ENABLE_EXTENSIONS) return throttles; } @@ -1222,7 +1204,7 @@ ContentBrowserClientQt::WillCreateURLLoaderRequestInterceptors(content::Navigati const scoped_refptr<network::SharedURLLoaderFactory>& network_loader_factory) { std::vector<std::unique_ptr<content::URLLoaderRequestInterceptor>> interceptors; -#if BUILDFLAG(ENABLE_PDF) +#if BUILDFLAG(ENABLE_PDF) && BUILDFLAG(ENABLE_EXTENSIONS) { std::unique_ptr<content::URLLoaderRequestInterceptor> pdf_interceptor = pdf::PdfURLLoaderRequestInterceptor::MaybeCreateInterceptor( @@ -1230,7 +1212,7 @@ ContentBrowserClientQt::WillCreateURLLoaderRequestInterceptors(content::Navigati if (pdf_interceptor) interceptors.push_back(std::move(pdf_interceptor)); } -#endif +#endif // BUILDFLAG(ENABLE_PDF) && BUIDLFLAG(ENABLE_EXTENSIONS) return interceptors; } |