| // 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. |
| |
| #ifndef COMPONENTS_PRINTING_SERVICE_PDF_COMPOSITOR_IMPL_H_ |
| #define COMPONENTS_PRINTING_SERVICE_PDF_COMPOSITOR_IMPL_H_ |
| |
| #include <memory> |
| #include <string> |
| |
| #include "base/macros.h" |
| #include "components/printing/service/public/interfaces/pdf_compositor.mojom.h" |
| #include "mojo/public/cpp/system/buffer.h" |
| #include "services/service_manager/public/cpp/service_context_ref.h" |
| |
| namespace printing { |
| |
| class PdfCompositorImpl : public mojom::PdfCompositor { |
| public: |
| PdfCompositorImpl( |
| const std::string& creator, |
| std::unique_ptr<service_manager::ServiceContextRef> service_ref); |
| ~PdfCompositorImpl() override; |
| |
| void CompositePdf( |
| mojo::ScopedSharedBufferHandle sk_handle, |
| mojom::PdfCompositor::CompositePdfCallback callback) override; |
| |
| private: |
| const std::unique_ptr<service_manager::ServiceContextRef> service_ref_; |
| const std::string creator_; |
| |
| DISALLOW_COPY_AND_ASSIGN(PdfCompositorImpl); |
| }; |
| |
| } // namespace printing |
| |
| #endif // COMPONENTS_PRINTING_SERVICE_PDF_COMPOSITOR_IMPL_H_ |