| 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/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // WebAudio is enabled by default on ARM and X86, if the MediaCodec | 117 // WebAudio is enabled by default on ARM and X86, if the MediaCodec |
| 118 // API is available. | 118 // API is available. |
| 119 WebRuntimeFeatures::enableWebAudio( | 119 WebRuntimeFeatures::enableWebAudio( |
| 120 !command_line.HasSwitch(switches::kDisableWebAudio) && | 120 !command_line.HasSwitch(switches::kDisableWebAudio) && |
| 121 media::MediaCodecBridge::IsAvailable()); | 121 media::MediaCodecBridge::IsAvailable()); |
| 122 #else | 122 #else |
| 123 if (command_line.HasSwitch(switches::kDisableWebAudio)) | 123 if (command_line.HasSwitch(switches::kDisableWebAudio)) |
| 124 WebRuntimeFeatures::enableWebAudio(false); | 124 WebRuntimeFeatures::enableWebAudio(false); |
| 125 #endif | 125 #endif |
| 126 | 126 |
| 127 if (command_line.HasSwitch(switches::kDisableSpeechAPI)) |
| 128 WebRuntimeFeatures::enableScriptedSpeech(false); |
| 129 |
| 127 if (command_line.HasSwitch(switches::kDisableEncryptedMedia)) | 130 if (command_line.HasSwitch(switches::kDisableEncryptedMedia)) |
| 128 WebRuntimeFeatures::enableEncryptedMedia(false); | 131 WebRuntimeFeatures::enableEncryptedMedia(false); |
| 129 | 132 |
| 130 if (command_line.HasSwitch(switches::kDisablePrefixedEncryptedMedia)) | 133 if (command_line.HasSwitch(switches::kDisablePrefixedEncryptedMedia)) |
| 131 WebRuntimeFeatures::enablePrefixedEncryptedMedia(false); | 134 WebRuntimeFeatures::enablePrefixedEncryptedMedia(false); |
| 132 | 135 |
| 133 if (command_line.HasSwitch(switches::kDisableFileSystem)) | 136 if (command_line.HasSwitch(switches::kDisableFileSystem)) |
| 134 WebRuntimeFeatures::enableFileSystem(false); | 137 WebRuntimeFeatures::enableFileSystem(false); |
| 135 | 138 |
| 136 if (command_line.HasSwitch(switches::kEnableExperimentalCanvasFeatures)) | 139 if (command_line.HasSwitch(switches::kEnableExperimentalCanvasFeatures)) |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', | 223 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', |
| 221 &disabled_features); | 224 &disabled_features); |
| 222 for (const std::string& feature : disabled_features) { | 225 for (const std::string& feature : disabled_features) { |
| 223 WebRuntimeFeatures::enableFeatureFromString( | 226 WebRuntimeFeatures::enableFeatureFromString( |
| 224 blink::WebString::fromLatin1(feature), false); | 227 blink::WebString::fromLatin1(feature), false); |
| 225 } | 228 } |
| 226 } | 229 } |
| 227 } | 230 } |
| 228 | 231 |
| 229 } // namespace content | 232 } // namespace content |
| OLD | NEW |