| Index: components/printing/service/public/cpp/pdf_compositor_service_factory.cc
|
| diff --git a/components/printing/service/public/cpp/pdf_compositor_service_factory.cc b/components/printing/service/public/cpp/pdf_compositor_service_factory.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f832f86031338bdf62fbafbde5742688c2f867c9
|
| --- /dev/null
|
| +++ b/components/printing/service/public/cpp/pdf_compositor_service_factory.cc
|
| @@ -0,0 +1,23 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "components/printing/service/public/cpp/pdf_compositor_service_factory.h"
|
| +
|
| +#include "components/printing/service/pdf_compositor_service.h"
|
| +#include "content/public/utility/utility_thread.h"
|
| +#include "third_party/WebKit/public/platform/WebImageGenerator.h"
|
| +#include "third_party/skia/include/core/SkGraphics.h"
|
| +
|
| +namespace printing {
|
| +
|
| +std::unique_ptr<service_manager::Service> CreatePdfCompositorService(
|
| + const std::string& creator) {
|
| + content::UtilityThread::Get()->EnsureBlinkInitialized();
|
| + // Hook up blink's codecs so skia can call them.
|
| + SkGraphics::SetImageGeneratorFromEncodedDataFactory(
|
| + blink::WebImageGenerator::Create);
|
| + return printing::PdfCompositorService::Create(creator);
|
| +}
|
| +
|
| +} // namespace printing
|
|
|