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

Unified Diff: media/base/content_decryption_module.h

Issue 2568463003: media: Rename MediaKeys to ContentDecryptionModule (Closed)
Patch Set: comments addressed Created 4 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
« no previous file with comments | « media/base/cdm_session_tracker.h ('k') | media/base/content_decryption_module.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/content_decryption_module.h
diff --git a/media/base/media_keys.h b/media/base/content_decryption_module.h
similarity index 88%
rename from media/base/media_keys.h
rename to media/base/content_decryption_module.h
index 1b0303c2d25e11fa7378992cc19d78570b93845b..e8af761dcf9efdd51a6f378a9f2bcc0317b94926 100644
--- a/media/base/media_keys.h
+++ b/media/base/content_decryption_module.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef MEDIA_BASE_MEDIA_KEYS_H_
-#define MEDIA_BASE_MEDIA_KEYS_H_
+#ifndef MEDIA_BASE_CONTENT_DECRYPTION_MODULE_H_
+#define MEDIA_BASE_CONTENT_DECRYPTION_MODULE_H_
#include <stdint.h>
@@ -27,7 +27,7 @@ namespace media {
class CdmContext;
struct CdmKeyInformation;
-struct MediaKeysTraits;
+struct ContentDecryptionModuleTraits;
template <typename... T>
class CdmPromiseTemplate;
@@ -59,12 +59,10 @@ typedef ScopedVector<CdmKeyInformation> CdmKeysInfo;
// that thread. For example, if the CDM supports a Decryptor interface, the
// Decryptor methods could be called on a different thread. The CDM
// implementation should make sure it's thread safe for these situations.
-//
-// TODO(xhwang): Rename MediaKeys to ContentDecryptionModule. See
-// http://crbug.com/309237
-class MEDIA_EXPORT MediaKeys
- : public base::RefCountedThreadSafe<MediaKeys, MediaKeysTraits> {
+class MEDIA_EXPORT ContentDecryptionModule
+ : public base::RefCountedThreadSafe<ContentDecryptionModule,
+ ContentDecryptionModuleTraits> {
public:
// Type of license required when creating/loading a session.
// Must be consistent with the values specified in the spec:
@@ -151,18 +149,19 @@ class MEDIA_EXPORT MediaKeys
virtual void DeleteOnCorrectThread() const;
protected:
- friend class base::RefCountedThreadSafe<MediaKeys, MediaKeysTraits>;
+ friend class base::RefCountedThreadSafe<ContentDecryptionModule,
+ ContentDecryptionModuleTraits>;
- MediaKeys();
- virtual ~MediaKeys();
+ ContentDecryptionModule();
+ virtual ~ContentDecryptionModule();
private:
- DISALLOW_COPY_AND_ASSIGN(MediaKeys);
+ DISALLOW_COPY_AND_ASSIGN(ContentDecryptionModule);
};
-struct MEDIA_EXPORT MediaKeysTraits {
- // Destroys |media_keys| on the correct thread.
- static void Destruct(const MediaKeys* media_keys);
+struct MEDIA_EXPORT ContentDecryptionModuleTraits {
+ // Destroys |cdm| on the correct thread.
+ static void Destruct(const ContentDecryptionModule* cdm);
};
// CDM session event callbacks.
@@ -170,7 +169,7 @@ struct MEDIA_EXPORT MediaKeysTraits {
// Called when the CDM needs to queue a message event to the session object.
// See http://w3c.github.io/encrypted-media/#dom-evt-message
typedef base::Callback<void(const std::string& session_id,
- MediaKeys::MessageType message_type,
+ ContentDecryptionModule::MessageType message_type,
const std::vector<uint8_t>& message)>
SessionMessageCB;
@@ -184,7 +183,8 @@ typedef base::Callback<void(const std::string& session_id)> SessionClosedCB;
// status. See http://w3c.github.io/encrypted-media/#dom-evt-keystatuseschange
typedef base::Callback<void(const std::string& session_id,
bool has_additional_usable_key,
- CdmKeysInfo keys_info)> SessionKeysChangeCB;
+ CdmKeysInfo keys_info)>
+ SessionKeysChangeCB;
// Called when the CDM changes the expiration time of a session.
// See http://w3c.github.io/encrypted-media/#update-expiration
@@ -194,4 +194,4 @@ typedef base::Callback<void(const std::string& session_id,
} // namespace media
-#endif // MEDIA_BASE_MEDIA_KEYS_H_
+#endif // MEDIA_BASE_CONTENT_DECRYPTION_MODULE_H_
« no previous file with comments | « media/base/cdm_session_tracker.h ('k') | media/base/content_decryption_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698