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

Unified Diff: chromecast/media/base/decrypt_context_impl.h

Issue 1257013003: Load CMA backend from shared library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 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: chromecast/media/base/decrypt_context_impl.h
diff --git a/chromecast/media/base/decrypt_context.h b/chromecast/media/base/decrypt_context_impl.h
similarity index 58%
rename from chromecast/media/base/decrypt_context.h
rename to chromecast/media/base/decrypt_context_impl.h
index 5d053c0cafadcb78f48e00c05be28768586b3e72..c2a5b96213256fd323aa16dcee2f04cca7e885df 100644
--- a/chromecast/media/base/decrypt_context.h
+++ b/chromecast/media/base/decrypt_context_impl.h
@@ -2,12 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROMECAST_MEDIA_BASE_DECRYPT_CONTEXT_H_
-#define CHROMECAST_MEDIA_BASE_DECRYPT_CONTEXT_H_
+#ifndef CHROMECAST_MEDIA_BASE_DECRYPT_CONTEXT_IMPL_H_
+#define CHROMECAST_MEDIA_BASE_DECRYPT_CONTEXT_IMPL_H_
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "chromecast/media/base/key_systems_common.h"
+#include "chromecast/public/media/decrypt_context.h"
namespace crypto {
class SymmetricKey;
@@ -21,26 +22,26 @@ namespace media {
// Each CDM should implement this and add fields needed to fully describe a
// decryption context.
//
-class DecryptContext : public base::RefCountedThreadSafe<DecryptContext> {
+class DecryptContextImpl : public DecryptContext {
public:
- explicit DecryptContext(CastKeySystem key_system);
+ explicit DecryptContextImpl(CastKeySystem key_system);
+ ~DecryptContextImpl() override;
- CastKeySystem key_system() const { return key_system_; }
+ // DecryptContext implementation:
+ CastKeySystem GetKeySystem() override;
+ bool Decrypt(CastDecoderBuffer* buffer,
+ std::vector<uint8_t>* output) override;
// Returns the clear key if available, NULL otherwise.
virtual crypto::SymmetricKey* GetKey() const;
- protected:
- friend class base::RefCountedThreadSafe<DecryptContext>;
- virtual ~DecryptContext();
-
private:
CastKeySystem key_system_;
- DISALLOW_COPY_AND_ASSIGN(DecryptContext);
+ DISALLOW_COPY_AND_ASSIGN(DecryptContextImpl);
};
} // namespace media
} // namespace chromecast
-#endif // CHROMECAST_MEDIA_BASE_DECRYPT_CONTEXT_H_
+#endif // CHROMECAST_MEDIA_BASE_DECRYPT_CONTEXT_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698