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

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

Issue 1541943002: Delete media::Interfaces::ServiceFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add service bundle Created 5 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/mojo_cdm_service.h ('k') | media/mojo/services/mojo_media_application.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/mojo_cdm_service.h" 5 #include "media/mojo/services/mojo_cdm_service.h"
6 6
7 #include <map> 7 #include <map>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 using NewSessionMojoCdmPromise = MojoCdmPromise<std::string>; 69 using NewSessionMojoCdmPromise = MojoCdmPromise<std::string>;
70 70
71 int MojoCdmService::next_cdm_id_ = CdmContext::kInvalidCdmId + 1; 71 int MojoCdmService::next_cdm_id_ = CdmContext::kInvalidCdmId + 1;
72 72
73 // static 73 // static
74 scoped_refptr<MediaKeys> MojoCdmService::GetCdm(int cdm_id) { 74 scoped_refptr<MediaKeys> MojoCdmService::GetCdm(int cdm_id) {
75 DVLOG(1) << __FUNCTION__ << ": " << cdm_id; 75 DVLOG(1) << __FUNCTION__ << ": " << cdm_id;
76 return g_cdm_manager.Get().GetCdm(cdm_id); 76 return g_cdm_manager.Get().GetCdm(cdm_id);
77 } 77 }
78 78
79 MojoCdmService::MojoCdmService( 79 MojoCdmService::MojoCdmService(base::WeakPtr<MojoCdmServiceContext> context,
80 base::WeakPtr<MojoCdmServiceContext> context, 80 CdmFactory* cdm_factory)
81 mojo::ServiceProvider* service_provider, 81 : context_(context),
82 CdmFactory* cdm_factory,
83 mojo::InterfaceRequest<interfaces::ContentDecryptionModule> request)
84 : binding_(this, request.Pass()),
85 context_(context),
86 service_provider_(service_provider),
87 cdm_factory_(cdm_factory), 82 cdm_factory_(cdm_factory),
88 cdm_id_(CdmContext::kInvalidCdmId), 83 cdm_id_(CdmContext::kInvalidCdmId),
89 weak_factory_(this) { 84 weak_factory_(this) {
90 DCHECK(context_); 85 DCHECK(context_);
91 DCHECK(cdm_factory_); 86 DCHECK(cdm_factory_);
92 } 87 }
93 88
94 MojoCdmService::~MojoCdmService() { 89 MojoCdmService::~MojoCdmService() {
95 g_cdm_manager.Get().UnregisterCdm(cdm_id_); 90 g_cdm_manager.Get().UnregisterCdm(cdm_id_);
96 91
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 269
275 void MojoCdmService::OnDecryptorConnectionError() { 270 void MojoCdmService::OnDecryptorConnectionError() {
276 DVLOG(2) << __FUNCTION__; 271 DVLOG(2) << __FUNCTION__;
277 272
278 // MojoDecryptorService has lost connectivity to it's client, so it can be 273 // MojoDecryptorService has lost connectivity to it's client, so it can be
279 // freed. 274 // freed.
280 decryptor_.reset(); 275 decryptor_.reset();
281 } 276 }
282 277
283 } // namespace media 278 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/services/mojo_cdm_service.h ('k') | media/mojo/services/mojo_media_application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698