From d3ceb65253b18cea470339ec5064778e253f5d58 Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Wed, 24 Aug 2022 09:54:39 +0200 Subject: Fix build with disabled webengine_printing_and_pdf Now the extensions can be enabled when printing is disabled. Pick-to: 6.4 Change-Id: I6183c795298eedf9cdf5110e580e73ba88f45828 Reviewed-by: Allan Sandfeld Jensen --- src/core/content_browser_client_qt.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/core/content_browser_client_qt.cpp') diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp index 67fd8456d..a1868715c 100644 --- a/src/core/content_browser_client_qt.cpp +++ b/src/core/content_browser_client_qt.cpp @@ -40,6 +40,7 @@ #include "net/ssl/client_cert_identity.h" #include "net/ssl/client_cert_store.h" #include "net/ssl/ssl_private_key.h" +#include "printing/buildflags/buildflags.h" #include "services/device/public/cpp/geolocation/geolocation_manager.h" #include "services/network/network_service.h" #include "services/network/public/cpp/web_sandbox_flags.h" @@ -132,7 +133,6 @@ #include "extensions/common/manifest_handlers/mime_types_handler.h" #include "extensions/extension_web_contents_observer_qt.h" #include "extensions/extensions_browser_client_qt.h" -#include "extensions/pdf_iframe_navigation_throttle_qt.h" #include "net/plugin_response_interceptor_url_loader_throttle.h" #endif @@ -142,17 +142,20 @@ #endif #if BUILDFLAG(ENABLE_PRINTING) && BUILDFLAG(ENABLE_PRINT_PREVIEW) +#include "printing/pdf_stream_delegate_qt.h" #include "printing/print_view_manager_qt.h" #endif #if BUILDFLAG(ENABLE_PDF) -#include "printing/pdf_stream_delegate_qt.h" - #include "components/pdf/browser/pdf_navigation_throttle.h" #include "components/pdf/browser/pdf_url_loader_request_interceptor.h" #include "components/pdf/browser/pdf_web_contents_helper.h" #endif +#if BUILDFLAG(ENABLE_PDF) && BUILDFLAG(ENABLE_EXTENSIONS) +#include "extensions/pdf_iframe_navigation_throttle_qt.h" +#endif + #include #include #include @@ -851,12 +854,12 @@ std::vector> ContentBrowserClientQt base::BindRepeating(&navigationThrottleCallback), navigation_interception::SynchronyMode::kSync)); +#if BUILDFLAG(ENABLE_PDF) #if BUILDFLAG(ENABLE_EXTENSIONS) MaybeAddThrottle(extensions::PDFIFrameNavigationThrottleQt::MaybeCreateThrottleFor(navigation_handle), &throttles); -#endif -#if BUILDFLAG(ENABLE_PDF) +#endif // BUILDFLAG(ENABLE_EXTENSIONS) MaybeAddThrottle(pdf::PdfNavigationThrottle::MaybeCreateThrottleFor(navigation_handle, std::make_unique()), &throttles); -#endif // BUILDFLAG(ENABLE_PDF) +#endif // BUILDFLAG(ENABLE_PDF) return throttles; } -- cgit v1.2.3