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

Unified 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, 7 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/mojo_cdm_factory_service.cc
diff --git a/media/mojo/services/mojo_cdm_factory_service.cc b/media/mojo/services/mojo_cdm_factory_service.cc
new file mode 100644
index 0000000000000000000000000000000000000000..9d8224133b5abeb8604081018f668690d58705fc
--- /dev/null
+++ b/media/mojo/services/mojo_cdm_factory_service.cc
@@ -0,0 +1,38 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "media/mojo/services/mojo_cdm_factory_service.h"
+
+#include "base/logging.h"
+#include "media/mojo/services/mojo_cdm_service_context.h"
+
+namespace media {
+
+MojoCdmFactoryService::MojoCdmFactoryService(
+ MojoCdmServiceContext* context,
+ mojo::InterfaceRequest<mojo::ContentDecryptionModuleFactory> request)
+ : binding_(this, request.Pass()), context_(context) {
+ DCHECK(context_);
+}
+
+MojoCdmFactoryService::~MojoCdmFactoryService() {
+}
+
+void MojoCdmFactoryService::Create(
+ const mojo::String& key_system,
+ const mojo::String& security_origin,
+ int32_t cdm_id,
+ mojo::InterfaceRequest<mojo::ContentDecryptionModule> request) {
+ DVLOG(1) << __FUNCTION__ << ": " << key_system;
+ // TODO(xhwang): Drop the return value.
+ MojoCdmService* cdm_service =
+ context_->Create(key_system, security_origin, cdm_id, request.Pass());
+
+ if (!cdm_service) {
+ LOG(ERROR) << "MojoCdmService cannot be created.";
+ return;
+ }
+}
+
+} // namespace media
« 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