| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 if (command_line.HasSwitch(switches::kDisableMediaSource)) | 86 if (command_line.HasSwitch(switches::kDisableMediaSource)) |
| 87 WebRuntimeFeatures::enableMediaSource(false); | 87 WebRuntimeFeatures::enableMediaSource(false); |
| 88 | 88 |
| 89 if (command_line.HasSwitch(switches::kDisableNotifications)) { | 89 if (command_line.HasSwitch(switches::kDisableNotifications)) { |
| 90 WebRuntimeFeatures::enableNotifications(false); | 90 WebRuntimeFeatures::enableNotifications(false); |
| 91 | 91 |
| 92 // Chrome's Push Messaging implementation relies on Web Notifications. | 92 // Chrome's Push Messaging implementation relies on Web Notifications. |
| 93 WebRuntimeFeatures::enablePushMessaging(false); | 93 WebRuntimeFeatures::enablePushMessaging(false); |
| 94 } | 94 } |
| 95 | 95 |
| 96 if (command_line.HasSwitch(switches::kEnableNotificationActionIcons)) |
| 97 WebRuntimeFeatures::enableNotificationActionIcons(true); |
| 98 |
| 96 if (command_line.HasSwitch(switches::kDisableSharedWorkers)) | 99 if (command_line.HasSwitch(switches::kDisableSharedWorkers)) |
| 97 WebRuntimeFeatures::enableSharedWorker(false); | 100 WebRuntimeFeatures::enableSharedWorker(false); |
| 98 | 101 |
| 99 if (command_line.HasSwitch(switches::kDisableWebAudio)) | 102 if (command_line.HasSwitch(switches::kDisableWebAudio)) |
| 100 WebRuntimeFeatures::enableWebAudio(false); | 103 WebRuntimeFeatures::enableWebAudio(false); |
| 101 | 104 |
| 102 if (command_line.HasSwitch(switches::kDisableSpeechAPI)) | 105 if (command_line.HasSwitch(switches::kDisableSpeechAPI)) |
| 103 WebRuntimeFeatures::enableScriptedSpeech(false); | 106 WebRuntimeFeatures::enableScriptedSpeech(false); |
| 104 | 107 |
| 105 if (command_line.HasSwitch(switches::kDisableEncryptedMedia)) | 108 if (command_line.HasSwitch(switches::kDisableEncryptedMedia)) |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { | 200 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { |
| 198 std::vector<std::string> disabled_features = base::SplitString( | 201 std::vector<std::string> disabled_features = base::SplitString( |
| 199 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), | 202 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), |
| 200 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 203 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 201 for (const std::string& feature : disabled_features) | 204 for (const std::string& feature : disabled_features) |
| 202 WebRuntimeFeatures::enableFeatureFromString(feature, false); | 205 WebRuntimeFeatures::enableFeatureFromString(feature, false); |
| 203 } | 206 } |
| 204 } | 207 } |
| 205 | 208 |
| 206 } // namespace content | 209 } // namespace content |
| OLD | NEW |