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

Unified Diff: content/child/runtime_features.cc

Issue 208763003: Enable WebAudio by default for Android/x86. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/browser/renderer_host/render_view_host_impl.cc ('k') | content/public/common/content_switches.h » ('j') | 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 d54146a9bc3975ddcc6def8e2d539834517558f5..3706604a12a898c24878cc1b2be81f0392b1ffcc 100644
--- a/content/child/runtime_features.cc
+++ b/content/child/runtime_features.cc
@@ -27,11 +27,12 @@ static void SetRuntimeFeatureDefaultsForPlatform() {
WebRuntimeFeatures::enableMediaSource(false);
WebRuntimeFeatures::enablePrefixedEncryptedMedia(false);
}
- // WebAudio is enabled by default only on ARM and only when the
+ // WebAudio is enabled by default on ARM and X86 and only when the
// MediaCodec API is available.
WebRuntimeFeatures::enableWebAudio(
media::MediaCodecBridge::IsAvailable() &&
- (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM));
+ ((android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM) ||
+ (android_getCpuFamily() == ANDROID_CPU_FAMILY_X86)));
// Android does not support the Gamepad API.
WebRuntimeFeatures::enableGamepad(false);
// Android does not have support for PagePopup
@@ -97,21 +98,12 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
WebRuntimeFeatures::enableServiceWorker(true);
#if defined(OS_ANDROID)
- // WebAudio requires the MediaCodec API.
-#if defined(ARCH_CPU_X86)
- // WebAudio is disabled by default on x86.
- WebRuntimeFeatures::enableWebAudio(
- command_line.HasSwitch(switches::kEnableWebAudio) &&
- media::MediaCodecBridge::IsAvailable());
-#elif defined(ARCH_CPU_ARMEL)
- // WebAudio is enabled by default on ARM.
+ // WebAudio is enabled by default on ARM and X86, if the MediaCodec
+ // API is available.
WebRuntimeFeatures::enableWebAudio(
!command_line.HasSwitch(switches::kDisableWebAudio) &&
media::MediaCodecBridge::IsAvailable());
#else
- WebRuntimeFeatures::enableWebAudio(false);
-#endif
-#else
if (command_line.HasSwitch(switches::kDisableWebAudio))
WebRuntimeFeatures::enableWebAudio(false);
#endif
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698