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

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: Fixed nits and rebased. 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
« no previous file with comments | « webkit/media/crypto/key_systems.h ('k') | webkit/media/crypto/proxy_decryptor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/crypto/key_systems.cc
diff --git a/webkit/media/key_systems.cc b/webkit/media/crypto/key_systems.cc
similarity index 84%
rename from webkit/media/key_systems.cc
rename to webkit/media/crypto/key_systems.cc
index 7efbb9ef9ff073340b4b6f028d2dd8f521507875..b4aeb90b56ce84bb11f981889a09abd04ea78a84 100644
--- a/webkit/media/key_systems.cc
+++ b/webkit/media/crypto/key_systems.cc
@@ -2,8 +2,10 @@
// 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/crypto/aes_decryptor.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
namespace webkit_media {
@@ -75,4 +77,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
« no previous file with comments | « webkit/media/crypto/key_systems.h ('k') | webkit/media/crypto/proxy_decryptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698