diff options
author | timvolodine <timvolodine@chromium.org> | 2015-05-13 09:08:11 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-13 16:08:47 +0000 |
commit | 7afeb6d2e431dbcda688226a434131a33b7ce71f (patch) | |
tree | b6964c812de267278e34512e39b510fd6b1049fe | |
parent | 403f1df98389fb093ca67d8f588743130da5300f (diff) | |
download | chromium_src-7afeb6d2e431dbcda688226a434131a33b7ce71f.zip chromium_src-7afeb6d2e431dbcda688226a434131a33b7ce71f.tar.gz chromium_src-7afeb6d2e431dbcda688226a434131a33b7ce71f.tar.bz2 |
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}
-rw-r--r-- | android_webview/lib/main/aw_main_delegate.cc | 3 | ||||
-rw-r--r-- | content/browser/renderer_host/render_process_host_impl.cc | 1 | ||||
-rw-r--r-- | content/child/runtime_features.cc | 3 | ||||
-rw-r--r-- | content/public/common/content_switches.cc | 3 | ||||
-rw-r--r-- | content/public/common/content_switches.h | 1 |
5 files changed, 11 insertions, 0 deletions
diff --git a/android_webview/lib/main/aw_main_delegate.cc b/android_webview/lib/main/aw_main_delegate.cc index defb379..ac2bac5 100644 --- a/android_webview/lib/main/aw_main_delegate.cc +++ b/android_webview/lib/main/aw_main_delegate.cc @@ -90,6 +90,9 @@ bool AwMainDelegate::BasicStartupComplete(int* exit_code) { // WebView does not yet support screen orientation locking. 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 // for Chrome to aggressively persist DOM Storage to minimize data loss. // http://crbug.com/479767 diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc index 4304006..8b0916a 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -1231,6 +1231,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( switches::kDisablePrefixedEncryptedMedia, switches::kDisableSeccompFilterSandbox, switches::kDisableSharedWorkers, + switches::kDisableSpeechAPI, switches::kDisableSVG1DOM, switches::kDisableThreadedCompositing, switches::kDisableThreadedScrolling, diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc index 7fae742..c7a38b4 100644 --- a/content/child/runtime_features.cc +++ b/content/child/runtime_features.cc @@ -124,6 +124,9 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( WebRuntimeFeatures::enableWebAudio(false); #endif + if (command_line.HasSwitch(switches::kDisableSpeechAPI)) + WebRuntimeFeatures::enableScriptedSpeech(false); + if (command_line.HasSwitch(switches::kDisableEncryptedMedia)) WebRuntimeFeatures::enableEncryptedMedia(false); diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc index e0d979f..d976210 100644 --- a/content/public/common/content_switches.cc +++ b/content/public/common/content_switches.cc @@ -242,6 +242,9 @@ const char kDisableSmoothScrolling[] = "disable-smooth-scrolling"; // Disables the use of a 3D software rasterizer. const char kDisableSoftwareRasterizer[] = "disable-software-rasterizer"; +// Disables the Web Speech API. +const char kDisableSpeechAPI[] = "disable-speech-api"; + // Disables SVG 1.1 DOM. const char kDisableSVG1DOM[] = "disable-svg1dom"; diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h index 920aeb5..0592559 100644 --- a/content/public/common/content_switches.h +++ b/content/public/common/content_switches.h @@ -81,6 +81,7 @@ CONTENT_EXPORT extern const char kDisableSharedWorkers[]; CONTENT_EXPORT extern const char kDisableSingleThreadProxyScheduler[]; CONTENT_EXPORT extern const char kDisableSmoothScrolling[]; CONTENT_EXPORT extern const char kDisableSoftwareRasterizer[]; +CONTENT_EXPORT extern const char kDisableSpeechAPI[]; CONTENT_EXPORT extern const char kDisableSVG1DOM[]; CONTENT_EXPORT extern const char kDisableTextBlobs[]; CONTENT_EXPORT extern const char kDisableThreadedCompositing[]; |