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