| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 switches::kEnableExperimentalWebPlatformFeatures)) { | 164 switches::kEnableExperimentalWebPlatformFeatures)) { |
| 165 WebRuntimeFeatures::enableNetworkInformation(true); | 165 WebRuntimeFeatures::enableNetworkInformation(true); |
| 166 } | 166 } |
| 167 | 167 |
| 168 if (!base::FeatureList::IsEnabled(features::kCredentialManagementAPI)) | 168 if (!base::FeatureList::IsEnabled(features::kCredentialManagementAPI)) |
| 169 WebRuntimeFeatures::enableCredentialManagerAPI(false); | 169 WebRuntimeFeatures::enableCredentialManagerAPI(false); |
| 170 | 170 |
| 171 if (command_line.HasSwitch(switches::kReducedReferrerGranularity)) | 171 if (command_line.HasSwitch(switches::kReducedReferrerGranularity)) |
| 172 WebRuntimeFeatures::enableReducedReferrerGranularity(true); | 172 WebRuntimeFeatures::enableReducedReferrerGranularity(true); |
| 173 | 173 |
| 174 if (command_line.HasSwitch(switches::kRootLayerScrolls)) |
| 175 WebRuntimeFeatures::enableRootLayerScrolling(true); |
| 176 |
| 174 if (command_line.HasSwitch(switches::kDisablePermissionsAPI)) | 177 if (command_line.HasSwitch(switches::kDisablePermissionsAPI)) |
| 175 WebRuntimeFeatures::enablePermissionsAPI(false); | 178 WebRuntimeFeatures::enablePermissionsAPI(false); |
| 176 | 179 |
| 177 if (command_line.HasSwitch(switches::kDisableV8IdleTasks)) | 180 if (command_line.HasSwitch(switches::kDisableV8IdleTasks)) |
| 178 WebRuntimeFeatures::enableV8IdleTasks(false); | 181 WebRuntimeFeatures::enableV8IdleTasks(false); |
| 179 else | 182 else |
| 180 WebRuntimeFeatures::enableV8IdleTasks(true); | 183 WebRuntimeFeatures::enableV8IdleTasks(true); |
| 181 | 184 |
| 182 if (command_line.HasSwitch(switches::kEnableUnsafeES3APIs)) | 185 if (command_line.HasSwitch(switches::kEnableUnsafeES3APIs)) |
| 183 WebRuntimeFeatures::enableUnsafeES3APIs(true); | 186 WebRuntimeFeatures::enableUnsafeES3APIs(true); |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 290 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 288 std::vector<std::string> disabled_features = base::SplitString( | 291 std::vector<std::string> disabled_features = base::SplitString( |
| 289 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 292 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 290 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 293 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 291 for (const std::string& feature : disabled_features) | 294 for (const std::string& feature : disabled_features) |
| 292 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 295 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 293 } | 296 } |
| 294 } | 297 } |
| 295 | 298 |
| 296 } // namespace content | 299 } // namespace content |
| OLD | NEW |