| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 WebRuntimeFeatures::enablePermissionsAPI(false); | 161 WebRuntimeFeatures::enablePermissionsAPI(false); |
| 162 | 162 |
| 163 if (command_line.HasSwitch(switches::kDisableV8IdleTasks)) | 163 if (command_line.HasSwitch(switches::kDisableV8IdleTasks)) |
| 164 WebRuntimeFeatures::enableV8IdleTasks(false); | 164 WebRuntimeFeatures::enableV8IdleTasks(false); |
| 165 else | 165 else |
| 166 WebRuntimeFeatures::enableV8IdleTasks(true); | 166 WebRuntimeFeatures::enableV8IdleTasks(true); |
| 167 | 167 |
| 168 if (command_line.HasSwitch(switches::kEnableUnsafeES3APIs)) | 168 if (command_line.HasSwitch(switches::kEnableUnsafeES3APIs)) |
| 169 WebRuntimeFeatures::enableUnsafeES3APIs(true); | 169 WebRuntimeFeatures::enableUnsafeES3APIs(true); |
| 170 | 170 |
| 171 if (command_line.HasSwitch(switches::kEnableWebVR)) { | 171 if (command_line.HasSwitch(switches::kEnableWebVR)) |
| 172 WebRuntimeFeatures::enableWebVR(true); | 172 WebRuntimeFeatures::enableWebVR(true); |
| 173 WebRuntimeFeatures::enableFeatureFromString( | |
| 174 std::string("GeometryInterfaces"), true); | |
| 175 } | |
| 176 | 173 |
| 177 if (command_line.HasSwitch(switches::kDisablePresentationAPI)) | 174 if (command_line.HasSwitch(switches::kDisablePresentationAPI)) |
| 178 WebRuntimeFeatures::enablePresentationAPI(false); | 175 WebRuntimeFeatures::enablePresentationAPI(false); |
| 179 | 176 |
| 180 const std::string webfonts_intervention_v2_group_name = | 177 const std::string webfonts_intervention_v2_group_name = |
| 181 base::FieldTrialList::FindFullName("WebFontsInterventionV2"); | 178 base::FieldTrialList::FindFullName("WebFontsInterventionV2"); |
| 182 const std::string webfonts_intervention_v2_about_flag = | 179 const std::string webfonts_intervention_v2_about_flag = |
| 183 command_line.GetSwitchValueASCII(switches::kEnableWebFontsInterventionV2); | 180 command_line.GetSwitchValueASCII(switches::kEnableWebFontsInterventionV2); |
| 184 if (!webfonts_intervention_v2_about_flag.empty()) { | 181 if (!webfonts_intervention_v2_about_flag.empty()) { |
| 185 WebRuntimeFeatures::enableWebFontsInterventionV2With2G( | 182 WebRuntimeFeatures::enableWebFontsInterventionV2With2G( |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 245 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 249 std::vector<std::string> disabled_features = base::SplitString( | 246 std::vector<std::string> disabled_features = base::SplitString( |
| 250 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 247 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 251 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 248 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 252 for (const std::string& feature : disabled_features) | 249 for (const std::string& feature : disabled_features) |
| 253 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 250 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 254 } | 251 } |
| 255 } | 252 } |
| 256 | 253 |
| 257 } // namespace content | 254 } // namespace content |
| OLD | NEW |