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 "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 |
(...skipping 22 matching lines...) Expand all Loading... |
33 // JellyBean, and also currently needs NEON support for the FFT. | 33 // JellyBean, and also currently needs NEON support for the FFT. |
34 enable_webaudio = | 34 enable_webaudio = |
35 (base::android::BuildInfo::GetInstance()->sdk_int() >= 16) && | 35 (base::android::BuildInfo::GetInstance()->sdk_int() >= 16) && |
36 ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0); | 36 ((android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0); |
37 #endif // defined(ARCH_CPU_ARMEL) | 37 #endif // defined(ARCH_CPU_ARMEL) |
38 WebRuntimeFeatures::enableWebAudio(enable_webaudio); | 38 WebRuntimeFeatures::enableWebAudio(enable_webaudio); |
39 // Android does not support the Gamepad API. | 39 // Android does not support the Gamepad API. |
40 WebRuntimeFeatures::enableGamepad(false); | 40 WebRuntimeFeatures::enableGamepad(false); |
41 // Android does not have support for PagePopup | 41 // Android does not have support for PagePopup |
42 WebRuntimeFeatures::enablePagePopup(false); | 42 WebRuntimeFeatures::enablePagePopup(false); |
43 // datalist on Android is not enabled | |
44 WebRuntimeFeatures::enableDataListElement(false); | |
45 // Android does not yet support the Web Notification API. crbug.com/115320 | 43 // Android does not yet support the Web Notification API. crbug.com/115320 |
46 WebRuntimeFeatures::enableNotifications(false); | 44 WebRuntimeFeatures::enableNotifications(false); |
47 #endif // defined(OS_ANDROID) | 45 #endif // defined(OS_ANDROID) |
48 } | 46 } |
49 | 47 |
50 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( | 48 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( |
51 const CommandLine& command_line) { | 49 const CommandLine& command_line) { |
52 WebRuntimeFeatures::enableStableFeatures(true); | 50 WebRuntimeFeatures::enableStableFeatures(true); |
53 | 51 |
54 if (command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures)) | 52 if (command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures)) |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 WebRuntimeFeatures::enableOverlayFullscreenVideo(true); | 134 WebRuntimeFeatures::enableOverlayFullscreenVideo(true); |
137 | 135 |
138 if (command_line.HasSwitch(switches::kEnableOverlayScrollbars)) | 136 if (command_line.HasSwitch(switches::kEnableOverlayScrollbars)) |
139 WebRuntimeFeatures::enableOverlayScrollbars(true); | 137 WebRuntimeFeatures::enableOverlayScrollbars(true); |
140 | 138 |
141 if (command_line.HasSwitch(switches::kEnableInputModeAttribute)) | 139 if (command_line.HasSwitch(switches::kEnableInputModeAttribute)) |
142 WebRuntimeFeatures::enableInputModeAttribute(true); | 140 WebRuntimeFeatures::enableInputModeAttribute(true); |
143 } | 141 } |
144 | 142 |
145 } // namespace content | 143 } // namespace content |
OLD | NEW |