Chromium Code Reviews| Index: media/base/content_decryption_module.h |
| diff --git a/media/base/media_keys.h b/media/base/content_decryption_module.h |
| similarity index 87% |
| rename from media/base/media_keys.h |
| rename to media/base/content_decryption_module.h |
| index 1b0303c2d25e11fa7378992cc19d78570b93845b..8923ef9a872a8bebd4c197a9d99efff3db26a728 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; |
| @@ -60,11 +60,12 @@ typedef ScopedVector<CdmKeyInformation> CdmKeysInfo; |
| // 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 |
| +// TODO(xhwang): Rename ContentDecryptionModule to ContentDecryptionModule. See |
| // http://crbug.com/309237 |
|
jrummell
2016/12/12 22:08:40
nit: You can remove this comment now :)
xhwang
2016/12/12 22:32:50
Done.
|
| -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 +152,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 +172,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 +186,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 +197,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_ |