Commit 7afeb6d2 authored by timvolodine's avatar timvolodine Committed by Commit bot

Introduce "disable-speech-api" content flag and add it to WebView.

We don't want to expose Web Speech API in WebView,
because it is not supported there.

NOTE:
This patch should land after crrev.com/1129213002 (blink-side)

BUG=483889

Review URL: https://codereview.chromium.org/1127363004

Cr-Commit-Position: refs/heads/master@{#329645}
parent 403f1df9
...@@ -90,6 +90,9 @@ bool AwMainDelegate::BasicStartupComplete(int* exit_code) { ...@@ -90,6 +90,9 @@ bool AwMainDelegate::BasicStartupComplete(int* exit_code) {
// WebView does not yet support screen orientation locking. // WebView does not yet support screen orientation locking.
cl->AppendSwitch(switches::kDisableScreenOrientationLock); cl->AppendSwitch(switches::kDisableScreenOrientationLock);
// WebView does not currently support Web Speech API (crbug.com/487255)
cl->AppendSwitch(switches::kDisableSpeechAPI);
// WebView does not (yet) save Chromium data during shutdown, so add setting // WebView does not (yet) save Chromium data during shutdown, so add setting
// for Chrome to aggressively persist DOM Storage to minimize data loss. // for Chrome to aggressively persist DOM Storage to minimize data loss.
// http://crbug.com/479767 // http://crbug.com/479767
......
...@@ -1231,6 +1231,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( ...@@ -1231,6 +1231,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
switches::kDisablePrefixedEncryptedMedia, switches::kDisablePrefixedEncryptedMedia,
switches::kDisableSeccompFilterSandbox, switches::kDisableSeccompFilterSandbox,
switches::kDisableSharedWorkers, switches::kDisableSharedWorkers,
switches::kDisableSpeechAPI,
switches::kDisableSVG1DOM, switches::kDisableSVG1DOM,
switches::kDisableThreadedCompositing, switches::kDisableThreadedCompositing,
switches::kDisableThreadedScrolling, switches::kDisableThreadedScrolling,
......
...@@ -124,6 +124,9 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( ...@@ -124,6 +124,9 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
WebRuntimeFeatures::enableWebAudio(false); WebRuntimeFeatures::enableWebAudio(false);
#endif #endif
if (command_line.HasSwitch(switches::kDisableSpeechAPI))
WebRuntimeFeatures::enableScriptedSpeech(false);
if (command_line.HasSwitch(switches::kDisableEncryptedMedia)) if (command_line.HasSwitch(switches::kDisableEncryptedMedia))
WebRuntimeFeatures::enableEncryptedMedia(false); WebRuntimeFeatures::enableEncryptedMedia(false);
......
...@@ -242,6 +242,9 @@ const char kDisableSmoothScrolling[] = "disable-smooth-scrolling"; ...@@ -242,6 +242,9 @@ const char kDisableSmoothScrolling[] = "disable-smooth-scrolling";
// Disables the use of a 3D software rasterizer. // Disables the use of a 3D software rasterizer.
const char kDisableSoftwareRasterizer[] = "disable-software-rasterizer"; const char kDisableSoftwareRasterizer[] = "disable-software-rasterizer";
// Disables the Web Speech API.
const char kDisableSpeechAPI[] = "disable-speech-api";
// Disables SVG 1.1 DOM. // Disables SVG 1.1 DOM.
const char kDisableSVG1DOM[] = "disable-svg1dom"; const char kDisableSVG1DOM[] = "disable-svg1dom";
......
...@@ -81,6 +81,7 @@ CONTENT_EXPORT extern const char kDisableSharedWorkers[]; ...@@ -81,6 +81,7 @@ CONTENT_EXPORT extern const char kDisableSharedWorkers[];
CONTENT_EXPORT extern const char kDisableSingleThreadProxyScheduler[]; CONTENT_EXPORT extern const char kDisableSingleThreadProxyScheduler[];
CONTENT_EXPORT extern const char kDisableSmoothScrolling[]; CONTENT_EXPORT extern const char kDisableSmoothScrolling[];
CONTENT_EXPORT extern const char kDisableSoftwareRasterizer[]; CONTENT_EXPORT extern const char kDisableSoftwareRasterizer[];
CONTENT_EXPORT extern const char kDisableSpeechAPI[];
CONTENT_EXPORT extern const char kDisableSVG1DOM[]; CONTENT_EXPORT extern const char kDisableSVG1DOM[];
CONTENT_EXPORT extern const char kDisableTextBlobs[]; CONTENT_EXPORT extern const char kDisableTextBlobs[];
CONTENT_EXPORT extern const char kDisableThreadedCompositing[]; CONTENT_EXPORT extern const char kDisableThreadedCompositing[];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment