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

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

Issue 1882423004: Move shell service to toplevel shell namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
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 #include "media/mojo/services/service_factory_impl.h" 5 #include "media/mojo/services/service_factory_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "media/base/media_log.h" 8 #include "media/base/media_log.h"
9 #include "media/mojo/services/mojo_media_client.h" 9 #include "media/mojo/services/mojo_media_client.h"
10 #include "services/shell/public/interfaces/interface_provider.mojom.h" 10 #include "services/shell/public/interfaces/interface_provider.mojom.h"
11 11
12 #if defined(ENABLE_MOJO_AUDIO_DECODER) 12 #if defined(ENABLE_MOJO_AUDIO_DECODER)
13 #include "media/mojo/services/mojo_audio_decoder_service.h" 13 #include "media/mojo/services/mojo_audio_decoder_service.h"
14 #endif // defined(ENABLE_MOJO_AUDIO_DECODER) 14 #endif // defined(ENABLE_MOJO_AUDIO_DECODER)
15 15
16 #if defined(ENABLE_MOJO_RENDERER) 16 #if defined(ENABLE_MOJO_RENDERER)
17 #include "media/base/renderer_factory.h" 17 #include "media/base/renderer_factory.h"
18 #include "media/mojo/services/mojo_renderer_service.h" 18 #include "media/mojo/services/mojo_renderer_service.h"
19 #endif // defined(ENABLE_MOJO_RENDERER) 19 #endif // defined(ENABLE_MOJO_RENDERER)
20 20
21 #if defined(ENABLE_MOJO_CDM) 21 #if defined(ENABLE_MOJO_CDM)
22 #include "media/base/cdm_factory.h" 22 #include "media/base/cdm_factory.h"
23 #include "media/mojo/services/mojo_cdm_service.h" 23 #include "media/mojo/services/mojo_cdm_service.h"
24 #endif // defined(ENABLE_MOJO_CDM) 24 #endif // defined(ENABLE_MOJO_CDM)
25 25
26 namespace media { 26 namespace media {
27 27
28 ServiceFactoryImpl::ServiceFactoryImpl( 28 ServiceFactoryImpl::ServiceFactoryImpl(
29 mojo::InterfaceRequest<interfaces::ServiceFactory> request, 29 mojo::InterfaceRequest<interfaces::ServiceFactory> request,
30 mojo::shell::mojom::InterfaceProvider* interfaces, 30 shell::mojom::InterfaceProvider* interfaces,
31 scoped_refptr<MediaLog> media_log, 31 scoped_refptr<MediaLog> media_log,
32 std::unique_ptr<mojo::MessageLoopRef> parent_app_refcount, 32 std::unique_ptr<shell::MessageLoopRef> parent_app_refcount,
33 MojoMediaClient* mojo_media_client) 33 MojoMediaClient* mojo_media_client)
34 : binding_(this, std::move(request)), 34 : binding_(this, std::move(request)),
35 interfaces_(interfaces), 35 interfaces_(interfaces),
36 media_log_(media_log), 36 media_log_(media_log),
37 parent_app_refcount_(std::move(parent_app_refcount)), 37 parent_app_refcount_(std::move(parent_app_refcount)),
38 mojo_media_client_(mojo_media_client) { 38 mojo_media_client_(mojo_media_client) {
39 DVLOG(1) << __FUNCTION__; 39 DVLOG(1) << __FUNCTION__;
40 } 40 }
41 41
42 ServiceFactoryImpl::~ServiceFactoryImpl() { 42 ServiceFactoryImpl::~ServiceFactoryImpl() {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 CdmFactory* ServiceFactoryImpl::GetCdmFactory() { 119 CdmFactory* ServiceFactoryImpl::GetCdmFactory() {
120 if (!cdm_factory_) { 120 if (!cdm_factory_) {
121 cdm_factory_ = mojo_media_client_->CreateCdmFactory(interfaces_); 121 cdm_factory_ = mojo_media_client_->CreateCdmFactory(interfaces_);
122 LOG_IF(ERROR, !cdm_factory_) << "CdmFactory not available."; 122 LOG_IF(ERROR, !cdm_factory_) << "CdmFactory not available.";
123 } 123 }
124 return cdm_factory_.get(); 124 return cdm_factory_.get();
125 } 125 }
126 #endif // defined(ENABLE_MOJO_CDM) 126 #endif // defined(ENABLE_MOJO_CDM)
127 127
128 } // namespace media 128 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/services/service_factory_impl.h ('k') | media/mojo/services/test_mojo_media_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698