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

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

Issue 2530613003: media: Fix lifetime of InterfaceFactoryImpl and created impls (Closed)
Patch Set: comments addressed Created 4 years 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/BUILD.gn ('k') | media/mojo/services/interface_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_INTERFACE_FACTORY_IMPL_H_ 5 #ifndef MEDIA_MOJO_SERVICES_INTERFACE_FACTORY_IMPL_H_
6 #define MEDIA_MOJO_SERVICES_INTERFACE_FACTORY_IMPL_H_ 6 #define MEDIA_MOJO_SERVICES_INTERFACE_FACTORY_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "media/mojo/interfaces/interface_factory.mojom.h" 11 #include "media/mojo/interfaces/interface_factory.mojom.h"
12 #include "media/mojo/services/mojo_cdm_service_context.h" 12 #include "media/mojo/services/mojo_cdm_service_context.h"
13 #include "media/mojo/services/strong_binding_set.h"
13 #include "services/service_manager/public/cpp/connector.h" 14 #include "services/service_manager/public/cpp/connector.h"
14 #include "services/service_manager/public/cpp/service_context_ref.h" 15 #include "services/service_manager/public/cpp/service_context_ref.h"
15 16
16 namespace service_manager { 17 namespace service_manager {
17 namespace mojom { 18 namespace mojom {
18 class InterfaceProvider; 19 class InterfaceProvider;
19 } 20 }
20 } 21 }
21 22
22 namespace media { 23 namespace media {
(...skipping 23 matching lines...) Expand all
46 #if defined(ENABLE_MOJO_RENDERER) 47 #if defined(ENABLE_MOJO_RENDERER)
47 RendererFactory* GetRendererFactory(); 48 RendererFactory* GetRendererFactory();
48 #endif // defined(ENABLE_MOJO_RENDERER) 49 #endif // defined(ENABLE_MOJO_RENDERER)
49 50
50 #if defined(ENABLE_MOJO_CDM) 51 #if defined(ENABLE_MOJO_CDM)
51 CdmFactory* GetCdmFactory(); 52 CdmFactory* GetCdmFactory();
52 #endif // defined(ENABLE_MOJO_CDM) 53 #endif // defined(ENABLE_MOJO_CDM)
53 54
54 MojoCdmServiceContext cdm_service_context_; 55 MojoCdmServiceContext cdm_service_context_;
55 56
57 #if defined(ENABLE_MOJO_AUDIO_DECODER)
58 StrongBindingSet<mojom::AudioDecoder> audio_decoder_bindings_;
59 #endif // defined(ENABLE_MOJO_AUDIO_DECODER)
60
61 #if defined(ENABLE_MOJO_AUDIO_DECODER)
Julien Isorce Samsung 2016/11/30 16:30:44 Should be ENABLE_MOJO_VIDEO_DECODER
xhwang 2016/11/30 17:38:49 oops, thanks! I'll fix it now. OOC, are you usin
62 StrongBindingSet<mojom::VideoDecoder> video_decoder_bindings_;
63 #endif // defined(ENABLE_MOJO_AUDIO_DECODER)
64
56 #if defined(ENABLE_MOJO_RENDERER) 65 #if defined(ENABLE_MOJO_RENDERER)
57 std::unique_ptr<RendererFactory> renderer_factory_; 66 std::unique_ptr<RendererFactory> renderer_factory_;
67 StrongBindingSet<mojom::Renderer> renderer_bindings_;
58 #endif // defined(ENABLE_MOJO_RENDERER) 68 #endif // defined(ENABLE_MOJO_RENDERER)
59 69
60 #if defined(ENABLE_MOJO_CDM) 70 #if defined(ENABLE_MOJO_CDM)
61 std::unique_ptr<CdmFactory> cdm_factory_; 71 std::unique_ptr<CdmFactory> cdm_factory_;
62 service_manager::mojom::InterfaceProviderPtr interfaces_; 72 service_manager::mojom::InterfaceProviderPtr interfaces_;
73 StrongBindingSet<mojom::ContentDecryptionModule> cdm_bindings_;
63 #endif // defined(ENABLE_MOJO_CDM) 74 #endif // defined(ENABLE_MOJO_CDM)
64 75
65 scoped_refptr<MediaLog> media_log_; 76 scoped_refptr<MediaLog> media_log_;
66 std::unique_ptr<service_manager::ServiceContextRef> connection_ref_; 77 std::unique_ptr<service_manager::ServiceContextRef> connection_ref_;
67 MojoMediaClient* mojo_media_client_; 78 MojoMediaClient* mojo_media_client_;
68 79
69 DISALLOW_COPY_AND_ASSIGN(InterfaceFactoryImpl); 80 DISALLOW_COPY_AND_ASSIGN(InterfaceFactoryImpl);
70 }; 81 };
71 82
72 } // namespace media 83 } // namespace media
73 84
74 #endif // MEDIA_MOJO_SERVICES_INTERFACE_FACTORY_IMPL_H_ 85 #endif // MEDIA_MOJO_SERVICES_INTERFACE_FACTORY_IMPL_H_
OLDNEW
« no previous file with comments | « media/mojo/services/BUILD.gn ('k') | media/mojo/services/interface_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698