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

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

Issue 840473002: media: Support creation and SetCdm() for mojo based CDM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only; compiles but needs more polish... Created 5 years, 6 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/mojo_cdm_factory_service.h ('k') | media/mojo/services/mojo_cdm_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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "media/mojo/services/mojo_cdm_factory_service.h"
6
7 #include "base/logging.h"
8 #include "media/mojo/services/mojo_cdm_service_context.h"
9
10 namespace media {
11
12 MojoCdmFactoryService::MojoCdmFactoryService(
13 MojoCdmServiceContext* context,
14 mojo::InterfaceRequest<mojo::ContentDecryptionModuleFactory> request)
15 : binding_(this, request.Pass()), context_(context) {
16 DCHECK(context_);
17 }
18
19 MojoCdmFactoryService::~MojoCdmFactoryService() {
20 }
21
22 void MojoCdmFactoryService::Create(
23 const mojo::String& key_system,
24 const mojo::String& security_origin,
25 int32_t cdm_id,
26 mojo::InterfaceRequest<mojo::ContentDecryptionModule> request) {
27 DVLOG(1) << __FUNCTION__ << ": " << key_system;
28 // TODO(xhwang): Drop the return value.
29 MojoCdmService* cdm_service =
30 context_->Create(key_system, security_origin, cdm_id, request.Pass());
31
32 if (!cdm_service) {
33 LOG(ERROR) << "MojoCdmService cannot be created.";
34 return;
35 }
36 }
37
38 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/services/mojo_cdm_factory_service.h ('k') | media/mojo/services/mojo_cdm_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698