| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 // Only Android, ChromeOS support NetInfo right now. | 54 // Only Android, ChromeOS support NetInfo right now. |
| 55 WebRuntimeFeatures::enableNetworkInformation(false); | 55 WebRuntimeFeatures::enableNetworkInformation(false); |
| 56 #endif | 56 #endif |
| 57 } | 57 } |
| 58 | 58 |
| 59 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( | 59 void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( |
| 60 const base::CommandLine& command_line) { | 60 const base::CommandLine& command_line) { |
| 61 if (command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures)) | 61 if (command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures)) |
| 62 WebRuntimeFeatures::enableExperimentalFeatures(true); | 62 WebRuntimeFeatures::enableExperimentalFeatures(true); |
| 63 | 63 |
| 64 WebRuntimeFeatures::enableExperimentalFramework( | 64 WebRuntimeFeatures::enableOriginTrials( |
| 65 base::FeatureList::IsEnabled(features::kExperimentalFramework)); | 65 base::FeatureList::IsEnabled(features::kOriginTrials)); |
| 66 | 66 |
| 67 if (command_line.HasSwitch(switches::kEnableWebBluetooth)) | 67 if (command_line.HasSwitch(switches::kEnableWebBluetooth)) |
| 68 WebRuntimeFeatures::enableWebBluetooth(true); | 68 WebRuntimeFeatures::enableWebBluetooth(true); |
| 69 | 69 |
| 70 if (!base::FeatureList::IsEnabled(features::kWebUsb)) | 70 if (!base::FeatureList::IsEnabled(features::kWebUsb)) |
| 71 WebRuntimeFeatures::enableWebUsb(false); | 71 WebRuntimeFeatures::enableWebUsb(false); |
| 72 | 72 |
| 73 SetRuntimeFeatureDefaultsForPlatform(); | 73 SetRuntimeFeatureDefaultsForPlatform(); |
| 74 | 74 |
| 75 if (command_line.HasSwitch(switches::kDisableDatabases)) | 75 if (command_line.HasSwitch(switches::kDisableDatabases)) |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 212 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 213 std::vector<std::string> disabled_features = base::SplitString( | 213 std::vector<std::string> disabled_features = base::SplitString( |
| 214 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 214 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 215 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 215 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 216 for (const std::string& feature : disabled_features) | 216 for (const std::string& feature : disabled_features) |
| 217 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 217 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 218 } | 218 } |
| 219 } | 219 } |
| 220 | 220 |
| 221 } // namespace content | 221 } // namespace content |
| OLD | NEW |