| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 std::string("PointerEvent"), true); | 205 std::string("PointerEvent"), true); |
| 206 } | 206 } |
| 207 | 207 |
| 208 WebRuntimeFeatures::enableFeatureFromString( | 208 WebRuntimeFeatures::enableFeatureFromString( |
| 209 "FontCacheScaling", | 209 "FontCacheScaling", |
| 210 base::FeatureList::IsEnabled(features::kFontCacheScaling)); | 210 base::FeatureList::IsEnabled(features::kFontCacheScaling)); |
| 211 | 211 |
| 212 if (!base::FeatureList::IsEnabled(features::kPaintOptimizations)) | 212 if (!base::FeatureList::IsEnabled(features::kPaintOptimizations)) |
| 213 WebRuntimeFeatures::enableFeatureFromString("PaintOptimizations", false); | 213 WebRuntimeFeatures::enableFeatureFromString("PaintOptimizations", false); |
| 214 | 214 |
| 215 WebRuntimeFeatures::enableRenderingPipelineThrottling( |
| 216 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)); |
| 217 |
| 215 // Enable explicitly enabled features, and then disable explicitly disabled | 218 // Enable explicitly enabled features, and then disable explicitly disabled |
| 216 // ones. | 219 // ones. |
| 217 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { | 220 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { |
| 218 std::vector<std::string> enabled_features = base::SplitString( | 221 std::vector<std::string> enabled_features = base::SplitString( |
| 219 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), | 222 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), |
| 220 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 223 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 221 for (const std::string& feature : enabled_features) | 224 for (const std::string& feature : enabled_features) |
| 222 WebRuntimeFeatures::enableFeatureFromString(feature, true); | 225 WebRuntimeFeatures::enableFeatureFromString(feature, true); |
| 223 } | 226 } |
| 224 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 227 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 225 std::vector<std::string> disabled_features = base::SplitString( | 228 std::vector<std::string> disabled_features = base::SplitString( |
| 226 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 229 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 227 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 230 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 228 for (const std::string& feature : disabled_features) | 231 for (const std::string& feature : disabled_features) |
| 229 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 232 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 230 } | 233 } |
| 231 } | 234 } |
| 232 | 235 |
| 233 } // namespace content | 236 } // namespace content |
| OLD | NEW |