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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 if (command_line.HasSwitch(switches::kDisableWebAudio)) | 126 if (command_line.HasSwitch(switches::kDisableWebAudio)) |
127 WebRuntimeFeatures::enableWebAudio(false); | 127 WebRuntimeFeatures::enableWebAudio(false); |
128 #endif | 128 #endif |
129 | 129 |
130 if (command_line.HasSwitch(switches::kDisableEncryptedMedia)) | 130 if (command_line.HasSwitch(switches::kDisableEncryptedMedia)) |
131 WebRuntimeFeatures::enableEncryptedMedia(false); | 131 WebRuntimeFeatures::enableEncryptedMedia(false); |
132 | 132 |
133 if (command_line.HasSwitch(switches::kDisablePrefixedEncryptedMedia)) | 133 if (command_line.HasSwitch(switches::kDisablePrefixedEncryptedMedia)) |
134 WebRuntimeFeatures::enablePrefixedEncryptedMedia(false); | 134 WebRuntimeFeatures::enablePrefixedEncryptedMedia(false); |
135 | 135 |
136 if (command_line.HasSwitch(switches::kEnableWebMIDI)) | |
137 WebRuntimeFeatures::enableWebMIDI(true); | |
138 | |
139 if (command_line.HasSwitch(switches::kDisableFileSystem)) | 136 if (command_line.HasSwitch(switches::kDisableFileSystem)) |
140 WebRuntimeFeatures::enableFileSystem(false); | 137 WebRuntimeFeatures::enableFileSystem(false); |
141 | 138 |
142 if (command_line.HasSwitch(switches::kEnableExperimentalCanvasFeatures)) | 139 if (command_line.HasSwitch(switches::kEnableExperimentalCanvasFeatures)) |
143 WebRuntimeFeatures::enableExperimentalCanvasFeatures(true); | 140 WebRuntimeFeatures::enableExperimentalCanvasFeatures(true); |
144 | 141 |
145 if (!command_line.HasSwitch(switches::kDisableAcceleratedJpegDecoding)) | 142 if (!command_line.HasSwitch(switches::kDisableAcceleratedJpegDecoding)) |
146 WebRuntimeFeatures::enableDecodeToYUV(true); | 143 WebRuntimeFeatures::enableDecodeToYUV(true); |
147 | 144 |
148 if (command_line.HasSwitch(switches::kEnableDisplayList2dCanvas)) | 145 if (command_line.HasSwitch(switches::kEnableDisplayList2dCanvas)) |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', | 217 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), ',', |
221 &disabled_features); | 218 &disabled_features); |
222 for (const std::string& feature : disabled_features) { | 219 for (const std::string& feature : disabled_features) { |
223 WebRuntimeFeatures::enableFeatureFromString( | 220 WebRuntimeFeatures::enableFeatureFromString( |
224 blink::WebString::fromLatin1(feature), false); | 221 blink::WebString::fromLatin1(feature), false); |
225 } | 222 } |
226 } | 223 } |
227 } | 224 } |
228 | 225 |
229 } // namespace content | 226 } // namespace content |
OLD | NEW |