Index: content/child/webcrypto/openssl/aes_kw_openssl.cc |
diff --git a/content/common/android/surface_texture_lookup.cc b/content/child/webcrypto/openssl/aes_kw_openssl.cc |
similarity index 21% |
copy from content/common/android/surface_texture_lookup.cc |
copy to content/child/webcrypto/openssl/aes_kw_openssl.cc |
index ee6715d3d8de7ab84ae313beba7a9b10f452ce11..d2bb10fc88b8c7468fb37069d13e43db495a23f0 100644 |
--- a/content/common/android/surface_texture_lookup.cc |
+++ b/content/child/webcrypto/openssl/aes_kw_openssl.cc |
@@ -2,26 +2,43 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "content/common/android/surface_texture_lookup.h" |
- |
#include "base/logging.h" |
+#include "content/child/webcrypto/openssl/aes_key_openssl.h" |
+#include "content/child/webcrypto/status.h" |
namespace content { |
+namespace webcrypto { |
+ |
namespace { |
-SurfaceTextureLookup* g_instance = NULL; |
+ |
+class AesKwImplementation : public AesAlgorithm { |
+ public: |
+ AesKwImplementation() : AesAlgorithm("KW") {} |
+ |
+ virtual Status Encrypt(const blink::WebCryptoAlgorithm& algorithm, |
+ const blink::WebCryptoKey& key, |
+ const CryptoData& data, |
+ std::vector<uint8>* buffer) const OVERRIDE { |
+ // TODO(eroman): |
+ return Status::ErrorUnsupported(); |
+ } |
+ |
+ virtual Status Decrypt(const blink::WebCryptoAlgorithm& algorithm, |
+ const blink::WebCryptoKey& key, |
+ const CryptoData& data, |
+ std::vector<uint8>* buffer) const OVERRIDE { |
+ // TODO(eroman): |
+ return Status::ErrorUnsupported(); |
+ } |
+}; |
+ |
} // namespace |
-// static |
-SurfaceTextureLookup* SurfaceTextureLookup::GetInstance() { |
- DCHECK(g_instance); |
- return g_instance; |
+AlgorithmImplementation* CreatePlatformAesKwImplementation() { |
+ return new AesKwImplementation; |
} |
-// static |
-void SurfaceTextureLookup::InitInstance(SurfaceTextureLookup* instance) { |
- DCHECK(!g_instance || !instance); |
- g_instance = instance; |
-} |
+} // namespace webcrypto |
} // namespace content |