| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 if (command_line.HasSwitch(switches::kDisableDatabases)) | 73 if (command_line.HasSwitch(switches::kDisableDatabases)) |
| 74 WebRuntimeFeatures::enableDatabase(false); | 74 WebRuntimeFeatures::enableDatabase(false); |
| 75 | 75 |
| 76 if (command_line.HasSwitch(switches::kDisableNotifications)) { | 76 if (command_line.HasSwitch(switches::kDisableNotifications)) { |
| 77 WebRuntimeFeatures::enableNotifications(false); | 77 WebRuntimeFeatures::enableNotifications(false); |
| 78 | 78 |
| 79 // Chrome's Push Messaging implementation relies on Web Notifications. | 79 // Chrome's Push Messaging implementation relies on Web Notifications. |
| 80 WebRuntimeFeatures::enablePushMessaging(false); | 80 WebRuntimeFeatures::enablePushMessaging(false); |
| 81 } | 81 } |
| 82 | 82 |
| 83 if (command_line.HasSwitch(switches::kEnableNotificationActionIcons)) | |
| 84 WebRuntimeFeatures::enableNotificationActionIcons(true); | |
| 85 | |
| 86 if (command_line.HasSwitch(switches::kDisableSharedWorkers)) | 83 if (command_line.HasSwitch(switches::kDisableSharedWorkers)) |
| 87 WebRuntimeFeatures::enableSharedWorker(false); | 84 WebRuntimeFeatures::enableSharedWorker(false); |
| 88 | 85 |
| 89 if (command_line.HasSwitch(switches::kDisableSpeechAPI)) | 86 if (command_line.HasSwitch(switches::kDisableSpeechAPI)) |
| 90 WebRuntimeFeatures::enableScriptedSpeech(false); | 87 WebRuntimeFeatures::enableScriptedSpeech(false); |
| 91 | 88 |
| 92 if (command_line.HasSwitch(switches::kDisableFileSystem)) | 89 if (command_line.HasSwitch(switches::kDisableFileSystem)) |
| 93 WebRuntimeFeatures::enableFileSystem(false); | 90 WebRuntimeFeatures::enableFileSystem(false); |
| 94 | 91 |
| 95 if (command_line.HasSwitch(switches::kEnableExperimentalCanvasFeatures)) | 92 if (command_line.HasSwitch(switches::kEnableExperimentalCanvasFeatures)) |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 208 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 212 std::vector<std::string> disabled_features = base::SplitString( | 209 std::vector<std::string> disabled_features = base::SplitString( |
| 213 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 210 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 214 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 211 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 215 for (const std::string& feature : disabled_features) | 212 for (const std::string& feature : disabled_features) |
| 216 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 213 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 217 } | 214 } |
| 218 } | 215 } |
| 219 | 216 |
| 220 } // namespace content | 217 } // namespace content |
| OLD | NEW |