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_PDF_COMPOSITOR_SERVICE_H_ | |
6 #define COMPONENTS_PRINTING_SERVICE_PDF_COMPOSITOR_SERVICE_H_ | |
7 | |
8 #include <memory> | |
9 #include <string> | |
10 | |
11 #include "base/macros.h" | |
12 #include "base/memory/discardable_memory_allocator.h" | |
13 #include "base/memory/discardable_shared_memory.h" | |
14 #include "base/memory/weak_ptr.h" | |
15 #include "base/single_thread_task_runner.h" | |
Lei Zhang
2017/05/04 02:13:13
Not used?
Wei Li
2017/05/04 18:18:28
Removed.
| |
16 #include "base/threading/thread.h" | |
17 #include "components/discardable_memory/client/client_discardable_shared_memory_ manager.h" | |
18 #include "components/printing/service/public/interfaces/pdf_compositor.mojom.h" | |
19 #include "services/service_manager/public/cpp/binder_registry.h" | |
20 #include "services/service_manager/public/cpp/service.h" | |
21 #include "services/service_manager/public/cpp/service_context_ref.h" | |
22 | |
23 namespace printing { | |
24 | |
25 class PdfCompositorService : public service_manager::Service { | |
26 public: | |
27 PdfCompositorService(); | |
28 ~PdfCompositorService() override; | |
29 | |
30 // Factory function for use as an embedded service. | |
31 static std::unique_ptr<service_manager::Service> Create( | |
32 const std::string& creator); | |
33 | |
34 // service_manager::Service: | |
35 void OnStart() override; | |
36 void OnBindInterface(const service_manager::ServiceInfo& source_info, | |
37 const std::string& interface_name, | |
38 mojo::ScopedMessagePipeHandle interface_pipe) override; | |
39 | |
40 private: | |
41 std::unique_ptr<discardable_memory::ClientDiscardableSharedMemoryManager> | |
42 discardable_shared_memory_manager_; | |
43 std::unique_ptr<service_manager::ServiceContextRefFactory> ref_factory_; | |
44 service_manager::BinderRegistry registry_; | |
45 base::WeakPtrFactory<PdfCompositorService> weak_factory_; | |
46 | |
47 DISALLOW_COPY_AND_ASSIGN(PdfCompositorService); | |
48 }; | |
49 | |
50 } // namespace printing | |
51 | |
52 #endif // COMPONENTS_PRINTING_SERVICE_PDF_COMPOSITOR_SERVICE_H_ | |
OLD | NEW |