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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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( | 173 WebRuntimeFeatures::enableFeatureFromString( |
174 std::string("GeometryInterfaces"), true); | 174 std::string("GeometryInterfaces"), true); |
175 } | 175 } |
176 | 176 |
177 if (command_line.HasSwitch(switches::kDisablePresentationAPI)) | 177 if (command_line.HasSwitch(switches::kDisablePresentationAPI)) |
178 WebRuntimeFeatures::enablePresentationAPI(false); | 178 WebRuntimeFeatures::enablePresentationAPI(false); |
179 | 179 |
| 180 if (base::FeatureList::IsEnabled(features::kWeakMemoryCache)) |
| 181 WebRuntimeFeatures::enableWeakMemoryCache(true); |
| 182 |
| 183 if (base::FeatureList::IsEnabled(features::kDoNotUnlockSharedBuffer)) |
| 184 WebRuntimeFeatures::enableDoNotUnlockSharedBuffer(true); |
| 185 |
180 const std::string webfonts_intervention_v2_group_name = | 186 const std::string webfonts_intervention_v2_group_name = |
181 base::FieldTrialList::FindFullName("WebFontsInterventionV2"); | 187 base::FieldTrialList::FindFullName("WebFontsInterventionV2"); |
182 const std::string webfonts_intervention_v2_about_flag = | 188 const std::string webfonts_intervention_v2_about_flag = |
183 command_line.GetSwitchValueASCII(switches::kEnableWebFontsInterventionV2); | 189 command_line.GetSwitchValueASCII(switches::kEnableWebFontsInterventionV2); |
184 if (!webfonts_intervention_v2_about_flag.empty()) { | 190 if (!webfonts_intervention_v2_about_flag.empty()) { |
185 WebRuntimeFeatures::enableWebFontsInterventionV2With2G( | 191 WebRuntimeFeatures::enableWebFontsInterventionV2With2G( |
186 webfonts_intervention_v2_about_flag.compare( | 192 webfonts_intervention_v2_about_flag.compare( |
187 switches::kEnableWebFontsInterventionV2SwitchValueEnabledWith2G) == | 193 switches::kEnableWebFontsInterventionV2SwitchValueEnabledWith2G) == |
188 0); | 194 0); |
189 WebRuntimeFeatures::enableWebFontsInterventionV2WithSlow2G( | 195 WebRuntimeFeatures::enableWebFontsInterventionV2WithSlow2G( |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 254 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
249 std::vector<std::string> disabled_features = base::SplitString( | 255 std::vector<std::string> disabled_features = base::SplitString( |
250 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 256 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
251 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 257 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
252 for (const std::string& feature : disabled_features) | 258 for (const std::string& feature : disabled_features) |
253 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 259 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
254 } | 260 } |
255 } | 261 } |
256 | 262 |
257 } // namespace content | 263 } // namespace content |
OLD | NEW |