Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Side by Side Diff: content/child/runtime_features.cc

Issue 1127363004: Introduce "disable-speech-api" content flag and add it to WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename flag, add crbug Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698