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

Unified Diff: content/child/runtime_features.cc

Issue 27230004: Do not run MSE related tests when MSE is not available. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/child/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/runtime_features.cc
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc
index b78445923e324b3b14abcd2098a331df8bbfd064..aebad1cc88855694309f4056fa9421b01d313dd7 100644
--- a/content/child/runtime_features.cc
+++ b/content/child/runtime_features.cc
@@ -10,7 +10,7 @@
#if defined(OS_ANDROID)
#include <cpu-features.h>
-#include "base/android/build_info.h"
+#include "media/base/android/media_codec_bridge.h"
#endif
using WebKit::WebRuntimeFeatures;
@@ -20,9 +20,8 @@ namespace content {
static void SetRuntimeFeatureDefaultsForPlatform() {
#if defined(OS_ANDROID)
#if !defined(GOOGLE_TV)
- // MSE/EME implementation needs Android MediaCodec API that was introduced
- // in JellyBrean.
- if (base::android::BuildInfo::GetInstance()->sdk_int() < 16) {
+ // MSE/EME implementation needs Android MediaCodec API.
+ if (!media::MediaCodecBridge::IsAvailable()) {
WebRuntimeFeatures::enableWebKitMediaSource(false);
WebRuntimeFeatures::enableMediaSource(false);
WebRuntimeFeatures::enablePrefixedEncryptedMedia(false);
@@ -30,10 +29,10 @@ static void SetRuntimeFeatureDefaultsForPlatform() {
#endif // !defined(GOOGLE_TV)
bool enable_webaudio = false;
#if defined(ARCH_CPU_ARMEL)
- // WebAudio needs Android MediaCodec API that was introduced in
- // JellyBean, and also currently needs NEON support for the FFT.
+ // WebAudio needs Android MediaCodec API, and also currently needs NEON
+ // support for the FFT.
enable_webaudio =
- (base::android::BuildInfo::GetInstance()->sdk_int() >= 16) &&
+ (media::MediaCodecBridge::IsAvailable()) &&
((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0);
#endif // defined(ARCH_CPU_ARMEL)
WebRuntimeFeatures::enableWebAudio(enable_webaudio);
« no previous file with comments | « content/child/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698