| 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 30 matching lines...) Expand all Loading... |
| 41 // Android does not yet support switching of audio output devices | 41 // Android does not yet support switching of audio output devices |
| 42 WebRuntimeFeatures::enableAudioOutputDevices(false); | 42 WebRuntimeFeatures::enableAudioOutputDevices(false); |
| 43 #else | 43 #else |
| 44 WebRuntimeFeatures::enableNavigatorContentUtils(true); | 44 WebRuntimeFeatures::enableNavigatorContentUtils(true); |
| 45 #endif // defined(OS_ANDROID) | 45 #endif // defined(OS_ANDROID) |
| 46 | 46 |
| 47 #if defined(OS_ANDROID) || defined(USE_AURA) | 47 #if defined(OS_ANDROID) || defined(USE_AURA) |
| 48 WebRuntimeFeatures::enableCompositedSelectionUpdate(true); | 48 WebRuntimeFeatures::enableCompositedSelectionUpdate(true); |
| 49 #endif | 49 #endif |
| 50 | 50 |
| 51 #if !(defined OS_ANDROID || defined OS_CHROMEOS || defined OS_IOS) | 51 #if !(defined OS_ANDROID || defined OS_CHROMEOS) |
| 52 // Only Android, ChromeOS, and IOS support NetInfo right now. | 52 // Only Android, ChromeOS support NetInfo right now. |
| 53 WebRuntimeFeatures::enableNetworkInformation(false); | 53 WebRuntimeFeatures::enableNetworkInformation(false); |
| 54 #endif | 54 #endif |
| 55 } | 55 } |
| 56 | 56 |
| 57 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( | 57 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( |
| 58 const base::CommandLine& command_line) { | 58 const base::CommandLine& command_line) { |
| 59 if (command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures)) | 59 if (command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures)) |
| 60 WebRuntimeFeatures::enableExperimentalFeatures(true); | 60 WebRuntimeFeatures::enableExperimentalFeatures(true); |
| 61 | 61 |
| 62 WebRuntimeFeatures::enableExperimentalFramework( | 62 WebRuntimeFeatures::enableExperimentalFramework( |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 189 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 190 std::vector<std::string> disabled_features = base::SplitString( | 190 std::vector<std::string> disabled_features = base::SplitString( |
| 191 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 191 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 192 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 192 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 193 for (const std::string& feature : disabled_features) | 193 for (const std::string& feature : disabled_features) |
| 194 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 194 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 195 } | 195 } |
| 196 } | 196 } |
| 197 | 197 |
| 198 } // namespace content | 198 } // namespace content |
| OLD | NEW |