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

Unified Diff: media/cdm/default_cdm_factory.cc

Issue 814143004: Encrypted Media: Add DefaultCdmFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cdm/default_cdm_factory.h ('k') | media/cdm/proxy_decryptor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cdm/default_cdm_factory.cc
diff --git a/media/cdm/default_cdm_factory.cc b/media/cdm/default_cdm_factory.cc
new file mode 100644
index 0000000000000000000000000000000000000000..985bdef77f4a59796e64fea397073a592f0c5fd8
--- /dev/null
+++ b/media/cdm/default_cdm_factory.cc
@@ -0,0 +1,34 @@
+// 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/cdm/default_cdm_factory.h"
+
+#include "media/base/key_systems.h"
+#include "media/cdm/aes_decryptor.h"
+
+namespace media {
+
+DefaultCdmFactory::DefaultCdmFactory() {
+}
+
+DefaultCdmFactory::~DefaultCdmFactory() {
+}
+
+scoped_ptr<MediaKeys> DefaultCdmFactory::Create(
+ const std::string& key_system,
+ const GURL& security_origin,
+ const SessionMessageCB& session_message_cb,
+ const SessionClosedCB& session_closed_cb,
+ const SessionErrorCB& session_error_cb,
+ const SessionKeysChangeCB& session_keys_change_cb,
+ const SessionExpirationUpdateCB& session_expiration_update_cb) {
+ if (CanUseAesDecryptor(key_system)) {
+ return make_scoped_ptr(new AesDecryptor(
+ session_message_cb, session_closed_cb, session_keys_change_cb));
+ }
+
+ return nullptr;
+}
+
+} // namespace media
« no previous file with comments | « media/cdm/default_cdm_factory.h ('k') | media/cdm/proxy_decryptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698