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

Side by Side Diff: media/mojo/services/interface_factory_impl.h

Issue 2815303006: Convert MediaLog from being ref counted to owned by WebMediaPlayer. (Closed)
Patch Set: Rebase. 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_INTERFACE_FACTORY_IMPL_H_ 5 #ifndef MEDIA_MOJO_SERVICES_INTERFACE_FACTORY_IMPL_H_
6 #define MEDIA_MOJO_SERVICES_INTERFACE_FACTORY_IMPL_H_ 6 #define MEDIA_MOJO_SERVICES_INTERFACE_FACTORY_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "media/mojo/interfaces/interface_factory.mojom.h" 11 #include "media/mojo/interfaces/interface_factory.mojom.h"
12 #include "media/mojo/services/mojo_cdm_service_context.h" 12 #include "media/mojo/services/mojo_cdm_service_context.h"
13 #include "mojo/public/cpp/bindings/strong_binding_set.h" 13 #include "mojo/public/cpp/bindings/strong_binding_set.h"
14 #include "services/service_manager/public/cpp/connector.h" 14 #include "services/service_manager/public/cpp/connector.h"
15 #include "services/service_manager/public/cpp/service_context_ref.h" 15 #include "services/service_manager/public/cpp/service_context_ref.h"
16 16
17 namespace media { 17 namespace media {
18 18
19 class CdmFactory; 19 class CdmFactory;
20 class MediaLog; 20 class MediaLog;
21 class MojoMediaClient; 21 class MojoMediaClient;
22 class RendererFactory; 22 class RendererFactory;
23 23
24 class InterfaceFactoryImpl : public mojom::InterfaceFactory { 24 class InterfaceFactoryImpl : public mojom::InterfaceFactory {
25 public: 25 public:
26 InterfaceFactoryImpl( 26 InterfaceFactoryImpl(
27 service_manager::mojom::InterfaceProviderPtr interfaces, 27 service_manager::mojom::InterfaceProviderPtr interfaces,
28 scoped_refptr<MediaLog> media_log, 28 MediaLog* media_log,
29 std::unique_ptr<service_manager::ServiceContextRef> connection_ref, 29 std::unique_ptr<service_manager::ServiceContextRef> connection_ref,
30 MojoMediaClient* mojo_media_client); 30 MojoMediaClient* mojo_media_client);
31 ~InterfaceFactoryImpl() final; 31 ~InterfaceFactoryImpl() final;
32 32
33 // mojom::InterfaceFactory implementation. 33 // mojom::InterfaceFactory implementation.
34 void CreateAudioDecoder(mojom::AudioDecoderRequest request) final; 34 void CreateAudioDecoder(mojom::AudioDecoderRequest request) final;
35 void CreateVideoDecoder(mojom::VideoDecoderRequest request) final; 35 void CreateVideoDecoder(mojom::VideoDecoderRequest request) final;
36 void CreateRenderer(const std::string& audio_device_id, 36 void CreateRenderer(const std::string& audio_device_id,
37 mojom::RendererRequest request) final; 37 mojom::RendererRequest request) final;
38 void CreateCdm(mojom::ContentDecryptionModuleRequest request) final; 38 void CreateCdm(mojom::ContentDecryptionModuleRequest request) final;
(...skipping 11 matching lines...) Expand all
50 50
51 #if defined(ENABLE_MOJO_AUDIO_DECODER) 51 #if defined(ENABLE_MOJO_AUDIO_DECODER)
52 mojo::StrongBindingSet<mojom::AudioDecoder> audio_decoder_bindings_; 52 mojo::StrongBindingSet<mojom::AudioDecoder> audio_decoder_bindings_;
53 #endif // defined(ENABLE_MOJO_AUDIO_DECODER) 53 #endif // defined(ENABLE_MOJO_AUDIO_DECODER)
54 54
55 #if defined(ENABLE_MOJO_VIDEO_DECODER) 55 #if defined(ENABLE_MOJO_VIDEO_DECODER)
56 mojo::StrongBindingSet<mojom::VideoDecoder> video_decoder_bindings_; 56 mojo::StrongBindingSet<mojom::VideoDecoder> video_decoder_bindings_;
57 #endif // defined(ENABLE_MOJO_VIDEO_DECODER) 57 #endif // defined(ENABLE_MOJO_VIDEO_DECODER)
58 58
59 #if defined(ENABLE_MOJO_RENDERER) 59 #if defined(ENABLE_MOJO_RENDERER)
60 MediaLog* media_log_;
60 std::unique_ptr<RendererFactory> renderer_factory_; 61 std::unique_ptr<RendererFactory> renderer_factory_;
61 mojo::StrongBindingSet<mojom::Renderer> renderer_bindings_; 62 mojo::StrongBindingSet<mojom::Renderer> renderer_bindings_;
62 #endif // defined(ENABLE_MOJO_RENDERER) 63 #endif // defined(ENABLE_MOJO_RENDERER)
63 64
64 #if defined(ENABLE_MOJO_CDM) 65 #if defined(ENABLE_MOJO_CDM)
65 std::unique_ptr<CdmFactory> cdm_factory_; 66 std::unique_ptr<CdmFactory> cdm_factory_;
66 service_manager::mojom::InterfaceProviderPtr interfaces_; 67 service_manager::mojom::InterfaceProviderPtr interfaces_;
67 mojo::StrongBindingSet<mojom::ContentDecryptionModule> cdm_bindings_; 68 mojo::StrongBindingSet<mojom::ContentDecryptionModule> cdm_bindings_;
68 #endif // defined(ENABLE_MOJO_CDM) 69 #endif // defined(ENABLE_MOJO_CDM)
69 70
70 scoped_refptr<MediaLog> media_log_;
71 std::unique_ptr<service_manager::ServiceContextRef> connection_ref_; 71 std::unique_ptr<service_manager::ServiceContextRef> connection_ref_;
72 MojoMediaClient* mojo_media_client_; 72 MojoMediaClient* mojo_media_client_;
73 73
74 DISALLOW_COPY_AND_ASSIGN(InterfaceFactoryImpl); 74 DISALLOW_COPY_AND_ASSIGN(InterfaceFactoryImpl);
75 }; 75 };
76 76
77 } // namespace media 77 } // namespace media
78 78
79 #endif // MEDIA_MOJO_SERVICES_INTERFACE_FACTORY_IMPL_H_ 79 #endif // MEDIA_MOJO_SERVICES_INTERFACE_FACTORY_IMPL_H_
OLDNEW
« no previous file with comments | « media/gpu/video_encode_accelerator_unittest.cc ('k') | media/mojo/services/interface_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698