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 "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 "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
9 #include "content/common/content_switches_internal.h" | 9 #include "content/common/content_switches_internal.h" |
10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 // WebAudio is enabled by default but only when the MediaCodec API | 35 // WebAudio is enabled by default but only when the MediaCodec API |
36 // is available. | 36 // is available. |
37 AndroidCpuFamily cpu_family = android_getCpuFamily(); | 37 AndroidCpuFamily cpu_family = android_getCpuFamily(); |
38 WebRuntimeFeatures::enableWebAudio( | 38 WebRuntimeFeatures::enableWebAudio( |
39 media::MediaCodecBridge::IsAvailable() && | 39 media::MediaCodecBridge::IsAvailable() && |
40 ((cpu_family == ANDROID_CPU_FAMILY_ARM) || | 40 ((cpu_family == ANDROID_CPU_FAMILY_ARM) || |
41 (cpu_family == ANDROID_CPU_FAMILY_ARM64) || | 41 (cpu_family == ANDROID_CPU_FAMILY_ARM64) || |
42 (cpu_family == ANDROID_CPU_FAMILY_X86) || | 42 (cpu_family == ANDROID_CPU_FAMILY_X86) || |
43 (cpu_family == ANDROID_CPU_FAMILY_MIPS))); | 43 (cpu_family == ANDROID_CPU_FAMILY_MIPS))); |
44 | 44 |
45 // Android supports gamepad API for JellyBean and beyond | |
46 WebRuntimeFeatures::enableGamepad( | |
47 base::android::BuildInfo::GetInstance()->sdk_int() >= 16); | |
48 // Android does not have support for PagePopup | 45 // Android does not have support for PagePopup |
49 WebRuntimeFeatures::enablePagePopup(false); | 46 WebRuntimeFeatures::enablePagePopup(false); |
50 // Android does not yet support the Web Notification API. crbug.com/115320 | 47 // Android does not yet support the Web Notification API. crbug.com/115320 |
51 WebRuntimeFeatures::enableNotifications(false); | 48 WebRuntimeFeatures::enableNotifications(false); |
52 // Android does not yet support SharedWorker. crbug.com/154571 | 49 // Android does not yet support SharedWorker. crbug.com/154571 |
53 WebRuntimeFeatures::enableSharedWorker(false); | 50 WebRuntimeFeatures::enableSharedWorker(false); |
54 // Android does not yet support NavigatorContentUtils. | 51 // Android does not yet support NavigatorContentUtils. |
55 WebRuntimeFeatures::enableNavigatorContentUtils(false); | 52 WebRuntimeFeatures::enableNavigatorContentUtils(false); |
56 WebRuntimeFeatures::enableTouchIconLoading(true); | 53 WebRuntimeFeatures::enableTouchIconLoading(true); |
57 WebRuntimeFeatures::enableOrientationEvent(true); | 54 WebRuntimeFeatures::enableOrientationEvent(true); |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 WebRuntimeFeatures::enableLayerSquashing(true); | 172 WebRuntimeFeatures::enableLayerSquashing(true); |
176 | 173 |
177 if (command_line.HasSwitch(switches::kEnableNetworkInformation) || | 174 if (command_line.HasSwitch(switches::kEnableNetworkInformation) || |
178 command_line.HasSwitch( | 175 command_line.HasSwitch( |
179 switches::kEnableExperimentalWebPlatformFeatures)) { | 176 switches::kEnableExperimentalWebPlatformFeatures)) { |
180 WebRuntimeFeatures::enableNetworkInformation(true); | 177 WebRuntimeFeatures::enableNetworkInformation(true); |
181 } | 178 } |
182 } | 179 } |
183 | 180 |
184 } // namespace content | 181 } // namespace content |
OLD | NEW |