| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 WebRuntimeFeatures::enableScrollAnchoring(true); | 225 WebRuntimeFeatures::enableScrollAnchoring(true); |
| 226 | 226 |
| 227 if (command_line.HasSwitch(switches::kEnableSlimmingPaintV2)) | 227 if (command_line.HasSwitch(switches::kEnableSlimmingPaintV2)) |
| 228 WebRuntimeFeatures::enableSlimmingPaintV2(true); | 228 WebRuntimeFeatures::enableSlimmingPaintV2(true); |
| 229 | 229 |
| 230 // Note that it might already by true for OS_ANDROID, above. This is for | 230 // Note that it might already by true for OS_ANDROID, above. This is for |
| 231 // non-android versions. | 231 // non-android versions. |
| 232 if (base::FeatureList::IsEnabled(features::kNewMediaPlaybackUi)) | 232 if (base::FeatureList::IsEnabled(features::kNewMediaPlaybackUi)) |
| 233 WebRuntimeFeatures::enableNewMediaPlaybackUi(true); | 233 WebRuntimeFeatures::enableNewMediaPlaybackUi(true); |
| 234 | 234 |
| 235 if (base::FeatureList::IsEnabled( |
| 236 features::kNonValidatingReloadOnNormalReload)) { |
| 237 WebRuntimeFeatures::enableReloadwithoutSubResourceCacheRevalidation(true); |
| 238 } |
| 239 |
| 235 if (base::FeatureList::IsEnabled(features::kDocumentWriteEvaluator)) | 240 if (base::FeatureList::IsEnabled(features::kDocumentWriteEvaluator)) |
| 236 WebRuntimeFeatures::enableDocumentWriteEvaluator(true); | 241 WebRuntimeFeatures::enableDocumentWriteEvaluator(true); |
| 237 | 242 |
| 238 WebRuntimeFeatures::enableMediaDocumentDownloadButton( | 243 WebRuntimeFeatures::enableMediaDocumentDownloadButton( |
| 239 base::FeatureList::IsEnabled(features::kMediaDocumentDownloadButton)); | 244 base::FeatureList::IsEnabled(features::kMediaDocumentDownloadButton)); |
| 240 | 245 |
| 241 if (base::FeatureList::IsEnabled(features::kPointerEvents)) | 246 if (base::FeatureList::IsEnabled(features::kPointerEvents)) |
| 242 WebRuntimeFeatures::enablePointerEvent(true); | 247 WebRuntimeFeatures::enablePointerEvent(true); |
| 243 | 248 |
| 244 if (base::FeatureList::IsEnabled(features::kPassiveDocumentEventListeners)) | 249 if (base::FeatureList::IsEnabled(features::kPassiveDocumentEventListeners)) |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 295 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 291 std::vector<std::string> disabled_features = base::SplitString( | 296 std::vector<std::string> disabled_features = base::SplitString( |
| 292 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 297 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 293 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 298 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 294 for (const std::string& feature : disabled_features) | 299 for (const std::string& feature : disabled_features) |
| 295 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 300 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 296 } | 301 } |
| 297 } | 302 } |
| 298 | 303 |
| 299 } // namespace content | 304 } // namespace content |
| OLD | NEW |