| 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 } |
| 173 | 176 |
| 174 if (command_line.HasSwitch(switches::kDisablePresentationAPI)) | 177 if (command_line.HasSwitch(switches::kDisablePresentationAPI)) |
| 175 WebRuntimeFeatures::enablePresentationAPI(false); | 178 WebRuntimeFeatures::enablePresentationAPI(false); |
| 176 | 179 |
| 177 const std::string webfonts_intervention_v2_group_name = | 180 const std::string webfonts_intervention_v2_group_name = |
| 178 base::FieldTrialList::FindFullName("WebFontsInterventionV2"); | 181 base::FieldTrialList::FindFullName("WebFontsInterventionV2"); |
| 179 const std::string webfonts_intervention_v2_about_flag = | 182 const std::string webfonts_intervention_v2_about_flag = |
| 180 command_line.GetSwitchValueASCII(switches::kEnableWebFontsInterventionV2); | 183 command_line.GetSwitchValueASCII(switches::kEnableWebFontsInterventionV2); |
| 181 if (!webfonts_intervention_v2_about_flag.empty()) { | 184 if (!webfonts_intervention_v2_about_flag.empty()) { |
| 182 WebRuntimeFeatures::enableWebFontsInterventionV2With2G( | 185 WebRuntimeFeatures::enableWebFontsInterventionV2With2G( |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 248 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 246 std::vector<std::string> disabled_features = base::SplitString( | 249 std::vector<std::string> disabled_features = base::SplitString( |
| 247 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 250 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 248 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 251 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 249 for (const std::string& feature : disabled_features) | 252 for (const std::string& feature : disabled_features) |
| 250 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 253 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 251 } | 254 } |
| 252 } | 255 } |
| 253 | 256 |
| 254 } // namespace content | 257 } // namespace content |
| OLD | NEW |