| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 WebRuntimeFeatures::enableFastMobileScrolling(true); | 37 WebRuntimeFeatures::enableFastMobileScrolling(true); |
| 38 WebRuntimeFeatures::enableMediaCapture(true); | 38 WebRuntimeFeatures::enableMediaCapture(true); |
| 39 // Android won't be able to reliably support non-persistent notifications, the | 39 // Android won't be able to reliably support non-persistent notifications, the |
| 40 // intended behavior for which is in flux by itself. | 40 // intended behavior for which is in flux by itself. |
| 41 WebRuntimeFeatures::enableNotificationConstructor(false); | 41 WebRuntimeFeatures::enableNotificationConstructor(false); |
| 42 // Android does not yet support switching of audio output devices | 42 // Android does not yet support switching of audio output devices |
| 43 WebRuntimeFeatures::enableAudioOutputDevices(false); | 43 WebRuntimeFeatures::enableAudioOutputDevices(false); |
| 44 WebRuntimeFeatures::enableAutoplayMutedVideos(true); | 44 WebRuntimeFeatures::enableAutoplayMutedVideos(true); |
| 45 // Android does not yet support SystemMonitor. | 45 // Android does not yet support SystemMonitor. |
| 46 WebRuntimeFeatures::enableOnDeviceChange(false); | 46 WebRuntimeFeatures::enableOnDeviceChange(false); |
| 47 #else | 47 #else // defined(OS_ANDROID) |
| 48 WebRuntimeFeatures::enableNavigatorContentUtils(true); | 48 WebRuntimeFeatures::enableNavigatorContentUtils(true); |
| 49 if (base::FeatureList::IsEnabled( |
| 50 features::kCrossOriginMediaPlaybackRequiresUserGesture)) { |
| 51 WebRuntimeFeatures::enableAutoplayMutedVideos(true); |
| 52 } |
| 49 #endif // defined(OS_ANDROID) | 53 #endif // defined(OS_ANDROID) |
| 50 | 54 |
| 51 #if defined(OS_ANDROID) || defined(USE_AURA) | 55 #if defined(OS_ANDROID) || defined(USE_AURA) |
| 52 WebRuntimeFeatures::enableCompositedSelectionUpdate(true); | 56 WebRuntimeFeatures::enableCompositedSelectionUpdate(true); |
| 53 #endif | 57 #endif |
| 54 | 58 |
| 55 #if !(defined OS_ANDROID || defined OS_CHROMEOS) | 59 #if !(defined OS_ANDROID || defined OS_CHROMEOS) |
| 56 // Only Android, ChromeOS support NetInfo right now. | 60 // Only Android, ChromeOS support NetInfo right now. |
| 57 WebRuntimeFeatures::enableNetworkInformation(false); | 61 WebRuntimeFeatures::enableNetworkInformation(false); |
| 58 #endif | 62 #endif |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 346 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 343 std::vector<std::string> disabled_features = base::SplitString( | 347 std::vector<std::string> disabled_features = base::SplitString( |
| 344 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 348 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 345 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 349 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 346 for (const std::string& feature : disabled_features) | 350 for (const std::string& feature : disabled_features) |
| 347 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 351 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 348 } | 352 } |
| 349 } | 353 } |
| 350 | 354 |
| 351 } // namespace content | 355 } // namespace content |
| OLD | NEW |