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

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

Issue 1230313010: media: Add ServiceFactory mojo interface and implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only Created 5 years, 5 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 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 "base/macros.h"
9 #include "media/mojo/interfaces/service_factory.mojom.h"
10 #include "media/mojo/services/mojo_cdm_service_context.h"
11 #include "mojo/public/cpp/bindings/strong_binding.h"
12
13 namespace mojo {
14 class ServiceProvider;
15 }
16
17 namespace media {
18
19 class CdmFactory;
20 class MediaLog;
21 class RendererFactory;
22
23 class ServiceFactoryImpl : public interfaces::ServiceFactory {
24 public:
25 ServiceFactoryImpl(mojo::InterfaceRequest<interfaces::ServiceFactory> request,
26 mojo::ServiceProvider* service_provider,
27 scoped_refptr<MediaLog> media_log);
28 ~ServiceFactoryImpl() final;
29
30 // interfaces::ServiceFactory implementation.
31 void CreateRenderer(
32 mojo::InterfaceRequest<interfaces::MediaRenderer> renderer) final;
33 void CreateCdm(
34 mojo::InterfaceRequest<interfaces::ContentDecryptionModule> cdm) final;
35
36 private:
37 RendererFactory* GetRendererFactory();
38 CdmFactory* GetCdmFactory();
39
40 MojoCdmServiceContext cdm_service_context_;
41
42 mojo::StrongBinding<interfaces::ServiceFactory> binding_;
43 mojo::ServiceProvider* service_provider_;
44 scoped_refptr<MediaLog> media_log_;
45
46 scoped_ptr<RendererFactory> renderer_factory_;
47 scoped_ptr<CdmFactory> cdm_factory_;
48
49 DISALLOW_COPY_AND_ASSIGN(ServiceFactoryImpl);
50 };
51
52 } // namespace media
53
54 #endif // MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_
OLDNEW
« no previous file with comments | « media/mojo/services/mojo_renderer_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