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

Unified Diff: components/printing/service/pdf_compositor_service.h

Issue 2832633002: Add PDF compositor service (Closed)
Patch Set: remove headers Created 3 years, 8 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/pdf_compositor_service.h
diff --git a/components/printing/service/pdf_compositor_service.h b/components/printing/service/pdf_compositor_service.h
new file mode 100644
index 0000000000000000000000000000000000000000..55382dff6abeb121d8cd1f30775096bcef41e441
--- /dev/null
+++ b/components/printing/service/pdf_compositor_service.h
@@ -0,0 +1,56 @@
+// 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_SERVICE_H_
+#define COMPONENTS_PRINTING_SERVICE_PDF_COMPOSITOR_SERVICE_H_
+
+#include <memory>
+#include <string>
+
+#include "base/callback.h"
Lei Zhang 2017/04/22 00:12:26 Not used. Can we (only) IWYU?
Wei Li 2017/04/27 05:34:16 Done.
+#include "base/macros.h"
+#include "base/memory/discardable_memory_allocator.h"
+#include "base/memory/discardable_shared_memory.h"
+#include "base/memory/weak_ptr.h"
+#include "base/single_thread_task_runner.h"
+#include "base/threading/thread.h"
+#include "components/discardable_memory/client/client_discardable_shared_memory_manager.h"
+#include "components/printing/service/public/interfaces/pdf_compositor.mojom.h"
+#include "services/service_manager/public/cpp/binder_registry.h"
+#include "services/service_manager/public/cpp/service.h"
+#include "services/service_manager/public/cpp/service_context_ref.h"
+
+namespace printing {
+
+class PdfCompositorService : public service_manager::Service {
+ public:
+ PdfCompositorService();
+ ~PdfCompositorService() override;
+
+ // Factory function for use as an embedded service.
+ static std::unique_ptr<service_manager::Service> Create(
+ const std::string& creator,
+ base::SingleThreadTaskRunner* runner);
+
+ // service_manager::Service:
+ void OnStart() override;
+ void OnBindInterface(const service_manager::ServiceInfo& source_info,
+ const std::string& interface_name,
+ mojo::ScopedMessagePipeHandle interface_pipe) override;
+
+ private:
+ static base::SingleThreadTaskRunner* io_task_runner_;
Lei Zhang 2017/04/22 00:12:26 Why is this static and not per object?
Wei Li 2017/04/27 05:34:16 removed
+
+ std::unique_ptr<discardable_memory::ClientDiscardableSharedMemoryManager>
+ discardable_shared_memory_manager_;
+ std::unique_ptr<service_manager::ServiceContextRefFactory> ref_factory_;
+ service_manager::BinderRegistry registry_;
+ base::WeakPtrFactory<PdfCompositorService> weak_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(PdfCompositorService);
+};
+
+} // namespace printing
+
+#endif // COMPONENTS_PRINTING_SERVICE_PDF_COMPOSITOR_SERVICE_H_

Powered by Google App Engine
This is Rietveld 408576698