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

Side by Side 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 unified diff | Download patch
OLDNEW
(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/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.
12 #include "base/macros.h"
13 #include "base/memory/discardable_memory_allocator.h"
14 #include "base/memory/discardable_shared_memory.h"
15 #include "base/memory/weak_ptr.h"
16 #include "base/single_thread_task_runner.h"
17 #include "base/threading/thread.h"
18 #include "components/discardable_memory/client/client_discardable_shared_memory_ manager.h"
19 #include "components/printing/service/public/interfaces/pdf_compositor.mojom.h"
20 #include "services/service_manager/public/cpp/binder_registry.h"
21 #include "services/service_manager/public/cpp/service.h"
22 #include "services/service_manager/public/cpp/service_context_ref.h"
23
24 namespace printing {
25
26 class PdfCompositorService : public service_manager::Service {
27 public:
28 PdfCompositorService();
29 ~PdfCompositorService() override;
30
31 // Factory function for use as an embedded service.
32 static std::unique_ptr<service_manager::Service> Create(
33 const std::string& creator,
34 base::SingleThreadTaskRunner* runner);
35
36 // service_manager::Service:
37 void OnStart() override;
38 void OnBindInterface(const service_manager::ServiceInfo& source_info,
39 const std::string& interface_name,
40 mojo::ScopedMessagePipeHandle interface_pipe) override;
41
42 private:
43 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
44
45 std::unique_ptr<discardable_memory::ClientDiscardableSharedMemoryManager>
46 discardable_shared_memory_manager_;
47 std::unique_ptr<service_manager::ServiceContextRefFactory> ref_factory_;
48 service_manager::BinderRegistry registry_;
49 base::WeakPtrFactory<PdfCompositorService> weak_factory_;
50
51 DISALLOW_COPY_AND_ASSIGN(PdfCompositorService);
52 };
53
54 } // namespace printing
55
56 #endif // COMPONENTS_PRINTING_SERVICE_PDF_COMPOSITOR_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698