| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 WebRuntimeFeatures::EnablePreciseMemoryInfo(true); | 190 WebRuntimeFeatures::EnablePreciseMemoryInfo(true); |
| 191 | 191 |
| 192 if (command_line.HasSwitch(switches::kEnablePrintBrowser)) | 192 if (command_line.HasSwitch(switches::kEnablePrintBrowser)) |
| 193 WebRuntimeFeatures::EnablePrintBrowser(true); | 193 WebRuntimeFeatures::EnablePrintBrowser(true); |
| 194 | 194 |
| 195 if (command_line.HasSwitch(switches::kEnableNetworkInformation) || | 195 if (command_line.HasSwitch(switches::kEnableNetworkInformation) || |
| 196 enableExperimentalWebPlatformFeatures) { | 196 enableExperimentalWebPlatformFeatures) { |
| 197 WebRuntimeFeatures::EnableNetworkInformation(true); | 197 WebRuntimeFeatures::EnableNetworkInformation(true); |
| 198 } | 198 } |
| 199 | 199 |
| 200 if (!base::FeatureList::IsEnabled(features::kCredentialManagementAPI)) | |
| 201 WebRuntimeFeatures::EnableCredentialManagerAPI(false); | |
| 202 | |
| 203 if (command_line.HasSwitch(switches::kReducedReferrerGranularity)) | 200 if (command_line.HasSwitch(switches::kReducedReferrerGranularity)) |
| 204 WebRuntimeFeatures::EnableReducedReferrerGranularity(true); | 201 WebRuntimeFeatures::EnableReducedReferrerGranularity(true); |
| 205 | 202 |
| 206 if (command_line.HasSwitch(switches::kRootLayerScrolls)) | 203 if (command_line.HasSwitch(switches::kRootLayerScrolls)) |
| 207 WebRuntimeFeatures::EnableRootLayerScrolling(true); | 204 WebRuntimeFeatures::EnableRootLayerScrolling(true); |
| 208 | 205 |
| 209 if (command_line.HasSwitch(switches::kDisablePermissionsAPI)) | 206 if (command_line.HasSwitch(switches::kDisablePermissionsAPI)) |
| 210 WebRuntimeFeatures::EnablePermissionsAPI(false); | 207 WebRuntimeFeatures::EnablePermissionsAPI(false); |
| 211 | 208 |
| 212 if (command_line.HasSwitch(switches::kDisableV8IdleTasks)) | 209 if (command_line.HasSwitch(switches::kDisableV8IdleTasks)) |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 392 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 396 std::vector<std::string> disabled_features = base::SplitString( | 393 std::vector<std::string> disabled_features = base::SplitString( |
| 397 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 394 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 398 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 395 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 399 for (const std::string& feature : disabled_features) | 396 for (const std::string& feature : disabled_features) |
| 400 WebRuntimeFeatures::EnableFeatureFromString(feature, false); | 397 WebRuntimeFeatures::EnableFeatureFromString(feature, false); |
| 401 } | 398 } |
| 402 } | 399 } |
| 403 | 400 |
| 404 } // namespace content | 401 } // namespace content |
| OLD | NEW |