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 #ifndef COMPONENTS_PRINTING_SERVICE_PUBLIC_CPP_PDF_COMPOSITOR_CLIENT_H_ |
| 6 #define COMPONENTS_PRINTING_SERVICE_PUBLIC_CPP_PDF_COMPOSITOR_CLIENT_H_ |
| 7 |
| 8 #include "base/memory/shared_memory_handle.h" |
| 9 #include "components/printing/service/public/interfaces/pdf_compositor.mojom.h" |
| 10 #include "services/service_manager/public/cpp/connector.h" |
| 11 |
| 12 namespace printing { |
| 13 |
| 14 // Helper class to composite a pdf via the pdf_compositor service. |
| 15 class PdfCompositorClient { |
| 16 public: |
| 17 PdfCompositorClient(); |
| 18 ~PdfCompositorClient(); |
| 19 |
| 20 // Composite the final picture and convert into a PDF file. |
| 21 void Composite(service_manager::Connector* connector, |
| 22 base::SharedMemoryHandle handle, |
| 23 size_t data_size, |
| 24 mojom::PdfCompositor::CompositePdfCallback callback, |
| 25 scoped_refptr<base::SequencedTaskRunner> callback_task_runner); |
| 26 |
| 27 private: |
| 28 // Connect to the service. |
| 29 void Connect(service_manager::Connector* connector); |
| 30 |
| 31 mojom::PdfCompositorPtr compositor_; |
| 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(PdfCompositorClient); |
| 34 }; |
| 35 |
| 36 } // namespace printing |
| 37 |
| 38 #endif // COMPONENTS_PRINTING_SERVICE_PUBLIC_CPP_PDF_COMPOSITOR_CLIENT_H_ |
OLD | NEW |