#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "third_party/blink/public/mojom/speech/speech_synthesis.mojom.h"
#include <math.h>
#include <stdint.h>
#include <utility>
#include "base/debug/alias.h"
#include "base/hash/md5_constexpr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/typed_macros.h"
#include "mojo/public/cpp/bindings/features.h"
#include "mojo/public/cpp/bindings/lib/default_construct_tag_internal.h"
#include "mojo/public/cpp/bindings/lib/generated_code_util.h"
#include "mojo/public/cpp/bindings/lib/message_internal.h"
#include "mojo/public/cpp/bindings/lib/proxy_to_responder.h"
#include "mojo/public/cpp/bindings/lib/send_message_helper.h"
#include "mojo/public/cpp/bindings/lib/serialization_util.h"
#include "mojo/public/cpp/bindings/lib/unserialized_message_context.h"
#include "mojo/public/cpp/bindings/lib/validate_params.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/mojo_buildflags.h"
#include "mojo/public/cpp/bindings/urgent_message_scope.h"
#include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value.h"
#include "third_party/blink/public/mojom/speech/speech_synthesis.mojom-params-data.h"
#include "third_party/blink/public/mojom/speech/speech_synthesis.mojom-shared-message-ids.h"
#include "third_party/blink/public/mojom/speech/speech_synthesis.mojom-import-headers.h"
#include "third_party/blink/public/mojom/speech/speech_synthesis.mojom-test-utils.h"
namespace blink::mojom {
SpeechSynthesisUtterance::SpeechSynthesisUtterance()
: … { … }
SpeechSynthesisUtterance::SpeechSynthesisUtterance(
const std::string& text_in,
const std::string& lang_in,
const std::string& voice_in,
double volume_in,
double rate_in,
double pitch_in)
: … { … }
SpeechSynthesisUtterance::~SpeechSynthesisUtterance() = default;
size_t SpeechSynthesisUtterance::Hash(size_t seed) const { … }
void SpeechSynthesisUtterance::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SpeechSynthesisUtterance::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
SpeechSynthesisVoice::SpeechSynthesisVoice()
: … { … }
SpeechSynthesisVoice::SpeechSynthesisVoice(
const std::string& voice_uri_in,
const std::string& name_in,
const std::string& lang_in,
bool is_local_service_in,
bool is_default_in)
: … { … }
SpeechSynthesisVoice::~SpeechSynthesisVoice() = default;
size_t SpeechSynthesisVoice::Hash(size_t seed) const { … }
void SpeechSynthesisVoice::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SpeechSynthesisVoice::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char SpeechSynthesisVoiceListObserver::Name_[] = …;
SpeechSynthesisVoiceListObserver::IPCStableHashFunction SpeechSynthesisVoiceListObserver::MessageToMethodInfo_(mojo::Message& message) { … }
const char* SpeechSynthesisVoiceListObserver::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t SpeechSynthesisVoiceListObserver::OnSetVoiceList_Sym::IPCStableHash() { … }
# endif
SpeechSynthesisVoiceListObserverProxy::SpeechSynthesisVoiceListObserverProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void SpeechSynthesisVoiceListObserverProxy::OnSetVoiceList(
std::vector<SpeechSynthesisVoicePtr> in_voice_list) { … }
bool SpeechSynthesisVoiceListObserverStubDispatch::Accept(
SpeechSynthesisVoiceListObserver* impl,
mojo::Message* message) { … }
bool SpeechSynthesisVoiceListObserverStubDispatch::AcceptWithResponder(
SpeechSynthesisVoiceListObserver* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kSpeechSynthesisVoiceListObserverValidationInfo[] = …;
bool SpeechSynthesisVoiceListObserverRequestValidator::Accept(mojo::Message* message) { … }
const char SpeechSynthesisClient::Name_[] = …;
SpeechSynthesisClient::IPCStableHashFunction SpeechSynthesisClient::MessageToMethodInfo_(mojo::Message& message) { … }
const char* SpeechSynthesisClient::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t SpeechSynthesisClient::OnStartedSpeaking_Sym::IPCStableHash() { … }
uint32_t SpeechSynthesisClient::OnFinishedSpeaking_Sym::IPCStableHash() { … }
uint32_t SpeechSynthesisClient::OnPausedSpeaking_Sym::IPCStableHash() { … }
uint32_t SpeechSynthesisClient::OnResumedSpeaking_Sym::IPCStableHash() { … }
uint32_t SpeechSynthesisClient::OnEncounteredWordBoundary_Sym::IPCStableHash() { … }
uint32_t SpeechSynthesisClient::OnEncounteredSentenceBoundary_Sym::IPCStableHash() { … }
uint32_t SpeechSynthesisClient::OnEncounteredSpeakingError_Sym::IPCStableHash() { … }
# endif
SpeechSynthesisClientProxy::SpeechSynthesisClientProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void SpeechSynthesisClientProxy::OnStartedSpeaking(
) { … }
void SpeechSynthesisClientProxy::OnFinishedSpeaking(
SpeechSynthesisErrorCode in_error_code) { … }
void SpeechSynthesisClientProxy::OnPausedSpeaking(
) { … }
void SpeechSynthesisClientProxy::OnResumedSpeaking(
) { … }
void SpeechSynthesisClientProxy::OnEncounteredWordBoundary(
uint32_t in_char_index, uint32_t in_char_length) { … }
void SpeechSynthesisClientProxy::OnEncounteredSentenceBoundary(
uint32_t in_char_index, uint32_t in_char_length) { … }
void SpeechSynthesisClientProxy::OnEncounteredSpeakingError(
) { … }
bool SpeechSynthesisClientStubDispatch::Accept(
SpeechSynthesisClient* impl,
mojo::Message* message) { … }
bool SpeechSynthesisClientStubDispatch::AcceptWithResponder(
SpeechSynthesisClient* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kSpeechSynthesisClientValidationInfo[] = …;
bool SpeechSynthesisClientRequestValidator::Accept(mojo::Message* message) { … }
const char SpeechSynthesis::Name_[] = …;
SpeechSynthesis::IPCStableHashFunction SpeechSynthesis::MessageToMethodInfo_(mojo::Message& message) { … }
const char* SpeechSynthesis::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t SpeechSynthesis::AddVoiceListObserver_Sym::IPCStableHash() { … }
uint32_t SpeechSynthesis::Speak_Sym::IPCStableHash() { … }
uint32_t SpeechSynthesis::Pause_Sym::IPCStableHash() { … }
uint32_t SpeechSynthesis::Resume_Sym::IPCStableHash() { … }
uint32_t SpeechSynthesis::Cancel_Sym::IPCStableHash() { … }
# endif
SpeechSynthesisProxy::SpeechSynthesisProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void SpeechSynthesisProxy::AddVoiceListObserver(
::mojo::PendingRemote<SpeechSynthesisVoiceListObserver> in_observer) { … }
void SpeechSynthesisProxy::Speak(
SpeechSynthesisUtterancePtr in_utterance, ::mojo::PendingRemote<SpeechSynthesisClient> in_client) { … }
void SpeechSynthesisProxy::Pause(
) { … }
void SpeechSynthesisProxy::Resume(
) { … }
void SpeechSynthesisProxy::Cancel(
) { … }
bool SpeechSynthesisStubDispatch::Accept(
SpeechSynthesis* impl,
mojo::Message* message) { … }
bool SpeechSynthesisStubDispatch::AcceptWithResponder(
SpeechSynthesis* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kSpeechSynthesisValidationInfo[] = …;
bool SpeechSynthesisRequestValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::blink::mojom::SpeechSynthesisUtterance::DataView, ::blink::mojom::SpeechSynthesisUtterancePtr>::Read(
::blink::mojom::SpeechSynthesisUtterance::DataView input,
::blink::mojom::SpeechSynthesisUtterancePtr* output) { … }
bool StructTraits<::blink::mojom::SpeechSynthesisVoice::DataView, ::blink::mojom::SpeechSynthesisVoicePtr>::Read(
::blink::mojom::SpeechSynthesisVoice::DataView input,
::blink::mojom::SpeechSynthesisVoicePtr* output) { … }
}
namespace blink::mojom {
void SpeechSynthesisVoiceListObserverInterceptorForTesting::OnSetVoiceList(std::vector<SpeechSynthesisVoicePtr> voice_list) { … }
SpeechSynthesisVoiceListObserverAsyncWaiter::SpeechSynthesisVoiceListObserverAsyncWaiter(
SpeechSynthesisVoiceListObserver* proxy) : … { … }
SpeechSynthesisVoiceListObserverAsyncWaiter::~SpeechSynthesisVoiceListObserverAsyncWaiter() = default;
void SpeechSynthesisClientInterceptorForTesting::OnStartedSpeaking() { … }
void SpeechSynthesisClientInterceptorForTesting::OnFinishedSpeaking(SpeechSynthesisErrorCode error_code) { … }
void SpeechSynthesisClientInterceptorForTesting::OnPausedSpeaking() { … }
void SpeechSynthesisClientInterceptorForTesting::OnResumedSpeaking() { … }
void SpeechSynthesisClientInterceptorForTesting::OnEncounteredWordBoundary(uint32_t char_index, uint32_t char_length) { … }
void SpeechSynthesisClientInterceptorForTesting::OnEncounteredSentenceBoundary(uint32_t char_index, uint32_t char_length) { … }
void SpeechSynthesisClientInterceptorForTesting::OnEncounteredSpeakingError() { … }
SpeechSynthesisClientAsyncWaiter::SpeechSynthesisClientAsyncWaiter(
SpeechSynthesisClient* proxy) : … { … }
SpeechSynthesisClientAsyncWaiter::~SpeechSynthesisClientAsyncWaiter() = default;
void SpeechSynthesisInterceptorForTesting::AddVoiceListObserver(::mojo::PendingRemote<SpeechSynthesisVoiceListObserver> observer) { … }
void SpeechSynthesisInterceptorForTesting::Speak(SpeechSynthesisUtterancePtr utterance, ::mojo::PendingRemote<SpeechSynthesisClient> client) { … }
void SpeechSynthesisInterceptorForTesting::Pause() { … }
void SpeechSynthesisInterceptorForTesting::Resume() { … }
void SpeechSynthesisInterceptorForTesting::Cancel() { … }
SpeechSynthesisAsyncWaiter::SpeechSynthesisAsyncWaiter(
SpeechSynthesis* proxy) : … { … }
SpeechSynthesisAsyncWaiter::~SpeechSynthesisAsyncWaiter() = default;
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif