Add UMAs to measure Android tab state transition
[chromium-blink-merge.git] / media / cdm / ppapi / supported_cdm_versions.h
blobf27d304f88bf6f135b8e7752008d6e0f77639584
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"
10 namespace media {
12 bool IsSupportedCdmModuleVersion(int version) {
13 switch (version) {
14 // Latest.
15 case CDM_MODULE_VERSION:
16 return true;
17 default:
18 return false;
22 bool IsSupportedCdmInterfaceVersion(int version) {
23 static_assert(cdm::ContentDecryptionModule::kVersion ==
24 cdm::ContentDecryptionModule_8::kVersion,
25 "update the code below");
26 switch(version) {
27 // Supported versions in decreasing order.
28 case cdm::ContentDecryptionModule_8::kVersion:
29 case cdm::ContentDecryptionModule_7::kVersion:
30 return true;
31 default:
32 return false;
36 bool IsSupportedCdmHostVersion(int version) {
37 static_assert(cdm::ContentDecryptionModule::Host::kVersion ==
38 cdm::ContentDecryptionModule_8::Host::kVersion,
39 "update the code below");
40 switch(version) {
41 // Supported versions in decreasing order.
42 case cdm::Host_8::kVersion:
43 case cdm::Host_7::kVersion:
44 return true;
45 default:
46 return false;
50 } // namespace media
52 #endif // MEDIA_CDM_PPAPI_SUPPORTED_CDM_VERSIONS_H_