diff options
author | jrummell <jrummell@chromium.org> | 2015-11-03 18:06:54 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-04 02:07:37 +0000 |
commit | 8587d27400b78d6b024c86fe970ff699fdf17885 (patch) | |
tree | 3067a59eea8c3033b6ee483469cac12ad3cc4bb2 /media/cdm/supported_cdm_versions.h | |
parent | 7373c7159097ed722420cf7a5d47af48390433fd (diff) | |
download | chromium_src-8587d27400b78d6b024c86fe970ff699fdf17885.zip chromium_src-8587d27400b78d6b024c86fe970ff699fdf17885.tar.gz chromium_src-8587d27400b78d6b024c86fe970ff699fdf17885.tar.bz2 |
Move code out of supported_cdm_versions.h
In the future there will be additional code that use the functions in
supported_cdm_versions.h. To avoid duplicate definitions, move it into
a separate .cc file.
TEST=compiles
Review URL: https://codereview.chromium.org/1430503004
Cr-Commit-Position: refs/heads/master@{#357726}
Diffstat (limited to 'media/cdm/supported_cdm_versions.h')
-rw-r--r-- | media/cdm/supported_cdm_versions.h | 52 |
1 files changed, 14 insertions, 38 deletions
diff --git a/media/cdm/supported_cdm_versions.h b/media/cdm/supported_cdm_versions.h index 6609196..ffd91a5 100644 --- a/media/cdm/supported_cdm_versions.h +++ b/media/cdm/supported_cdm_versions.h @@ -5,48 +5,24 @@ #ifndef MEDIA_CDM_SUPPORTED_CDM_VERSIONS_H_ #define MEDIA_CDM_SUPPORTED_CDM_VERSIONS_H_ -#include "media/cdm/api/content_decryption_module.h" +#ifdef USE_PPAPI_CDM_ADAPTER +// When building the adapter these functions need to be local. +#define FUNCTION_EXPORT +#else +#include "media/base/media_export.h" +#define FUNCTION_EXPORT MEDIA_EXPORT +#endif namespace media { -bool IsSupportedCdmModuleVersion(int version) { - switch (version) { - // Latest. - case CDM_MODULE_VERSION: - return true; - default: - return false; - } -} - -bool IsSupportedCdmInterfaceVersion(int version) { - static_assert(cdm::ContentDecryptionModule::kVersion == - cdm::ContentDecryptionModule_8::kVersion, - "update the code below"); - switch (version) { - // Supported versions in decreasing order. - case cdm::ContentDecryptionModule_8::kVersion: - case cdm::ContentDecryptionModule_7::kVersion: - return true; - default: - return false; - } -} - -bool IsSupportedCdmHostVersion(int version) { - static_assert(cdm::ContentDecryptionModule::Host::kVersion == - cdm::ContentDecryptionModule_8::Host::kVersion, - "update the code below"); - switch (version) { - // Supported versions in decreasing order. - case cdm::Host_8::kVersion: - case cdm::Host_7::kVersion: - return true; - default: - return false; - } -} +FUNCTION_EXPORT bool IsSupportedCdmModuleVersion(int version); + +FUNCTION_EXPORT bool IsSupportedCdmInterfaceVersion(int version); + +FUNCTION_EXPORT bool IsSupportedCdmHostVersion(int version); } // namespace media +#undef FUNCTION_EXPORT + #endif // MEDIA_CDM_SUPPORTED_CDM_VERSIONS_H_ |