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

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

Issue 2444623002: media: Rename ServiceFactory to InterfaceFactory (Closed)
Patch Set: media: Rename ServiceFactory to InterfaceFactory Created 4 years, 1 month 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
« no previous file with comments | « media/mojo/services/media_service.cc ('k') | media/mojo/services/service_factory_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_
6 #define MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "media/mojo/interfaces/service_factory.mojom.h"
12 #include "media/mojo/services/mojo_cdm_service_context.h"
13 #include "services/service_manager/public/cpp/connector.h"
14 #include "services/service_manager/public/cpp/service_context_ref.h"
15
16 namespace service_manager {
17 namespace mojom {
18 class InterfaceProvider;
19 }
20 }
21
22 namespace media {
23
24 class CdmFactory;
25 class MediaLog;
26 class MojoMediaClient;
27 class RendererFactory;
28
29 class ServiceFactoryImpl : public mojom::ServiceFactory {
30 public:
31 ServiceFactoryImpl(
32 service_manager::mojom::InterfaceProviderPtr interfaces,
33 scoped_refptr<MediaLog> media_log,
34 std::unique_ptr<service_manager::ServiceContextRef> connection_ref,
35 MojoMediaClient* mojo_media_client);
36 ~ServiceFactoryImpl() final;
37
38 // mojom::ServiceFactory implementation.
39 void CreateAudioDecoder(mojom::AudioDecoderRequest request) final;
40 void CreateVideoDecoder(mojom::VideoDecoderRequest request) final;
41 void CreateRenderer(const std::string& audio_device_id,
42 mojom::RendererRequest request) final;
43 void CreateCdm(mojom::ContentDecryptionModuleRequest request) final;
44
45 private:
46 #if defined(ENABLE_MOJO_RENDERER)
47 RendererFactory* GetRendererFactory();
48 #endif // defined(ENABLE_MOJO_RENDERER)
49
50 #if defined(ENABLE_MOJO_CDM)
51 CdmFactory* GetCdmFactory();
52 #endif // defined(ENABLE_MOJO_CDM)
53
54 MojoCdmServiceContext cdm_service_context_;
55
56 #if defined(ENABLE_MOJO_RENDERER)
57 std::unique_ptr<RendererFactory> renderer_factory_;
58 #endif // defined(ENABLE_MOJO_RENDERER)
59
60 #if defined(ENABLE_MOJO_CDM)
61 std::unique_ptr<CdmFactory> cdm_factory_;
62 service_manager::mojom::InterfaceProviderPtr interfaces_;
63 #endif // defined(ENABLE_MOJO_CDM)
64
65 scoped_refptr<MediaLog> media_log_;
66 std::unique_ptr<service_manager::ServiceContextRef> connection_ref_;
67 MojoMediaClient* mojo_media_client_;
68
69 DISALLOW_COPY_AND_ASSIGN(ServiceFactoryImpl);
70 };
71
72 } // namespace media
73
74 #endif // MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_
OLDNEW
« no previous file with comments | « media/mojo/services/media_service.cc ('k') | media/mojo/services/service_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698