| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 if (command_line.HasSwitch(switches::kDisableDatabases)) | 82 if (command_line.HasSwitch(switches::kDisableDatabases)) |
| 83 WebRuntimeFeatures::enableDatabase(false); | 83 WebRuntimeFeatures::enableDatabase(false); |
| 84 | 84 |
| 85 if (command_line.HasSwitch(switches::kDisableNotifications)) { | 85 if (command_line.HasSwitch(switches::kDisableNotifications)) { |
| 86 WebRuntimeFeatures::enableNotifications(false); | 86 WebRuntimeFeatures::enableNotifications(false); |
| 87 | 87 |
| 88 // Chrome's Push Messaging implementation relies on Web Notifications. | 88 // Chrome's Push Messaging implementation relies on Web Notifications. |
| 89 WebRuntimeFeatures::enablePushMessaging(false); | 89 WebRuntimeFeatures::enablePushMessaging(false); |
| 90 } | 90 } |
| 91 | 91 |
| 92 if (!base::FeatureList::IsEnabled(features::kNotificationContentImage)) |
| 93 WebRuntimeFeatures::enableNotificationContentImage(false); |
| 94 |
| 92 // For the time being, enable wasm serialization when wasm is enabled, | 95 // For the time being, enable wasm serialization when wasm is enabled, |
| 93 // since the whole wasm space is experimental. We have the flexibility | 96 // since the whole wasm space is experimental. We have the flexibility |
| 94 // to decouple the two. | 97 // to decouple the two. |
| 95 if (base::FeatureList::IsEnabled(features::kWebAssembly)) | 98 if (base::FeatureList::IsEnabled(features::kWebAssembly)) |
| 96 WebRuntimeFeatures::enableWebAssemblySerialization(true); | 99 WebRuntimeFeatures::enableWebAssemblySerialization(true); |
| 97 | 100 |
| 98 WebRuntimeFeatures::enableSharedArrayBuffer( | 101 WebRuntimeFeatures::enableSharedArrayBuffer( |
| 99 base::FeatureList::IsEnabled(features::kSharedArrayBuffer)); | 102 base::FeatureList::IsEnabled(features::kSharedArrayBuffer)); |
| 100 | 103 |
| 101 if (command_line.HasSwitch(switches::kDisableSharedWorkers)) | 104 if (command_line.HasSwitch(switches::kDisableSharedWorkers)) |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 341 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 339 std::vector<std::string> disabled_features = base::SplitString( | 342 std::vector<std::string> disabled_features = base::SplitString( |
| 340 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 343 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 341 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 344 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 342 for (const std::string& feature : disabled_features) | 345 for (const std::string& feature : disabled_features) |
| 343 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 346 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 344 } | 347 } |
| 345 } | 348 } |
| 346 | 349 |
| 347 } // namespace content | 350 } // namespace content |
| OLD | NEW |