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/common/content_switches_internal.h" | 8 #include "content/common/content_switches_internal.h" |
9 #include "content/public/common/content_switches.h" | 9 #include "content/public/common/content_switches.h" |
10 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" | 10 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
(...skipping 13 matching lines...) Expand all Loading... | |
24 if (!media::MediaCodecBridge::IsAvailable()) { | 24 if (!media::MediaCodecBridge::IsAvailable()) { |
25 WebRuntimeFeatures::enableWebKitMediaSource(false); | 25 WebRuntimeFeatures::enableWebKitMediaSource(false); |
26 WebRuntimeFeatures::enableMediaSource(false); | 26 WebRuntimeFeatures::enableMediaSource(false); |
27 WebRuntimeFeatures::enablePrefixedEncryptedMedia(false); | 27 WebRuntimeFeatures::enablePrefixedEncryptedMedia(false); |
28 } | 28 } |
29 // WebAudio is enabled by default only on ARM and only when the | 29 // WebAudio is enabled by default only on ARM and only when the |
30 // MediaCodec API is available. | 30 // MediaCodec API is available. |
31 WebRuntimeFeatures::enableWebAudio( | 31 WebRuntimeFeatures::enableWebAudio( |
32 media::MediaCodecBridge::IsAvailable() && | 32 media::MediaCodecBridge::IsAvailable() && |
33 (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM)); | 33 (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM)); |
34 // Android does not support the Gamepad API. | 34 // Enable Gamepad at runtime as Android supports the Gamepad API |
35 WebRuntimeFeatures::enableGamepad(false); | 35 WebRuntimeFeatures::enableGamepad(true); |
kbalazs
2014/02/20 00:48:24
No need for turning it on, you can simply remove t
| |
36 // Android does not have support for PagePopup | 36 // Android does not have support for PagePopup |
37 WebRuntimeFeatures::enablePagePopup(false); | 37 WebRuntimeFeatures::enablePagePopup(false); |
38 // Android does not yet support the Web Notification API. crbug.com/115320 | 38 // Android does not yet support the Web Notification API. crbug.com/115320 |
39 WebRuntimeFeatures::enableNotifications(false); | 39 WebRuntimeFeatures::enableNotifications(false); |
40 // Android does not yet support SharedWorker. crbug.com/154571 | 40 // Android does not yet support SharedWorker. crbug.com/154571 |
41 WebRuntimeFeatures::enableSharedWorker(false); | 41 WebRuntimeFeatures::enableSharedWorker(false); |
42 // Android does not yet support NavigatorContentUtils. | 42 // Android does not yet support NavigatorContentUtils. |
43 WebRuntimeFeatures::enableNavigatorContentUtils(false); | 43 WebRuntimeFeatures::enableNavigatorContentUtils(false); |
44 WebRuntimeFeatures::enableTouchIconLoading(true); | 44 WebRuntimeFeatures::enableTouchIconLoading(true); |
45 WebRuntimeFeatures::enableOrientationEvent(true); | 45 WebRuntimeFeatures::enableOrientationEvent(true); |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
184 WebRuntimeFeatures::enableFastTextAutosizing(true); | 184 WebRuntimeFeatures::enableFastTextAutosizing(true); |
185 | 185 |
186 if (command_line.HasSwitch(switches::kEnableRepaintAfterLayout)) | 186 if (command_line.HasSwitch(switches::kEnableRepaintAfterLayout)) |
187 WebRuntimeFeatures::enableRepaintAfterLayout(true); | 187 WebRuntimeFeatures::enableRepaintAfterLayout(true); |
188 | 188 |
189 if (command_line.HasSwitch(switches::kEnableTargetedStyleRecalc)) | 189 if (command_line.HasSwitch(switches::kEnableTargetedStyleRecalc)) |
190 WebRuntimeFeatures::enableTargetedStyleRecalc(true); | 190 WebRuntimeFeatures::enableTargetedStyleRecalc(true); |
191 } | 191 } |
192 | 192 |
193 } // namespace content | 193 } // namespace content |
OLD | NEW |