| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 MEDIA_MOJO_SERVICES_MEDIA_SERVICE_H_ | 5 #ifndef MEDIA_MOJO_SERVICES_MEDIA_SERVICE_H_ |
| 6 #define MEDIA_MOJO_SERVICES_MEDIA_SERVICE_H_ | 6 #define MEDIA_MOJO_SERVICES_MEDIA_SERVICE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "media/base/media_log.h" | 15 #include "media/base/media_log.h" |
| 16 #include "media/mojo/interfaces/interface_factory.mojom.h" | 16 #include "media/mojo/interfaces/interface_factory.mojom.h" |
| 17 #include "media/mojo/interfaces/media_service.mojom.h" | 17 #include "media/mojo/interfaces/media_service.mojom.h" |
| 18 #include "media/mojo/services/media_mojo_export.h" | 18 #include "media/mojo/services/media_mojo_export.h" |
| 19 #include "mojo/public/cpp/bindings/binding_set.h" | 19 #include "mojo/public/cpp/bindings/binding_set.h" |
| 20 #include "mojo/public/cpp/bindings/strong_binding_set.h" |
| 20 #include "services/service_manager/public/cpp/binder_registry.h" | 21 #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.h" |
| 22 #include "services/service_manager/public/cpp/service_context.h" | 23 #include "services/service_manager/public/cpp/service_context.h" |
| 23 #include "services/service_manager/public/cpp/service_context_ref.h" | 24 #include "services/service_manager/public/cpp/service_context_ref.h" |
| 24 #include "url/gurl.h" | 25 #include "url/gurl.h" |
| 25 | 26 |
| 26 namespace media { | 27 namespace media { |
| 27 | 28 |
| 28 class MojoMediaClient; | 29 class MojoMediaClient; |
| 29 | 30 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 48 // mojom::MediaService implementation. | 49 // mojom::MediaService implementation. |
| 49 void CreateInterfaceFactory( | 50 void CreateInterfaceFactory( |
| 50 mojom::InterfaceFactoryRequest request, | 51 mojom::InterfaceFactoryRequest request, |
| 51 service_manager::mojom::InterfaceProviderPtr host_interfaces) final; | 52 service_manager::mojom::InterfaceProviderPtr host_interfaces) final; |
| 52 | 53 |
| 53 // Note: Since each instance runs on a different thread, do not share a common | 54 // Note: Since each instance runs on a different thread, do not share a common |
| 54 // MojoMediaClient with other instances to avoid threading issues. Hence using | 55 // MojoMediaClient with other instances to avoid threading issues. Hence using |
| 55 // a unique_ptr here. | 56 // a unique_ptr here. |
| 56 std::unique_ptr<MojoMediaClient> mojo_media_client_; | 57 std::unique_ptr<MojoMediaClient> mojo_media_client_; |
| 57 | 58 |
| 59 mojo::StrongBindingSet<mojom::InterfaceFactory> interface_factory_bindings_; |
| 60 |
| 58 MediaLog media_log_; | 61 MediaLog media_log_; |
| 59 std::unique_ptr<service_manager::ServiceContextRefFactory> ref_factory_; | 62 std::unique_ptr<service_manager::ServiceContextRefFactory> ref_factory_; |
| 60 | 63 |
| 61 service_manager::BinderRegistry registry_; | 64 service_manager::BinderRegistry registry_; |
| 62 mojo::BindingSet<mojom::MediaService> bindings_; | 65 mojo::BindingSet<mojom::MediaService> bindings_; |
| 63 }; | 66 }; |
| 64 | 67 |
| 65 } // namespace media | 68 } // namespace media |
| 66 | 69 |
| 67 #endif // MEDIA_MOJO_SERVICES_MEDIA_SERVICE_H_ | 70 #endif // MEDIA_MOJO_SERVICES_MEDIA_SERVICE_H_ |
| OLD | NEW |