OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "components/printing/service/public/cpp/pdf_compositor_service_factory.
h" |
| 6 |
| 7 #include "components/printing/service/pdf_compositor_service.h" |
| 8 #include "content/public/utility/utility_thread.h" |
| 9 #include "third_party/WebKit/public/platform/WebImageGenerator.h" |
| 10 #include "third_party/skia/include/core/SkGraphics.h" |
| 11 |
| 12 namespace printing { |
| 13 |
| 14 std::unique_ptr<service_manager::Service> CreatePdfCompositorService( |
| 15 const std::string& creator) { |
| 16 content::UtilityThread::Get()->EnsureBlinkInitialized(); |
| 17 // Hook up blink's codecs so skia can call them. |
| 18 SkGraphics::SetImageGeneratorFromEncodedDataFactory( |
| 19 blink::WebImageGenerator::Create); |
| 20 return printing::PdfCompositorService::Create(creator); |
| 21 } |
| 22 |
| 23 } // namespace printing |
OLD | NEW |