| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_BASE_KEY_SYSTEMS_H_ | 5 #ifndef MEDIA_BASE_KEY_SYSTEMS_H_ |
| 6 #define MEDIA_BASE_KEY_SYSTEMS_H_ | 6 #define MEDIA_BASE_KEY_SYSTEMS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 // TODO(ddorwin): WebContentDecryptionModuleSessionImpl::initializeNewSession() | 73 // TODO(ddorwin): WebContentDecryptionModuleSessionImpl::initializeNewSession() |
| 74 // is violating this rule! https://crbug.com/249976. | 74 // is violating this rule! https://crbug.com/249976. |
| 75 // Use for prefixed EME only! | 75 // Use for prefixed EME only! |
| 76 MEDIA_EXPORT bool IsSupportedKeySystemWithInitDataType( | 76 MEDIA_EXPORT bool IsSupportedKeySystemWithInitDataType( |
| 77 const std::string& key_system, | 77 const std::string& key_system, |
| 78 EmeInitDataType init_data_type); | 78 EmeInitDataType init_data_type); |
| 79 | 79 |
| 80 // Returns a name for |key_system| suitable to UMA logging. | 80 // Returns a name for |key_system| suitable to UMA logging. |
| 81 MEDIA_EXPORT std::string GetKeySystemNameForUMA(const std::string& key_system); | 81 MEDIA_EXPORT std::string GetKeySystemNameForUMA(const std::string& key_system); |
| 82 | 82 |
| 83 // Returns whether AesDecryptor can be used for the given |concrete_key_system|. | 83 // Returns whether AesDecryptor can be used for the given |key_system|. |
| 84 MEDIA_EXPORT bool CanUseAesDecryptor(const std::string& concrete_key_system); | 84 MEDIA_EXPORT bool CanUseAesDecryptor(const std::string& key_system); |
| 85 | 85 |
| 86 #if defined(ENABLE_PEPPER_CDMS) | 86 #if defined(ENABLE_PEPPER_CDMS) |
| 87 // Returns the Pepper MIME type for |concrete_key_system|. | 87 // Returns the Pepper MIME type for |key_system|. |
| 88 // Returns empty string if |concrete_key_system| is unknown or not Pepper-based. | 88 // Returns empty string if |key_system| is unknown or not Pepper-based. |
| 89 MEDIA_EXPORT std::string GetPepperType( | 89 MEDIA_EXPORT std::string GetPepperType(const std::string& key_system); |
| 90 const std::string& concrete_key_system); | |
| 91 #endif | 90 #endif |
| 92 | 91 |
| 93 #if defined(UNIT_TEST) | 92 #if defined(UNIT_TEST) |
| 94 // Helper functions to add container/codec types for testing purposes. | 93 // Helper functions to add container/codec types for testing purposes. |
| 95 // Call AddCodecMask() first to ensure the mask values passed to | 94 // Call AddCodecMask() first to ensure the mask values passed to |
| 96 // AddMimeTypeCodecMask() already exist. | 95 // AddMimeTypeCodecMask() already exist. |
| 97 MEDIA_EXPORT void AddCodecMask(EmeMediaType media_type, | 96 MEDIA_EXPORT void AddCodecMask(EmeMediaType media_type, |
| 98 const std::string& codec, | 97 const std::string& codec, |
| 99 uint32_t mask); | 98 uint32_t mask); |
| 100 MEDIA_EXPORT void AddMimeTypeCodecMask(const std::string& mime_type, | 99 MEDIA_EXPORT void AddMimeTypeCodecMask(const std::string& mime_type, |
| 101 uint32_t mask); | 100 uint32_t mask); |
| 102 #endif // defined(UNIT_TEST) | 101 #endif // defined(UNIT_TEST) |
| 103 | 102 |
| 104 } // namespace media | 103 } // namespace media |
| 105 | 104 |
| 106 #endif // MEDIA_BASE_KEY_SYSTEMS_H_ | 105 #endif // MEDIA_BASE_KEY_SYSTEMS_H_ |
| OLD | NEW |