| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 4 | 5 |
| 5 #include "content/child/runtime_features.h" | 6 #include "content/child/runtime_features.h" |
| 6 | 7 |
| 7 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 8 #include "content/public/common/content_switches.h" | 9 #include "content/public/common/content_switches.h" |
| 9 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" | 10 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
| 10 | 11 |
| 11 #if defined(OS_ANDROID) | 12 #if defined(OS_ANDROID) |
| (...skipping 13 matching lines...) Expand all Loading... |
| 25 WebRuntimeFeatures::enableWebKitMediaSource(false); | 26 WebRuntimeFeatures::enableWebKitMediaSource(false); |
| 26 WebRuntimeFeatures::enableMediaSource(false); | 27 WebRuntimeFeatures::enableMediaSource(false); |
| 27 WebRuntimeFeatures::enablePrefixedEncryptedMedia(false); | 28 WebRuntimeFeatures::enablePrefixedEncryptedMedia(false); |
| 28 } | 29 } |
| 29 #endif // !defined(GOOGLE_TV) | 30 #endif // !defined(GOOGLE_TV) |
| 30 // WebAudio is enabled by default only on ARM and only when the | 31 // WebAudio is enabled by default only on ARM and only when the |
| 31 // MediaCodec API is available. | 32 // MediaCodec API is available. |
| 32 WebRuntimeFeatures::enableWebAudio( | 33 WebRuntimeFeatures::enableWebAudio( |
| 33 media::MediaCodecBridge::IsAvailable() && | 34 media::MediaCodecBridge::IsAvailable() && |
| 34 (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM)); | 35 (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM)); |
| 35 // Android does not support the Gamepad API. | 36 // Enable Gamepad at runtime as Android supports the Gamepad API |
| 36 WebRuntimeFeatures::enableGamepad(false); | 37 WebRuntimeFeatures::enableGamepad(true); |
| 37 // Android does not have support for PagePopup | 38 // Android does not have support for PagePopup |
| 38 WebRuntimeFeatures::enablePagePopup(false); | 39 WebRuntimeFeatures::enablePagePopup(false); |
| 39 // Android does not yet support the Web Notification API. crbug.com/115320 | 40 // Android does not yet support the Web Notification API. crbug.com/115320 |
| 40 WebRuntimeFeatures::enableNotifications(false); | 41 WebRuntimeFeatures::enableNotifications(false); |
| 41 // Android does not yet support SharedWorker. crbug.com/154571 | 42 // Android does not yet support SharedWorker. crbug.com/154571 |
| 42 WebRuntimeFeatures::enableSharedWorker(false); | 43 WebRuntimeFeatures::enableSharedWorker(false); |
| 43 // Android does not yet support NavigatorContentUtils. | 44 // Android does not yet support NavigatorContentUtils. |
| 44 WebRuntimeFeatures::enableNavigatorContentUtils(false); | 45 WebRuntimeFeatures::enableNavigatorContentUtils(false); |
| 45 #else | 46 #else |
| 46 WebRuntimeFeatures::enableNavigatorContentUtils(true); | 47 WebRuntimeFeatures::enableNavigatorContentUtils(true); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 WebRuntimeFeatures::enableInputModeAttribute(true); | 181 WebRuntimeFeatures::enableInputModeAttribute(true); |
| 181 | 182 |
| 182 if (command_line.HasSwitch(switches::kEnableFastTextAutosizing)) | 183 if (command_line.HasSwitch(switches::kEnableFastTextAutosizing)) |
| 183 WebRuntimeFeatures::enableFastTextAutosizing(true); | 184 WebRuntimeFeatures::enableFastTextAutosizing(true); |
| 184 | 185 |
| 185 if (command_line.HasSwitch(switches::kEnableRepaintAfterLayout)) | 186 if (command_line.HasSwitch(switches::kEnableRepaintAfterLayout)) |
| 186 WebRuntimeFeatures::enableRepaintAfterLayout(true); | 187 WebRuntimeFeatures::enableRepaintAfterLayout(true); |
| 187 } | 188 } |
| 188 | 189 |
| 189 } // namespace content | 190 } // namespace content |
| OLD | NEW |