#83 remove the use of TtsPlatformImplAndroid::TtsPlatformImplAndroid

This commit is contained in:
Carmelo Messina
2023-12-13 09:09:31 +01:00
parent 8930409029
commit 9185ce8caf
@@ -14,13 +14,15 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
.../renderer/chrome_content_renderer_client.cc | 2 +-
.../renderer/content_settings_agent_impl.cc | 9 ++++++++-
.../renderer/content_settings_agent_impl.h | 2 ++
content/browser/speech/tts_android.cc | 2 +-
content/browser/speech/tts_win.cc | 2 +-
.../Disable-speechSynthesis-getVoices-API.inc | 8 ++++++++
.../Disable-speechSynthesis-getVoices-API.inc | 2 ++
.../Disable-speechSynthesis-getVoices-API.inc | 3 +++
.../Disable-speechSynthesis-getVoices-API.inc | 1 +
.../platform/web_content_settings_client.h | 2 ++
.../renderer/modules/speech/speech_synthesis.cc | 17 ++++++++++++++---
9 files changed, 41 insertions(+), 5 deletions(-)
11 files changed, 43 insertions(+), 7 deletions(-)
create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Disable-speechSynthesis-getVoices-API.inc
create mode 100644 cromite_flags/media/base/media_switches_cc/Disable-speechSynthesis-getVoices-API.inc
create mode 100644 cromite_flags/third_party/blink/common/features_cc/Disable-speechSynthesis-getVoices-API.inc
@@ -76,6 +78,30 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.h
protected:
// Allow this to be overridden by tests.
virtual void BindContentSettingsManager(
diff --git a/content/browser/speech/tts_android.cc b/content/browser/speech/tts_android.cc
--- a/content/browser/speech/tts_android.cc
+++ b/content/browser/speech/tts_android.cc
@@ -42,7 +42,7 @@ TtsPlatformImplAndroid::~TtsPlatformImplAndroid() {
}
bool TtsPlatformImplAndroid::PlatformImplSupported() {
- return true;
+ return false;
}
bool TtsPlatformImplAndroid::PlatformImplInitialized() {
diff --git a/content/browser/speech/tts_win.cc b/content/browser/speech/tts_win.cc
--- a/content/browser/speech/tts_win.cc
+++ b/content/browser/speech/tts_win.cc
@@ -155,7 +155,7 @@ class TtsPlatformImplWin : public TtsPlatformImpl {
TtsPlatformImplWin(const TtsPlatformImplWin&) = delete;
TtsPlatformImplWin& operator=(const TtsPlatformImplWin&) = delete;
- bool PlatformImplSupported() override { return true; }
+ bool PlatformImplSupported() override { return false; }
bool PlatformImplInitialized() override;
void Speak(int utterance_id,
diff --git a/cromite_flags/chrome/browser/about_flags_cc/Disable-speechSynthesis-getVoices-API.inc b/cromite_flags/chrome/browser/about_flags_cc/Disable-speechSynthesis-getVoices-API.inc
new file mode 100644
--- /dev/null