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/common/content_client.h" | |
Lei Zhang
2017/05/04 02:13:13
No needed.
Wei Li
2017/05/04 18:18:28
Done.
| |
9 #include "content/public/utility/utility_thread.h" | |
10 #include "third_party/WebKit/public/platform/WebImageGenerator.h" | |
11 #include "third_party/skia/include/core/SkGraphics.h" | |
12 | |
13 namespace printing { | |
14 | |
15 std::unique_ptr<service_manager::Service> CreatePdfCompositorService( | |
16 const std::string& creator) { | |
17 content::UtilityThread::Get()->EnsureBlinkInitialized(); | |
18 // Hook up blink's codecs so skia can call them. | |
19 SkGraphics::SetImageGeneratorFromEncodedDataFactory( | |
20 blink::WebImageGenerator::Create); | |
21 return printing::PdfCompositorService::Create(creator); | |
22 } | |
23 | |
24 } // namespace printing | |
OLD | NEW |