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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 WebRuntimeFeatures::EnableFeatureFromString("IdleTimeSpellChecking", true); | 379 WebRuntimeFeatures::EnableFeatureFromString("IdleTimeSpellChecking", true); |
380 | 380 |
381 if (media::GetEffectiveAutoplayPolicy(command_line) != | 381 if (media::GetEffectiveAutoplayPolicy(command_line) != |
382 switches::autoplay::kNoUserGestureRequiredPolicy) { | 382 switches::autoplay::kNoUserGestureRequiredPolicy) { |
383 WebRuntimeFeatures::EnableAutoplayMutedVideos(true); | 383 WebRuntimeFeatures::EnableAutoplayMutedVideos(true); |
384 } | 384 } |
385 | 385 |
386 WebRuntimeFeatures::EnableLocationHardReload( | 386 WebRuntimeFeatures::EnableLocationHardReload( |
387 base::FeatureList::IsEnabled(features::kLocationHardReload)); | 387 base::FeatureList::IsEnabled(features::kLocationHardReload)); |
388 | 388 |
| 389 if (!base::FeatureList::IsEnabled(features::kWebAuth)) |
| 390 WebRuntimeFeatures::EnableWebAuth(false); |
| 391 |
389 // Enable explicitly enabled features, and then disable explicitly disabled | 392 // Enable explicitly enabled features, and then disable explicitly disabled |
390 // ones. | 393 // ones. |
391 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { | 394 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { |
392 std::vector<std::string> enabled_features = base::SplitString( | 395 std::vector<std::string> enabled_features = base::SplitString( |
393 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), | 396 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), |
394 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 397 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
395 for (const std::string& feature : enabled_features) | 398 for (const std::string& feature : enabled_features) |
396 WebRuntimeFeatures::EnableFeatureFromString(feature, true); | 399 WebRuntimeFeatures::EnableFeatureFromString(feature, true); |
397 } | 400 } |
398 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 401 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
399 std::vector<std::string> disabled_features = base::SplitString( | 402 std::vector<std::string> disabled_features = base::SplitString( |
400 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 403 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
401 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 404 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
402 for (const std::string& feature : disabled_features) | 405 for (const std::string& feature : disabled_features) |
403 WebRuntimeFeatures::EnableFeatureFromString(feature, false); | 406 WebRuntimeFeatures::EnableFeatureFromString(feature, false); |
404 } | 407 } |
405 } | 408 } |
406 | 409 |
407 } // namespace content | 410 } // namespace content |
OLD | NEW |