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

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

Issue 1840453003: media: Only provide necessary services in ServiceFactoryImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | 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
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"
(...skipping 29 matching lines...) Expand all
40 40
41 // interfaces::ServiceFactory implementation. 41 // interfaces::ServiceFactory implementation.
42 void CreateAudioDecoder( 42 void CreateAudioDecoder(
43 mojo::InterfaceRequest<interfaces::AudioDecoder> audio_decoder) final; 43 mojo::InterfaceRequest<interfaces::AudioDecoder> audio_decoder) final;
44 void CreateRenderer( 44 void CreateRenderer(
45 mojo::InterfaceRequest<interfaces::Renderer> renderer) final; 45 mojo::InterfaceRequest<interfaces::Renderer> renderer) final;
46 void CreateCdm( 46 void CreateCdm(
47 mojo::InterfaceRequest<interfaces::ContentDecryptionModule> cdm) final; 47 mojo::InterfaceRequest<interfaces::ContentDecryptionModule> cdm) final;
48 48
49 private: 49 private:
50 #if defined(ENABLE_MOJO_RENDERER)
50 RendererFactory* GetRendererFactory(); 51 RendererFactory* GetRendererFactory();
52
53 scoped_ptr<RendererFactory> renderer_factory_;
54 #endif // defined(ENABLE_MOJO_RENDERER)
55
56 #if defined(ENABLE_MOJO_CDM)
51 CdmFactory* GetCdmFactory(); 57 CdmFactory* GetCdmFactory();
52 58
59 scoped_ptr<CdmFactory> cdm_factory_;
60 #endif // defined(ENABLE_MOJO_CDM)
61
53 MojoCdmServiceContext cdm_service_context_; 62 MojoCdmServiceContext cdm_service_context_;
xhwang 2016/03/25 22:27:12 In theory I can ifdef this as well, but it'll be m
DaleCurtis 2016/03/25 22:29:13 Shouldn't matter if it's used anyways then.
54
55 mojo::StrongBinding<interfaces::ServiceFactory> binding_; 63 mojo::StrongBinding<interfaces::ServiceFactory> binding_;
56 mojo::shell::mojom::InterfaceProvider* interfaces_; 64 mojo::shell::mojom::InterfaceProvider* interfaces_;
57 scoped_refptr<MediaLog> media_log_; 65 scoped_refptr<MediaLog> media_log_;
58 scoped_ptr<mojo::MessageLoopRef> parent_app_refcount_; 66 scoped_ptr<mojo::MessageLoopRef> parent_app_refcount_;
59 MojoMediaClient* mojo_media_client_; 67 MojoMediaClient* mojo_media_client_;
60 68
61 scoped_ptr<RendererFactory> renderer_factory_;
62 scoped_ptr<CdmFactory> cdm_factory_;
63
64 DISALLOW_COPY_AND_ASSIGN(ServiceFactoryImpl); 69 DISALLOW_COPY_AND_ASSIGN(ServiceFactoryImpl);
65 }; 70 };
66 71
67 } // namespace media 72 } // namespace media
68 73
69 #endif // MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_ 74 #endif // MEDIA_MOJO_SERVICES_SERVICE_FACTORY_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | media/mojo/services/service_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698