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

Unified Diff: chrome/utility/chrome_content_utility_client.cc

Issue 2653963002: [Experimental] Supporting OOPIF printing
Patch Set: Rename service, fix for webview, and connect to DiscardableMemoryManager Created 3 years, 9 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/DEPS ('k') | components/printing/common/print_messages.h » ('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 0b38af4095d136715cc72157be935fe884098568..43fc7c971cc1d62b0a4666a2496459c37b5dcb5a 100644
--- a/chrome/utility/chrome_content_utility_client.cc
+++ b/chrome/utility/chrome_content_utility_client.cc
@@ -9,6 +9,7 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
+#include "base/memory/discardable_memory_allocator.h"
#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
#include "base/time/time.h"
@@ -31,6 +32,8 @@
#include "printing/features/features.h"
#include "services/image_decoder/image_decoder_service.h"
#include "services/image_decoder/public/interfaces/constants.mojom.h"
+#include "services/pdf_compositor/pdf_compositor_service.h"
+#include "services/pdf_compositor/public/interfaces/constants.mojom.h"
#include "services/service_manager/public/cpp/interface_registry.h"
#include "third_party/zlib/google/zip.h"
#include "ui/gfx/geometry/size.h"
@@ -144,6 +147,11 @@ std::unique_ptr<service_manager::Service> CreateImageDecoderService() {
return image_decoder::ImageDecoderService::Create();
}
+std::unique_ptr<service_manager::Service> CreatePdfCompositorService() {
+ content::UtilityThread::Get()->EnsureBlinkInitialized();
+ return pdf_compositor::PdfCompositorService::Create();
+}
+
} // namespace
ChromeContentUtilityClient::ChromeContentUtilityClient()
@@ -236,6 +244,12 @@ void ChromeContentUtilityClient::RegisterServices(StaticServiceMap* services) {
image_decoder_info.factory = base::Bind(&CreateImageDecoderService);
services->insert(
std::make_pair(image_decoder::mojom::kServiceName, image_decoder_info));
+
+ // Register pdf composer service.
+ content::ServiceInfo pdf_compositor_info;
+ pdf_compositor_info.factory = base::Bind(&CreatePdfCompositorService);
+ services->insert(
+ std::make_pair(pdf_compositor::mojom::kServiceName, pdf_compositor_info));
}
// static
« no previous file with comments | « chrome/utility/DEPS ('k') | components/printing/common/print_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698