Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: chrome/renderer/media/chrome_key_systems.cc

Issue 2412493003: Revert of Move ENABLE_PEPPER_CDMS to a buildflag header. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/renderer/BUILD.gn ('k') | chrome/renderer/pepper/pepper_uma_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/external_clear_key_key_system_properties.h" 18 #include "components/cdm/renderer/external_clear_key_key_system_properties.h"
19 #include "components/cdm/renderer/widevine_key_system_properties.h" 19 #include "components/cdm/renderer/widevine_key_system_properties.h"
20 #include "content/public/renderer/render_thread.h" 20 #include "content/public/renderer/render_thread.h"
21 #include "media/base/eme_constants.h" 21 #include "media/base/eme_constants.h"
22 #include "media/base/key_system_properties.h" 22 #include "media/base/key_system_properties.h"
23 #include "ppapi/features/features.h"
24 23
25 #if defined(OS_ANDROID) 24 #if defined(OS_ANDROID)
26 #include "components/cdm/renderer/android_key_systems.h" 25 #include "components/cdm/renderer/android_key_systems.h"
27 #endif 26 #endif
28 27
29 #if BUILDFLAG(ENABLE_PEPPER_CDMS) 28 #if defined(ENABLE_PEPPER_CDMS)
30 #include "base/feature_list.h" 29 #include "base/feature_list.h"
31 #include "media/base/media_switches.h" 30 #include "media/base/media_switches.h"
32 #endif 31 #endif
33 32
34 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. 33 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
35 34
36 // The following must be after widevine_cdm_version.h. 35 // The following must be after widevine_cdm_version.h.
37 36
38 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_MIN_GLIBC_VERSION) 37 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_MIN_GLIBC_VERSION)
39 #include <gnu/libc-version.h> 38 #include <gnu/libc-version.h>
40 #include "base/version.h" 39 #include "base/version.h"
41 #endif 40 #endif
42 41
43 using media::KeySystemProperties; 42 using media::KeySystemProperties;
44 using media::SupportedCodecs; 43 using media::SupportedCodecs;
45 44
46 #if BUILDFLAG(ENABLE_PEPPER_CDMS) 45 #if defined(ENABLE_PEPPER_CDMS)
47 static bool IsPepperCdmAvailable( 46 static bool IsPepperCdmAvailable(
48 const std::string& pepper_type, 47 const std::string& pepper_type,
49 std::vector<base::string16>* additional_param_names, 48 std::vector<base::string16>* additional_param_names,
50 std::vector<base::string16>* additional_param_values) { 49 std::vector<base::string16>* additional_param_values) {
51 bool is_available = false; 50 bool is_available = false;
52 content::RenderThread::Get()->Send( 51 content::RenderThread::Get()->Send(
53 new ChromeViewHostMsg_IsInternalPluginAvailableForMimeType( 52 new ChromeViewHostMsg_IsInternalPluginAvailableForMimeType(
54 pepper_type, 53 pepper_type,
55 &is_available, 54 &is_available,
56 additional_param_names, 55 additional_param_names,
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 Robustness::SW_SECURE_CRYPTO, // Maximum audio robustness. 206 Robustness::SW_SECURE_CRYPTO, // Maximum audio robustness.
208 Robustness::SW_SECURE_DECODE, // Maximum video robustness. 207 Robustness::SW_SECURE_DECODE, // Maximum video robustness.
209 media::EmeSessionTypeSupport::NOT_SUPPORTED, // persistent-license. 208 media::EmeSessionTypeSupport::NOT_SUPPORTED, // persistent-license.
210 media::EmeSessionTypeSupport:: 209 media::EmeSessionTypeSupport::
211 NOT_SUPPORTED, // persistent-release-message. 210 NOT_SUPPORTED, // persistent-release-message.
212 media::EmeFeatureSupport::REQUESTABLE, // Persistent state. 211 media::EmeFeatureSupport::REQUESTABLE, // Persistent state.
213 media::EmeFeatureSupport::NOT_SUPPORTED)); // Distinctive identifier. 212 media::EmeFeatureSupport::NOT_SUPPORTED)); // Distinctive identifier.
214 #endif // defined(OS_CHROMEOS) 213 #endif // defined(OS_CHROMEOS)
215 } 214 }
216 #endif // defined(WIDEVINE_CDM_AVAILABLE) 215 #endif // defined(WIDEVINE_CDM_AVAILABLE)
217 #endif // BUILDFLAG(ENABLE_PEPPER_CDMS) 216 #endif // defined(ENABLE_PEPPER_CDMS)
218 217
219 void AddChromeKeySystems( 218 void AddChromeKeySystems(
220 std::vector<std::unique_ptr<KeySystemProperties>>* key_systems_properties) { 219 std::vector<std::unique_ptr<KeySystemProperties>>* key_systems_properties) {
221 #if BUILDFLAG(ENABLE_PEPPER_CDMS) 220 #if defined(ENABLE_PEPPER_CDMS)
222 if (base::FeatureList::IsEnabled(media::kExternalClearKeyForTesting)) 221 if (base::FeatureList::IsEnabled(media::kExternalClearKeyForTesting))
223 AddExternalClearKey(key_systems_properties); 222 AddExternalClearKey(key_systems_properties);
224 223
225 #if defined(WIDEVINE_CDM_AVAILABLE) 224 #if defined(WIDEVINE_CDM_AVAILABLE)
226 AddPepperBasedWidevine(key_systems_properties); 225 AddPepperBasedWidevine(key_systems_properties);
227 #endif // defined(WIDEVINE_CDM_AVAILABLE) 226 #endif // defined(WIDEVINE_CDM_AVAILABLE)
228 227
229 #endif // BUILDFLAG(ENABLE_PEPPER_CDMS) 228 #endif // defined(ENABLE_PEPPER_CDMS)
230 229
231 #if defined(OS_ANDROID) 230 #if defined(OS_ANDROID)
232 cdm::AddAndroidWidevine(key_systems_properties); 231 cdm::AddAndroidWidevine(key_systems_properties);
233 #endif // defined(OS_ANDROID) 232 #endif // defined(OS_ANDROID)
234 } 233 }
OLDNEW
« no previous file with comments | « chrome/renderer/BUILD.gn ('k') | chrome/renderer/pepper/pepper_uma_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698