Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: components/printing/service/public/cpp/pdf_compositor_client.h

Issue 2832633002: Add PDF compositor service (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/printing/service/public/cpp/pdf_compositor_client.h
diff --git a/components/printing/service/public/cpp/pdf_compositor_client.h b/components/printing/service/public/cpp/pdf_compositor_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..d3d8c29b866ae6c6f1a07ef2cd693a4e080db31e
--- /dev/null
+++ b/components/printing/service/public/cpp/pdf_compositor_client.h
@@ -0,0 +1,38 @@
+// 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_PUBLIC_CPP_PDF_COMPOSITOR_CLIENT_H_
+#define COMPONENTS_PRINTING_SERVICE_PUBLIC_CPP_PDF_COMPOSITOR_CLIENT_H_
+
+#include "base/memory/shared_memory_handle.h"
+#include "components/printing/service/public/interfaces/pdf_compositor.mojom.h"
+#include "services/service_manager/public/cpp/connector.h"
+
+namespace printing {
+
+// Helper class to composite a pdf via the pdf_compositor service.
+class PdfCompositorClient {
+ public:
+ PdfCompositorClient();
+ ~PdfCompositorClient();
+
+ // Composite the final picture and convert into a PDF file.
+ void Composite(service_manager::Connector* connector,
+ base::SharedMemoryHandle handle,
+ size_t data_size,
+ mojom::PdfCompositor::CompositePdfCallback callback,
+ scoped_refptr<base::SequencedTaskRunner> callback_task_runner);
+
+ private:
+ // Connect to the service.
+ void Connect(service_manager::Connector* connector);
+
+ mojom::PdfCompositorPtr compositor_;
+
+ DISALLOW_COPY_AND_ASSIGN(PdfCompositorClient);
+};
+
+} // namespace printing
+
+#endif // COMPONENTS_PRINTING_SERVICE_PUBLIC_CPP_PDF_COMPOSITOR_CLIENT_H_
« no previous file with comments | « components/printing/service/public/cpp/BUILD.gn ('k') | components/printing/service/public/cpp/pdf_compositor_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698