| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 if (command_line.HasSwitch(switches::kDisableNotifications)) { | 83 if (command_line.HasSwitch(switches::kDisableNotifications)) { |
| 84 WebRuntimeFeatures::enableNotifications(false); | 84 WebRuntimeFeatures::enableNotifications(false); |
| 85 | 85 |
| 86 // Chrome's Push Messaging implementation relies on Web Notifications. | 86 // Chrome's Push Messaging implementation relies on Web Notifications. |
| 87 WebRuntimeFeatures::enablePushMessaging(false); | 87 WebRuntimeFeatures::enablePushMessaging(false); |
| 88 } | 88 } |
| 89 | 89 |
| 90 // For the time being, enable wasm serialization when wasm is enabled, | 90 // For the time being, enable wasm serialization when wasm is enabled, |
| 91 // since the whole wasm space is experimental. We have the flexibility | 91 // since the whole wasm space is experimental. We have the flexibility |
| 92 // to decouple the two. | 92 // to decouple the two. |
| 93 if (command_line.HasSwitch(switches::kEnableWasm)) | 93 if (base::FeatureList::IsEnabled(features::kWebAssembly)) |
| 94 WebRuntimeFeatures::enableWebAssemblySerialization(true); | 94 WebRuntimeFeatures::enableWebAssemblySerialization(true); |
| 95 | 95 |
| 96 if (command_line.HasSwitch(switches::kDisableSharedWorkers)) | 96 if (command_line.HasSwitch(switches::kDisableSharedWorkers)) |
| 97 WebRuntimeFeatures::enableSharedWorker(false); | 97 WebRuntimeFeatures::enableSharedWorker(false); |
| 98 | 98 |
| 99 if (command_line.HasSwitch(switches::kDisableSpeechAPI)) | 99 if (command_line.HasSwitch(switches::kDisableSpeechAPI)) |
| 100 WebRuntimeFeatures::enableScriptedSpeech(false); | 100 WebRuntimeFeatures::enableScriptedSpeech(false); |
| 101 | 101 |
| 102 if (command_line.HasSwitch(switches::kDisableFileSystem)) | 102 if (command_line.HasSwitch(switches::kDisableFileSystem)) |
| 103 WebRuntimeFeatures::enableFileSystem(false); | 103 WebRuntimeFeatures::enableFileSystem(false); |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 322 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 323 std::vector<std::string> disabled_features = base::SplitString( | 323 std::vector<std::string> disabled_features = base::SplitString( |
| 324 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 324 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 325 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 325 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 326 for (const std::string& feature : disabled_features) | 326 for (const std::string& feature : disabled_features) |
| 327 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 327 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 328 } | 328 } |
| 329 } | 329 } |
| 330 | 330 |
| 331 } // namespace content | 331 } // namespace content |
| OLD | NEW |