| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_PRINTING_SERVICE_PDF_COMPOSITOR_SERVICE_H_ | 5 #ifndef COMPONENTS_PRINTING_SERVICE_PDF_COMPOSITOR_SERVICE_H_ |
| 6 #define COMPONENTS_PRINTING_SERVICE_PDF_COMPOSITOR_SERVICE_H_ | 6 #define COMPONENTS_PRINTING_SERVICE_PDF_COMPOSITOR_SERVICE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // Factory function for use as an embedded service. | 27 // Factory function for use as an embedded service. |
| 28 static std::unique_ptr<service_manager::Service> Create( | 28 static std::unique_ptr<service_manager::Service> Create( |
| 29 const std::string& creator); | 29 const std::string& creator); |
| 30 | 30 |
| 31 // service_manager::Service: | 31 // service_manager::Service: |
| 32 void OnStart() override; | 32 void OnStart() override; |
| 33 void OnBindInterface(const service_manager::BindSourceInfo& source_info, | 33 void OnBindInterface(const service_manager::BindSourceInfo& source_info, |
| 34 const std::string& interface_name, | 34 const std::string& interface_name, |
| 35 mojo::ScopedMessagePipeHandle interface_pipe) override; | 35 mojo::ScopedMessagePipeHandle interface_pipe) override; |
| 36 | 36 |
| 37 virtual void PrepareToStart(); |
| 38 |
| 37 private: | 39 private: |
| 38 // The creator of this service. | 40 // The creator of this service. |
| 39 // Currently contains the service creator's user agent string if given, | 41 // Currently contains the service creator's user agent string if given, |
| 40 // otherwise just use string "Chromium". | 42 // otherwise just use string "Chromium". |
| 41 const std::string creator_; | 43 const std::string creator_; |
| 42 | 44 |
| 43 std::unique_ptr<discardable_memory::ClientDiscardableSharedMemoryManager> | 45 std::unique_ptr<discardable_memory::ClientDiscardableSharedMemoryManager> |
| 44 discardable_shared_memory_manager_; | 46 discardable_shared_memory_manager_; |
| 45 std::unique_ptr<service_manager::ServiceContextRefFactory> ref_factory_; | 47 std::unique_ptr<service_manager::ServiceContextRefFactory> ref_factory_; |
| 46 service_manager::BinderRegistry registry_; | 48 service_manager::BinderRegistry registry_; |
| 47 base::WeakPtrFactory<PdfCompositorService> weak_factory_; | 49 base::WeakPtrFactory<PdfCompositorService> weak_factory_; |
| 48 | 50 |
| 49 DISALLOW_COPY_AND_ASSIGN(PdfCompositorService); | 51 DISALLOW_COPY_AND_ASSIGN(PdfCompositorService); |
| 50 }; | 52 }; |
| 51 | 53 |
| 52 } // namespace printing | 54 } // namespace printing |
| 53 | 55 |
| 54 #endif // COMPONENTS_PRINTING_SERVICE_PDF_COMPOSITOR_SERVICE_H_ | 56 #endif // COMPONENTS_PRINTING_SERVICE_PDF_COMPOSITOR_SERVICE_H_ |
| OLD | NEW |