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

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

Issue 1725353003: Eliminate mojo::Shell client lib class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@15connector
Patch Set: . Created 4 years, 9 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_SERVICE_FACTORY_IMPL_H_ 5 #ifndef MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_
6 #define MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_ 6 #define MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "media/mojo/interfaces/service_factory.mojom.h" 10 #include "media/mojo/interfaces/service_factory.mojom.h"
11 #include "media/mojo/services/mojo_cdm_service_context.h" 11 #include "media/mojo/services/mojo_cdm_service_context.h"
12 #include "mojo/public/cpp/bindings/strong_binding.h" 12 #include "mojo/public/cpp/bindings/strong_binding.h"
13 #include "mojo/shell/public/cpp/shell.h" 13 #include "mojo/shell/public/cpp/connector.h"
14 14
15 namespace mojo { 15 namespace mojo {
16 class AppRefCount; 16 class MessageLoopRef;
17 namespace shell { 17 namespace shell {
18 namespace mojom { 18 namespace mojom {
19 class InterfaceProvider; 19 class InterfaceProvider;
20 } 20 }
21 } 21 }
22 } 22 }
23 23
24 namespace media { 24 namespace media {
25 25
26 class CdmFactory; 26 class CdmFactory;
27 class MediaLog; 27 class MediaLog;
28 class MojoMediaClient; 28 class MojoMediaClient;
29 class RendererFactory; 29 class RendererFactory;
30 30
31 class ServiceFactoryImpl : public interfaces::ServiceFactory { 31 class ServiceFactoryImpl : public interfaces::ServiceFactory {
32 public: 32 public:
33 ServiceFactoryImpl(mojo::InterfaceRequest<interfaces::ServiceFactory> request, 33 ServiceFactoryImpl(mojo::InterfaceRequest<interfaces::ServiceFactory> request,
34 mojo::shell::mojom::InterfaceProvider* interfaces, 34 mojo::shell::mojom::InterfaceProvider* interfaces,
35 scoped_refptr<MediaLog> media_log, 35 scoped_refptr<MediaLog> media_log,
36 scoped_ptr<mojo::AppRefCount> parent_app_refcount, 36 scoped_ptr<mojo::MessageLoopRef> parent_app_refcount,
37 MojoMediaClient* mojo_media_client); 37 MojoMediaClient* mojo_media_client);
38 ~ServiceFactoryImpl() final; 38 ~ServiceFactoryImpl() final;
39 39
40 // interfaces::ServiceFactory implementation. 40 // interfaces::ServiceFactory implementation.
41 void CreateRenderer( 41 void CreateRenderer(
42 mojo::InterfaceRequest<interfaces::Renderer> renderer) final; 42 mojo::InterfaceRequest<interfaces::Renderer> renderer) final;
43 void CreateCdm( 43 void CreateCdm(
44 mojo::InterfaceRequest<interfaces::ContentDecryptionModule> cdm) final; 44 mojo::InterfaceRequest<interfaces::ContentDecryptionModule> cdm) final;
45 45
46 private: 46 private:
47 RendererFactory* GetRendererFactory(); 47 RendererFactory* GetRendererFactory();
48 CdmFactory* GetCdmFactory(); 48 CdmFactory* GetCdmFactory();
49 49
50 MojoCdmServiceContext cdm_service_context_; 50 MojoCdmServiceContext cdm_service_context_;
51 51
52 mojo::StrongBinding<interfaces::ServiceFactory> binding_; 52 mojo::StrongBinding<interfaces::ServiceFactory> binding_;
53 mojo::shell::mojom::InterfaceProvider* interfaces_; 53 mojo::shell::mojom::InterfaceProvider* interfaces_;
54 scoped_refptr<MediaLog> media_log_; 54 scoped_refptr<MediaLog> media_log_;
55 scoped_ptr<mojo::AppRefCount> parent_app_refcount_; 55 scoped_ptr<mojo::MessageLoopRef> parent_app_refcount_;
56 MojoMediaClient* mojo_media_client_; 56 MojoMediaClient* mojo_media_client_;
57 57
58 scoped_ptr<RendererFactory> renderer_factory_; 58 scoped_ptr<RendererFactory> renderer_factory_;
59 scoped_ptr<CdmFactory> cdm_factory_; 59 scoped_ptr<CdmFactory> cdm_factory_;
60 60
61 DISALLOW_COPY_AND_ASSIGN(ServiceFactoryImpl); 61 DISALLOW_COPY_AND_ASSIGN(ServiceFactoryImpl);
62 }; 62 };
63 63
64 } // namespace media 64 } // namespace media
65 65
66 #endif // MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_ 66 #endif // MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698