| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 | 184 |
| 185 if (command_line.HasSwitch(switches::kEnableUnsafeES3APIs)) | 185 if (command_line.HasSwitch(switches::kEnableUnsafeES3APIs)) |
| 186 WebRuntimeFeatures::enableUnsafeES3APIs(true); | 186 WebRuntimeFeatures::enableUnsafeES3APIs(true); |
| 187 | 187 |
| 188 if (command_line.HasSwitch(switches::kEnableWebVR)) | 188 if (command_line.HasSwitch(switches::kEnableWebVR)) |
| 189 WebRuntimeFeatures::enableWebVR(true); | 189 WebRuntimeFeatures::enableWebVR(true); |
| 190 | 190 |
| 191 if (command_line.HasSwitch(switches::kDisablePresentationAPI)) | 191 if (command_line.HasSwitch(switches::kDisablePresentationAPI)) |
| 192 WebRuntimeFeatures::enablePresentationAPI(false); | 192 WebRuntimeFeatures::enablePresentationAPI(false); |
| 193 | 193 |
| 194 if (base::FeatureList::IsEnabled(features::kWeakMemoryCache)) | |
| 195 WebRuntimeFeatures::enableWeakMemoryCache(true); | |
| 196 | |
| 197 if (base::FeatureList::IsEnabled(features::kDoNotUnlockSharedBuffer)) | |
| 198 WebRuntimeFeatures::enableDoNotUnlockSharedBuffer(true); | |
| 199 | |
| 200 const std::string webfonts_intervention_v2_group_name = | 194 const std::string webfonts_intervention_v2_group_name = |
| 201 base::FieldTrialList::FindFullName("WebFontsInterventionV2"); | 195 base::FieldTrialList::FindFullName("WebFontsInterventionV2"); |
| 202 const std::string webfonts_intervention_v2_about_flag = | 196 const std::string webfonts_intervention_v2_about_flag = |
| 203 command_line.GetSwitchValueASCII(switches::kEnableWebFontsInterventionV2); | 197 command_line.GetSwitchValueASCII(switches::kEnableWebFontsInterventionV2); |
| 204 if (!webfonts_intervention_v2_about_flag.empty()) { | 198 if (!webfonts_intervention_v2_about_flag.empty()) { |
| 205 WebRuntimeFeatures::enableWebFontsInterventionV2With2G( | 199 WebRuntimeFeatures::enableWebFontsInterventionV2With2G( |
| 206 webfonts_intervention_v2_about_flag.compare( | 200 webfonts_intervention_v2_about_flag.compare( |
| 207 switches::kEnableWebFontsInterventionV2SwitchValueEnabledWith2G) == | 201 switches::kEnableWebFontsInterventionV2SwitchValueEnabledWith2G) == |
| 208 0); | 202 0); |
| 209 WebRuntimeFeatures::enableWebFontsInterventionV2WithSlow2G( | 203 WebRuntimeFeatures::enableWebFontsInterventionV2WithSlow2G( |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 284 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 291 std::vector<std::string> disabled_features = base::SplitString( | 285 std::vector<std::string> disabled_features = base::SplitString( |
| 292 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 286 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 293 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 287 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 294 for (const std::string& feature : disabled_features) | 288 for (const std::string& feature : disabled_features) |
| 295 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 289 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 296 } | 290 } |
| 297 } | 291 } |
| 298 | 292 |
| 299 } // namespace content | 293 } // namespace content |
| OLD | NEW |