| 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 #include "chrome/renderer/media/chrome_key_systems.h" | 5 #include "chrome/renderer/media/chrome_key_systems.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "base/strings/string_split.h" | 14 #include "base/strings/string_split.h" |
| 15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
| 17 #include "chrome/common/render_messages.h" | 17 #include "chrome/common/render_messages.h" |
| 18 #include "components/cdm/renderer/widevine_key_system_properties.h" | 18 #include "components/cdm/renderer/widevine_key_system_properties.h" |
| 19 #include "content/public/renderer/render_thread.h" | 19 #include "content/public/renderer/render_thread.h" |
| 20 #include "media/base/eme_constants.h" | 20 #include "media/base/eme_constants.h" |
| 21 #include "media/base/key_system_properties.h" | 21 #include "media/base/key_system_properties.h" |
| 22 | 22 |
| 23 #if defined(OS_ANDROID) | 23 #if defined(OS_ANDROID) |
| 24 #include "components/cdm/renderer/android_key_systems.h" | 24 #include "components/cdm/renderer/android_key_systems.h" |
| 25 #endif | 25 #endif |
| 26 | 26 |
| 27 #if defined(ENABLE_PEPPER_CDMS) |
| 28 #include "base/feature_list.h" |
| 29 #include "media/base/media_switches.h" |
| 30 #endif |
| 31 |
| 27 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. | 32 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. |
| 28 | 33 |
| 29 // The following must be after widevine_cdm_version.h. | 34 // The following must be after widevine_cdm_version.h. |
| 30 | 35 |
| 31 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_MIN_GLIBC_VERSION) | 36 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_MIN_GLIBC_VERSION) |
| 32 #include <gnu/libc-version.h> | 37 #include <gnu/libc-version.h> |
| 33 #include "base/version.h" | 38 #include "base/version.h" |
| 34 #endif | 39 #endif |
| 35 | 40 |
| 36 using media::KeySystemProperties; | 41 using media::KeySystemProperties; |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 media::EmeFeatureSupport::REQUESTABLE, // Persistent state. | 277 media::EmeFeatureSupport::REQUESTABLE, // Persistent state. |
| 273 media::EmeFeatureSupport::NOT_SUPPORTED)); // Distinctive identifier. | 278 media::EmeFeatureSupport::NOT_SUPPORTED)); // Distinctive identifier. |
| 274 #endif // defined(OS_CHROMEOS) | 279 #endif // defined(OS_CHROMEOS) |
| 275 } | 280 } |
| 276 #endif // defined(WIDEVINE_CDM_AVAILABLE) | 281 #endif // defined(WIDEVINE_CDM_AVAILABLE) |
| 277 #endif // defined(ENABLE_PEPPER_CDMS) | 282 #endif // defined(ENABLE_PEPPER_CDMS) |
| 278 | 283 |
| 279 void AddChromeKeySystems( | 284 void AddChromeKeySystems( |
| 280 std::vector<std::unique_ptr<KeySystemProperties>>* key_systems_properties) { | 285 std::vector<std::unique_ptr<KeySystemProperties>>* key_systems_properties) { |
| 281 #if defined(ENABLE_PEPPER_CDMS) | 286 #if defined(ENABLE_PEPPER_CDMS) |
| 282 AddExternalClearKey(key_systems_properties); | 287 if (base::FeatureList::IsEnabled(media::kExternalClearKeyForTesting)) |
| 288 AddExternalClearKey(key_systems_properties); |
| 283 | 289 |
| 284 #if defined(WIDEVINE_CDM_AVAILABLE) | 290 #if defined(WIDEVINE_CDM_AVAILABLE) |
| 285 AddPepperBasedWidevine(key_systems_properties); | 291 AddPepperBasedWidevine(key_systems_properties); |
| 286 #endif // defined(WIDEVINE_CDM_AVAILABLE) | 292 #endif // defined(WIDEVINE_CDM_AVAILABLE) |
| 287 | 293 |
| 288 #endif // defined(ENABLE_PEPPER_CDMS) | 294 #endif // defined(ENABLE_PEPPER_CDMS) |
| 289 | 295 |
| 290 #if defined(OS_ANDROID) | 296 #if defined(OS_ANDROID) |
| 291 cdm::AddAndroidWidevine(key_systems_properties); | 297 cdm::AddAndroidWidevine(key_systems_properties); |
| 292 #endif // defined(OS_ANDROID) | 298 #endif // defined(OS_ANDROID) |
| 293 } | 299 } |
| OLD | NEW |