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

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: 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
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..7921c9b2a6d68c2078482b7e897b6dbab56464ee
--- /dev/null
+++ b/media/cdm/default_cdm_factory.cc
@@ -0,0 +1,35 @@
+// 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 SessionReadyCB& session_ready_cb,
ddorwin 2014/12/19 18:16:56 You or John will have to deal with a conflict on t
xhwang 2014/12/19 19:18:30 Acknowledged.
+ 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

Powered by Google App Engine
This is Rietveld 408576698