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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
9 #include "content/common/content_switches_internal.h" | 9 #include "content/common/content_switches_internal.h" |
10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 if (command_line.HasSwitch(switches::kDisableSharedWorkers)) | 110 if (command_line.HasSwitch(switches::kDisableSharedWorkers)) |
111 WebRuntimeFeatures::enableSharedWorker(false); | 111 WebRuntimeFeatures::enableSharedWorker(false); |
112 | 112 |
113 #if defined(OS_ANDROID) | 113 #if defined(OS_ANDROID) |
114 if (command_line.HasSwitch(switches::kDisableWebRTC)) { | 114 if (command_line.HasSwitch(switches::kDisableWebRTC)) { |
115 WebRuntimeFeatures::enableMediaStream(false); | 115 WebRuntimeFeatures::enableMediaStream(false); |
116 WebRuntimeFeatures::enablePeerConnection(false); | 116 WebRuntimeFeatures::enablePeerConnection(false); |
117 } | 117 } |
118 | 118 |
| 119 if (!command_line.HasSwitch(switches::kEnableSpeechRecognition)) |
| 120 WebRuntimeFeatures::enableScriptedSpeech(false); |
| 121 |
119 // WebAudio is enabled by default on ARM and X86, if the MediaCodec | 122 // WebAudio is enabled by default on ARM and X86, if the MediaCodec |
120 // API is available. | 123 // API is available. |
121 WebRuntimeFeatures::enableWebAudio( | 124 WebRuntimeFeatures::enableWebAudio( |
122 !command_line.HasSwitch(switches::kDisableWebAudio) && | 125 !command_line.HasSwitch(switches::kDisableWebAudio) && |
123 media::MediaCodecBridge::IsAvailable()); | 126 media::MediaCodecBridge::IsAvailable()); |
124 #else | 127 #else |
125 if (command_line.HasSwitch(switches::kDisableWebAudio)) | 128 if (command_line.HasSwitch(switches::kDisableWebAudio)) |
126 WebRuntimeFeatures::enableWebAudio(false); | 129 WebRuntimeFeatures::enableWebAudio(false); |
127 #endif | 130 #endif |
128 | 131 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 WebRuntimeFeatures::enableLayerSquashing(true); | 176 WebRuntimeFeatures::enableLayerSquashing(true); |
174 | 177 |
175 if (command_line.HasSwitch(switches::kEnableNetworkInformation) || | 178 if (command_line.HasSwitch(switches::kEnableNetworkInformation) || |
176 command_line.HasSwitch( | 179 command_line.HasSwitch( |
177 switches::kEnableExperimentalWebPlatformFeatures)) { | 180 switches::kEnableExperimentalWebPlatformFeatures)) { |
178 WebRuntimeFeatures::enableNetworkInformation(true); | 181 WebRuntimeFeatures::enableNetworkInformation(true); |
179 } | 182 } |
180 } | 183 } |
181 | 184 |
182 } // namespace content | 185 } // namespace content |
OLD | NEW |