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

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

Issue 2815303006: Convert MediaLog from being ref counted to owned by WebMediaPlayer. (Closed)
Patch Set: Rebase. Created 3 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 | « media/mojo/services/interface_factory_impl.h ('k') | media/mojo/services/media_service.h » ('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 #include "media/mojo/services/interface_factory_impl.h" 5 #include "media/mojo/services/interface_factory_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "media/base/media_log.h" 10 #include "media/base/media_log.h"
(...skipping 19 matching lines...) Expand all
30 30
31 #if defined(ENABLE_MOJO_CDM) 31 #if defined(ENABLE_MOJO_CDM)
32 #include "media/base/cdm_factory.h" 32 #include "media/base/cdm_factory.h"
33 #include "media/mojo/services/mojo_cdm_service.h" 33 #include "media/mojo/services/mojo_cdm_service.h"
34 #endif // defined(ENABLE_MOJO_CDM) 34 #endif // defined(ENABLE_MOJO_CDM)
35 35
36 namespace media { 36 namespace media {
37 37
38 InterfaceFactoryImpl::InterfaceFactoryImpl( 38 InterfaceFactoryImpl::InterfaceFactoryImpl(
39 service_manager::mojom::InterfaceProviderPtr interfaces, 39 service_manager::mojom::InterfaceProviderPtr interfaces,
40 scoped_refptr<MediaLog> media_log, 40 MediaLog* media_log,
41 std::unique_ptr<service_manager::ServiceContextRef> connection_ref, 41 std::unique_ptr<service_manager::ServiceContextRef> connection_ref,
42 MojoMediaClient* mojo_media_client) 42 MojoMediaClient* mojo_media_client)
43 : 43 :
44 #if defined(ENABLE_MOJO_RENDERER)
45 media_log_(media_log),
46 #endif
44 #if defined(ENABLE_MOJO_CDM) 47 #if defined(ENABLE_MOJO_CDM)
45 interfaces_(std::move(interfaces)), 48 interfaces_(std::move(interfaces)),
46 #endif 49 #endif
47 media_log_(media_log),
48 connection_ref_(std::move(connection_ref)), 50 connection_ref_(std::move(connection_ref)),
49 mojo_media_client_(mojo_media_client) { 51 mojo_media_client_(mojo_media_client) {
50 DVLOG(1) << __func__; 52 DVLOG(1) << __func__;
51 DCHECK(mojo_media_client_); 53 DCHECK(mojo_media_client_);
52 } 54 }
53 55
54 InterfaceFactoryImpl::~InterfaceFactoryImpl() { 56 InterfaceFactoryImpl::~InterfaceFactoryImpl() {
55 DVLOG(1) << __func__; 57 DVLOG(1) << __func__;
56 } 58 }
57 59
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 CdmFactory* InterfaceFactoryImpl::GetCdmFactory() { 156 CdmFactory* InterfaceFactoryImpl::GetCdmFactory() {
155 if (!cdm_factory_) { 157 if (!cdm_factory_) {
156 cdm_factory_ = mojo_media_client_->CreateCdmFactory(interfaces_.get()); 158 cdm_factory_ = mojo_media_client_->CreateCdmFactory(interfaces_.get());
157 LOG_IF(ERROR, !cdm_factory_) << "CdmFactory not available."; 159 LOG_IF(ERROR, !cdm_factory_) << "CdmFactory not available.";
158 } 160 }
159 return cdm_factory_.get(); 161 return cdm_factory_.get();
160 } 162 }
161 #endif // defined(ENABLE_MOJO_CDM) 163 #endif // defined(ENABLE_MOJO_CDM)
162 164
163 } // namespace media 165 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/services/interface_factory_impl.h ('k') | media/mojo/services/media_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698