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

Unified Diff: webkit/media/crypto/key_systems.cc

Issue 10575026: Add ProxyDecryptor which wraps concrete Decryptor implementations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add CreateDecryptor in key_system.* Created 8 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 side-by-side diff with in-line comments
Download patch
Index: webkit/media/crypto/key_systems.cc
diff --git a/webkit/media/key_systems.cc b/webkit/media/crypto/key_systems.cc
similarity index 83%
rename from webkit/media/key_systems.cc
rename to webkit/media/crypto/key_systems.cc
index 7efbb9ef9ff073340b4b6f028d2dd8f521507875..d0a1b791868e7a64e72577dc52c567e8df0e9c6e 100644
--- a/webkit/media/key_systems.cc
+++ b/webkit/media/crypto/key_systems.cc
@@ -2,8 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/media/key_systems.h"
+#include "webkit/media/crypto/key_systems.h"
+#include "media/base/decryptor.h"
+#include "media/base/decryptor_client.h"
ddorwin 2012/06/28 22:15:38 Is this one necessary?
xhwang 2012/06/28 23:31:42 Removed.
+#include "media/crypto/aes_decryptor.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
namespace webkit_media {
@@ -75,4 +78,11 @@ bool IsSupportedKeySystemWithMediaMimeType(
return true;
}
+scoped_ptr<media::Decryptor> CreateDecryptor(const std::string& key_system,
+ media::DecryptorClient* client) {
+ if (key_system == kClearKeyKeySystem)
+ return scoped_ptr<media::Decryptor>(new media::AesDecryptor(client));
+ return scoped_ptr<media::Decryptor>();
+}
+
} // namespace webkit_media

Powered by Google App Engine
This is Rietveld 408576698