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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 if (command_line.HasSwitch(switches::kDisableNotifications)) { | 104 if (command_line.HasSwitch(switches::kDisableNotifications)) { |
105 WebRuntimeFeatures::enableNotifications(false); | 105 WebRuntimeFeatures::enableNotifications(false); |
106 | 106 |
107 // Chrome's Push Messaging implementation relies on Web Notifications. | 107 // Chrome's Push Messaging implementation relies on Web Notifications. |
108 WebRuntimeFeatures::enablePushMessaging(false); | 108 WebRuntimeFeatures::enablePushMessaging(false); |
109 } | 109 } |
110 | 110 |
111 if (command_line.HasSwitch(switches::kDisableSharedWorkers)) | 111 if (command_line.HasSwitch(switches::kDisableSharedWorkers)) |
112 WebRuntimeFeatures::enableSharedWorker(false); | 112 WebRuntimeFeatures::enableSharedWorker(false); |
113 | 113 |
| 114 // TODO now runtime flag. |
| 115 WebRuntimeFeatures::enableMediaRecorder(true); |
| 116 |
114 #if defined(OS_ANDROID) | 117 #if defined(OS_ANDROID) |
115 // WebAudio is enabled by default on ARM and X86, if the MediaCodec | 118 // WebAudio is enabled by default on ARM and X86, if the MediaCodec |
116 // API is available. | 119 // API is available. |
117 WebRuntimeFeatures::enableWebAudio( | 120 WebRuntimeFeatures::enableWebAudio( |
118 !command_line.HasSwitch(switches::kDisableWebAudio) && | 121 !command_line.HasSwitch(switches::kDisableWebAudio) && |
119 media::MediaCodecBridge::IsAvailable()); | 122 media::MediaCodecBridge::IsAvailable()); |
120 #else | 123 #else |
121 if (command_line.HasSwitch(switches::kDisableWebAudio)) | 124 if (command_line.HasSwitch(switches::kDisableWebAudio)) |
122 WebRuntimeFeatures::enableWebAudio(false); | 125 WebRuntimeFeatures::enableWebAudio(false); |
123 #endif | 126 #endif |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', | 229 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', |
227 &disabled_features); | 230 &disabled_features); |
228 for (const std::string& feature : disabled_features) { | 231 for (const std::string& feature : disabled_features) { |
229 WebRuntimeFeatures::enableFeatureFromString( | 232 WebRuntimeFeatures::enableFeatureFromString( |
230 blink::WebString::fromLatin1(feature), false); | 233 blink::WebString::fromLatin1(feature), false); |
231 } | 234 } |
232 } | 235 } |
233 } | 236 } |
234 | 237 |
235 } // namespace content | 238 } // namespace content |
OLD | NEW |