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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 if (command_line.HasSwitch(switches::kDisableDatabases)) | 78 if (command_line.HasSwitch(switches::kDisableDatabases)) |
79 WebRuntimeFeatures::enableDatabase(false); | 79 WebRuntimeFeatures::enableDatabase(false); |
80 | 80 |
81 if (command_line.HasSwitch(switches::kDisableNotifications)) { | 81 if (command_line.HasSwitch(switches::kDisableNotifications)) { |
82 WebRuntimeFeatures::enableNotifications(false); | 82 WebRuntimeFeatures::enableNotifications(false); |
83 | 83 |
84 // Chrome's Push Messaging implementation relies on Web Notifications. | 84 // Chrome's Push Messaging implementation relies on Web Notifications. |
85 WebRuntimeFeatures::enablePushMessaging(false); | 85 WebRuntimeFeatures::enablePushMessaging(false); |
86 } | 86 } |
87 | 87 |
| 88 // For the time being, enable wasm serialization when wasm is enabled, |
| 89 // since the whole wasm space is experimental. We have the flexibility |
| 90 // to decouple the two. |
| 91 if (command_line.HasSwitch(switches::kEnableWasm)) |
| 92 WebRuntimeFeatures::enableWebAssemblySerialization(true); |
| 93 |
88 if (command_line.HasSwitch(switches::kDisableSharedWorkers)) | 94 if (command_line.HasSwitch(switches::kDisableSharedWorkers)) |
89 WebRuntimeFeatures::enableSharedWorker(false); | 95 WebRuntimeFeatures::enableSharedWorker(false); |
90 | 96 |
91 if (command_line.HasSwitch(switches::kDisableSpeechAPI)) | 97 if (command_line.HasSwitch(switches::kDisableSpeechAPI)) |
92 WebRuntimeFeatures::enableScriptedSpeech(false); | 98 WebRuntimeFeatures::enableScriptedSpeech(false); |
93 | 99 |
94 if (command_line.HasSwitch(switches::kDisableFileSystem)) | 100 if (command_line.HasSwitch(switches::kDisableFileSystem)) |
95 WebRuntimeFeatures::enableFileSystem(false); | 101 WebRuntimeFeatures::enableFileSystem(false); |
96 | 102 |
97 if (command_line.HasSwitch(switches::kEnableExperimentalCanvasFeatures)) | 103 if (command_line.HasSwitch(switches::kEnableExperimentalCanvasFeatures)) |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 296 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
291 std::vector<std::string> disabled_features = base::SplitString( | 297 std::vector<std::string> disabled_features = base::SplitString( |
292 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 298 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
293 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 299 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
294 for (const std::string& feature : disabled_features) | 300 for (const std::string& feature : disabled_features) |
295 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 301 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
296 } | 302 } |
297 } | 303 } |
298 | 304 |
299 } // namespace content | 305 } // namespace content |
OLD | NEW |