Index: chrome/utility/chrome_content_utility_client.cc |
diff --git a/chrome/utility/chrome_content_utility_client.cc b/chrome/utility/chrome_content_utility_client.cc |
index 89ef3c4a16ebe8ed0732514653cdd8531150e743..6f2d3e4f7bd1526ef750fd1c4417191bcd52f512 100644 |
--- a/chrome/utility/chrome_content_utility_client.cc |
+++ b/chrome/utility/chrome_content_utility_client.cc |
@@ -56,6 +56,12 @@ |
#include "chrome/utility/printing_handler.h" |
#endif |
+#if BUILDFLAG(ENABLE_PRINTING) |
+#include "chrome/common/chrome_content_client.h" |
+#include "components/printing/service/public/cpp/pdf_compositor_service_factory.h" |
+#include "components/printing/service/public/interfaces/pdf_compositor.mojom.h" // nogncheck |
+#endif |
+ |
#if defined(FULL_SAFE_BROWSING) |
#include "chrome/common/safe_archive_analyzer.mojom.h" |
#include "chrome/common/safe_browsing/zip_analyzer.h" |
@@ -315,6 +321,17 @@ bool ChromeContentUtilityClient::OnMessageReceived( |
return false; |
} |
+void ChromeContentUtilityClient::RegisterServices( |
+ ChromeContentUtilityClient::StaticServiceMap* services) { |
+#if BUILDFLAG(ENABLE_PRINTING) |
+ content::ServiceInfo pdf_compositor_info; |
+ pdf_compositor_info.factory = |
+ base::Bind(&printing::CreatePdfCompositorService, GetUserAgent()); |
+ services->insert( |
+ std::make_pair(printing::mojom::kServiceName, pdf_compositor_info)); |
+#endif |
+} |
+ |
// static |
void ChromeContentUtilityClient::PreSandboxStartup() { |
#if BUILDFLAG(ENABLE_EXTENSIONS) |