#include "third_party/blink/renderer/modules/speech/speech_synthesis.h"
#include <tuple>
#include "build/build_config.h"
#include "third_party/blink/public/common/privacy_budget/identifiability_metric_builder.h"
#include "third_party/blink/public/common/privacy_budget/identifiability_study_settings.h"
#include "third_party/blink/public/common/privacy_budget/identifiable_token.h"
#include "third_party/blink/public/common/privacy_budget/identifiable_token_builder.h"
#include "third_party/blink/public/common/thread_safe_browser_interface_broker_proxy.h"
#include "third_party/blink/public/platform/browser_interface_broker_proxy.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_speech_synthesis_error_event_init.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_speech_synthesis_event_init.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/frame/deprecation/deprecation.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/web_feature.h"
#include "third_party/blink/renderer/core/html/media/autoplay_policy.h"
#include "third_party/blink/renderer/core/timing/dom_window_performance.h"
#include "third_party/blink/renderer/core/timing/performance.h"
#include "third_party/blink/renderer/modules/speech/speech_synthesis_error_event.h"
#include "third_party/blink/renderer/modules/speech/speech_synthesis_event.h"
#include "third_party/blink/renderer/modules/speech/speech_synthesis_voice.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
#include "third_party/blink/renderer/platform/privacy_budget/identifiability_digest_helpers.h"
namespace blink {
const char SpeechSynthesis::kSupplementName[] = …;
SpeechSynthesisBase* SpeechSynthesis::Create(LocalDOMWindow& window) { … }
SpeechSynthesis* SpeechSynthesis::speechSynthesis(LocalDOMWindow& window) { … }
void SpeechSynthesis::CreateForTesting(
LocalDOMWindow& window,
mojo::PendingRemote<mojom::blink::SpeechSynthesis> mojom_synthesis) { … }
SpeechSynthesis::SpeechSynthesis(LocalDOMWindow& window)
: … { … }
void SpeechSynthesis::OnSetVoiceList(
Vector<mojom::blink::SpeechSynthesisVoicePtr> mojom_voices) { … }
const HeapVector<Member<SpeechSynthesisVoice>>& SpeechSynthesis::getVoices() { … }
void SpeechSynthesis::RecordVoicesForIdentifiability() const { … }
bool SpeechSynthesis::Speaking() const { … }
bool SpeechSynthesis::pending() const { … }
bool SpeechSynthesis::paused() const { … }
void SpeechSynthesis::Speak(const String& text, const String& lang) { … }
void SpeechSynthesis::speak(ScriptState* script_state,
SpeechSynthesisUtterance* utterance) { … }
void SpeechSynthesis::Cancel() { … }
void SpeechSynthesis::Pause() { … }
void SpeechSynthesis::Resume() { … }
void SpeechSynthesis::DidStartSpeaking(SpeechSynthesisUtterance* utterance) { … }
void SpeechSynthesis::DidPauseSpeaking(SpeechSynthesisUtterance* utterance) { … }
void SpeechSynthesis::DidResumeSpeaking(SpeechSynthesisUtterance* utterance) { … }
void SpeechSynthesis::DidFinishSpeaking(
SpeechSynthesisUtterance* utterance,
mojom::blink::SpeechSynthesisErrorCode error_code) { … }
void SpeechSynthesis::SpeakingErrorOccurred(
SpeechSynthesisUtterance* utterance) { … }
void SpeechSynthesis::WordBoundaryEventOccurred(
SpeechSynthesisUtterance* utterance,
unsigned char_index,
unsigned char_length) { … }
void SpeechSynthesis::SentenceBoundaryEventOccurred(
SpeechSynthesisUtterance* utterance,
unsigned char_index,
unsigned char_length) { … }
void SpeechSynthesis::VoicesDidChange() { … }
void SpeechSynthesis::StartSpeakingImmediately() { … }
void SpeechSynthesis::HandleSpeakingCompleted(
SpeechSynthesisUtterance* utterance,
mojom::blink::SpeechSynthesisErrorCode error_code) { … }
void SpeechSynthesis::FireEvent(const AtomicString& type,
SpeechSynthesisUtterance* utterance,
uint32_t char_index,
uint32_t char_length,
const String& name) { … }
void SpeechSynthesis::FireErrorEvent(SpeechSynthesisUtterance* utterance,
uint32_t char_index,
const String& error) { … }
SpeechSynthesisUtterance* SpeechSynthesis::CurrentSpeechUtterance() const { … }
ExecutionContext* SpeechSynthesis::GetExecutionContext() const { … }
void SpeechSynthesis::Trace(Visitor* visitor) const { … }
bool SpeechSynthesis::GetElapsedTimeMillis(double* millis) { … }
bool SpeechSynthesis::IsAllowedToStartByAutoplay() const { … }
void SpeechSynthesis::SetMojomSynthesisForTesting(
mojo::PendingRemote<mojom::blink::SpeechSynthesis> mojom_synthesis) { … }
mojom::blink::SpeechSynthesis* SpeechSynthesis::TryEnsureMojomSynthesis() { … }
const AtomicString& SpeechSynthesis::InterfaceName() const { … }
}