Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / media / mojo / services / service_factory_impl.h
blob9ad5fbcea0f584af39e50debcdd8ccb25cee5fa3
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.
5 #ifndef MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_
6 #define MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_
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"
13 namespace mojo {
14 class ServiceProvider;
17 namespace media {
19 class CdmFactory;
20 class MediaLog;
21 class RendererFactory;
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;
30 // interfaces::ServiceFactory implementation.
31 void CreateRenderer(
32 mojo::InterfaceRequest<interfaces::MediaRenderer> renderer) final;
33 void CreateCdm(
34 mojo::InterfaceRequest<interfaces::ContentDecryptionModule> cdm) final;
36 private:
37 RendererFactory* GetRendererFactory();
38 CdmFactory* GetCdmFactory();
40 MojoCdmServiceContext cdm_service_context_;
42 mojo::StrongBinding<interfaces::ServiceFactory> binding_;
43 mojo::ServiceProvider* service_provider_;
44 scoped_refptr<MediaLog> media_log_;
46 scoped_ptr<RendererFactory> renderer_factory_;
47 scoped_ptr<CdmFactory> cdm_factory_;
49 DISALLOW_COPY_AND_ASSIGN(ServiceFactoryImpl);
52 } // namespace media
54 #endif // MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_