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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 | 310 |
311 if (base::FeatureList::IsEnabled(features::kServiceWorkerNavigationPreload)) | 311 if (base::FeatureList::IsEnabled(features::kServiceWorkerNavigationPreload)) |
312 WebRuntimeFeatures::enableServiceWorkerNavigationPreload(true); | 312 WebRuntimeFeatures::enableServiceWorkerNavigationPreload(true); |
313 | 313 |
314 if (base::FeatureList::IsEnabled(features::kSpeculativeLaunchServiceWorker)) | 314 if (base::FeatureList::IsEnabled(features::kSpeculativeLaunchServiceWorker)) |
315 WebRuntimeFeatures::enableSpeculativeLaunchServiceWorker(true); | 315 WebRuntimeFeatures::enableSpeculativeLaunchServiceWorker(true); |
316 | 316 |
317 if (base::FeatureList::IsEnabled(features::kGamepadExtensions)) | 317 if (base::FeatureList::IsEnabled(features::kGamepadExtensions)) |
318 WebRuntimeFeatures::enableGamepadExtensions(true); | 318 WebRuntimeFeatures::enableGamepadExtensions(true); |
319 | 319 |
320 if (!base::FeatureList::IsEnabled(features::kCompositeOpaqueFixedPosition)) | 320 if (base::FeatureList::IsEnabled(features::kCompositeOpaqueFixedPosition)) |
321 WebRuntimeFeatures::enableFeatureFromString("CompositeOpaqueFixedPosition", | 321 WebRuntimeFeatures::enableFeatureFromString("CompositeOpaqueFixedPosition", |
322 false); | 322 true); |
323 | 323 |
324 if (!base::FeatureList::IsEnabled(features::kCompositeOpaqueScrollers)) | 324 if (!base::FeatureList::IsEnabled(features::kCompositeOpaqueScrollers)) |
325 WebRuntimeFeatures::enableFeatureFromString("CompositeOpaqueScrollers", | 325 WebRuntimeFeatures::enableFeatureFromString("CompositeOpaqueScrollers", |
326 false); | 326 false); |
327 | 327 |
328 if (base::FeatureList::IsEnabled(features::kGenericSensor)) | 328 if (base::FeatureList::IsEnabled(features::kGenericSensor)) |
329 WebRuntimeFeatures::enableGenericSensor(true); | 329 WebRuntimeFeatures::enableGenericSensor(true); |
330 | 330 |
331 if (base::FeatureList::IsEnabled(features::kFasterLocationReload)) | 331 if (base::FeatureList::IsEnabled(features::kFasterLocationReload)) |
332 WebRuntimeFeatures::enableFasterLocationReload(true); | 332 WebRuntimeFeatures::enableFasterLocationReload(true); |
(...skipping 16 matching lines...) Expand all Loading... |
349 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 349 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
350 std::vector<std::string> disabled_features = base::SplitString( | 350 std::vector<std::string> disabled_features = base::SplitString( |
351 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 351 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
352 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 352 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
353 for (const std::string& feature : disabled_features) | 353 for (const std::string& feature : disabled_features) |
354 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 354 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
355 } | 355 } |
356 } | 356 } |
357 | 357 |
358 } // namespace content | 358 } // namespace content |
OLD | NEW |