Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(843)

Unified Diff: chrome/utility/chrome_content_utility_client.cc

Issue 2832633002: Add PDF compositor service (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/utility/chrome_content_utility_client.h ('k') | components/printing/service/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3a028e79c35ef2a9739f997cf052bb7046dd3996..763c5d83e49639ba855f70038e56bed3ee3be913 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"
@@ -320,6 +326,16 @@ 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->emplace(printing::mojom::kServiceName, pdf_compositor_info);
+#endif
+}
+
// static
void ChromeContentUtilityClient::PreSandboxStartup() {
#if BUILDFLAG(ENABLE_EXTENSIONS)
« no previous file with comments | « chrome/utility/chrome_content_utility_client.h ('k') | components/printing/service/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698