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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/child/DEPS ('k') | no next file » | 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 "content/child/runtime_features.h" 5 #include "content/child/runtime_features.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "content/public/common/content_switches.h" 8 #include "content/public/common/content_switches.h"
9 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" 9 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
10 10
11 #if defined(OS_ANDROID) 11 #if defined(OS_ANDROID)
12 #include <cpu-features.h> 12 #include <cpu-features.h>
13 #include "base/android/build_info.h" 13 #include "media/base/android/media_codec_bridge.h"
14 #endif 14 #endif
15 15
16 using WebKit::WebRuntimeFeatures; 16 using WebKit::WebRuntimeFeatures;
17 17
18 namespace content { 18 namespace content {
19 19
20 static void SetRuntimeFeatureDefaultsForPlatform() { 20 static void SetRuntimeFeatureDefaultsForPlatform() {
21 #if defined(OS_ANDROID) 21 #if defined(OS_ANDROID)
22 #if !defined(GOOGLE_TV) 22 #if !defined(GOOGLE_TV)
23 // MSE/EME implementation needs Android MediaCodec API that was introduced 23 // MSE/EME implementation needs Android MediaCodec API.
24 // in JellyBrean. 24 if (!media::MediaCodecBridge::IsAvailable()) {
25 if (base::android::BuildInfo::GetInstance()->sdk_int() < 16) {
26 WebRuntimeFeatures::enableWebKitMediaSource(false); 25 WebRuntimeFeatures::enableWebKitMediaSource(false);
27 WebRuntimeFeatures::enableMediaSource(false); 26 WebRuntimeFeatures::enableMediaSource(false);
28 WebRuntimeFeatures::enablePrefixedEncryptedMedia(false); 27 WebRuntimeFeatures::enablePrefixedEncryptedMedia(false);
29 } 28 }
30 #endif // !defined(GOOGLE_TV) 29 #endif // !defined(GOOGLE_TV)
31 bool enable_webaudio = false; 30 bool enable_webaudio = false;
32 #if defined(ARCH_CPU_ARMEL) 31 #if defined(ARCH_CPU_ARMEL)
33 // WebAudio needs Android MediaCodec API that was introduced in 32 // WebAudio needs Android MediaCodec API, and also currently needs NEON
34 // JellyBean, and also currently needs NEON support for the FFT. 33 // support for the FFT.
35 enable_webaudio = 34 enable_webaudio =
36 (base::android::BuildInfo::GetInstance()->sdk_int() >= 16) && 35 (media::MediaCodecBridge::IsAvailable()) &&
37 ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0); 36 ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0);
38 #endif // defined(ARCH_CPU_ARMEL) 37 #endif // defined(ARCH_CPU_ARMEL)
39 WebRuntimeFeatures::enableWebAudio(enable_webaudio); 38 WebRuntimeFeatures::enableWebAudio(enable_webaudio);
40 // Android does not support the Gamepad API. 39 // Android does not support the Gamepad API.
41 WebRuntimeFeatures::enableGamepad(false); 40 WebRuntimeFeatures::enableGamepad(false);
42 // Android does not have support for PagePopup 41 // Android does not have support for PagePopup
43 WebRuntimeFeatures::enablePagePopup(false); 42 WebRuntimeFeatures::enablePagePopup(false);
44 // datalist on Android is not enabled 43 // datalist on Android is not enabled
45 WebRuntimeFeatures::enableDataListElement(false); 44 WebRuntimeFeatures::enableDataListElement(false);
46 // Android does not yet support the Web Notification API. crbug.com/115320 45 // Android does not yet support the Web Notification API. crbug.com/115320
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 WebRuntimeFeatures::enableOverlayScrollbars(true); 145 WebRuntimeFeatures::enableOverlayScrollbars(true);
147 146
148 if (command_line.HasSwitch(switches::kEnableInputModeAttribute)) 147 if (command_line.HasSwitch(switches::kEnableInputModeAttribute))
149 WebRuntimeFeatures::enableInputModeAttribute(true); 148 WebRuntimeFeatures::enableInputModeAttribute(true);
150 149
151 if (command_line.HasSwitch(switches::kEnableFastTextAutosizing)) 150 if (command_line.HasSwitch(switches::kEnableFastTextAutosizing))
152 WebRuntimeFeatures::enableFastTextAutosizing(true); 151 WebRuntimeFeatures::enableFastTextAutosizing(true);
153 } 152 }
154 153
155 } // namespace content 154 } // namespace content
OLDNEW
« 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