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
3 // found in the LICENSE file.
5 #ifndef MEDIA_CDM_PPAPI_SUPPORTED_CDM_VERSIONS_H_
6 #define MEDIA_CDM_PPAPI_SUPPORTED_CDM_VERSIONS_H_
8 #include "media/cdm/ppapi/api/content_decryption_module.h"
12 // TODO(ddorwin): Move to content_decryption_module.h.
13 #define CDM_MODULE_VERSION 4
15 bool IsSupportedCdmModuleVersion(int version) {
18 case CDM_MODULE_VERSION:
25 bool IsSupportedCdmInterfaceVersion(int version) {
26 COMPILE_ASSERT(cdm::ContentDecryptionModule::kVersion ==
27 cdm::ContentDecryptionModule_2::kVersion,
31 case cdm::ContentDecryptionModule::kVersion:
32 // Older supported versions.
33 case cdm::ContentDecryptionModule_1::kVersion:
40 bool IsSupportedCdmHostVersion(int version) {
41 COMPILE_ASSERT(cdm::ContentDecryptionModule::Host::kVersion ==
42 cdm::ContentDecryptionModule_2::Host::kVersion,
45 // Supported versions in increasing order (there is no default).
46 case cdm::Host_1::kVersion:
47 case cdm::Host_2::kVersion:
56 #endif // MEDIA_CDM_PPAPI_SUPPORTED_CDM_VERSIONS_H_