#ifndef MEDIA_MOJO_MOJOM_SPEECH_RECOGNITION_MOJOM_H_
#define MEDIA_MOJO_MOJOM_SPEECH_RECOGNITION_MOJOM_H_
#include <stdint.h>
#include <limits>
#include <optional>
#include <type_traits>
#include <utility>
#include "base/types/cxx23_to_underlying.h"
#include "mojo/public/cpp/bindings/clone_traits.h"
#include "mojo/public/cpp/bindings/equals_traits.h"
#include "mojo/public/cpp/bindings/lib/serialization.h"
#include "mojo/public/cpp/bindings/struct_ptr.h"
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "mojo/public/cpp/bindings/union_traits.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value_forward.h"
#include "media/mojo/mojom/speech_recognition.mojom-features.h"
#include "media/mojo/mojom/speech_recognition.mojom-shared.h"
#include "media/mojo/mojom/speech_recognition.mojom-forward.h"
#include "media/mojo/mojom/audio_data.mojom-forward.h"
#include "media/mojo/mojom/speech_recognition_audio_forwarder.mojom-forward.h"
#include "media/mojo/mojom/speech_recognizer.mojom-forward.h"
#include "mojo/public/mojom/base/time.mojom.h"
#include "mojo/public/mojom/base/unguessable_token.mojom.h"
#include "ui/gfx/geometry/mojom/geometry.mojom.h"
#include <string>
#include <vector>
#include "mojo/public/cpp/bindings/lib/control_message_handler.h"
#include "mojo/public/cpp/bindings/lib/message_size_estimator.h"
#include "mojo/public/cpp/bindings/raw_ptr_impl_ref_traits.h"
#include "media/mojo/mojom/speech_recognition_result.h"
#include "media/mojo/mojom/speech_recognition_result_mojom_traits.h"
namespace media::mojom {
class SpeechRecognitionContextProxy;
template <typename ImplRefTraits>
class SpeechRecognitionContextStub;
class SpeechRecognitionContextRequestValidator;
class SpeechRecognitionContextResponseValidator;
class SpeechRecognitionContext
: public SpeechRecognitionContextInterfaceBase { … };
class SpeechRecognitionRecognizerProxy;
template <typename ImplRefTraits>
class SpeechRecognitionRecognizerStub;
class SpeechRecognitionRecognizerRequestValidator;
class SpeechRecognitionRecognizer
: public SpeechRecognitionRecognizerInterfaceBase { … };
class SpeechRecognitionRecognizerClientProxy;
template <typename ImplRefTraits>
class SpeechRecognitionRecognizerClientStub;
class SpeechRecognitionRecognizerClientRequestValidator;
class SpeechRecognitionRecognizerClientResponseValidator;
class SpeechRecognitionRecognizerClient
: public SpeechRecognitionRecognizerClientInterfaceBase { … };
class SpeechRecognitionBrowserObserverProxy;
template <typename ImplRefTraits>
class SpeechRecognitionBrowserObserverStub;
class SpeechRecognitionBrowserObserverRequestValidator;
class SpeechRecognitionBrowserObserver
: public SpeechRecognitionBrowserObserverInterfaceBase { … };
class SpeechRecognitionSurfaceProxy;
template <typename ImplRefTraits>
class SpeechRecognitionSurfaceStub;
class SpeechRecognitionSurfaceRequestValidator;
class SpeechRecognitionSurfaceResponseValidator;
class SpeechRecognitionSurface
: public SpeechRecognitionSurfaceInterfaceBase { … };
class SpeechRecognitionSurfaceClientProxy;
template <typename ImplRefTraits>
class SpeechRecognitionSurfaceClientStub;
class SpeechRecognitionSurfaceClientRequestValidator;
class SpeechRecognitionSurfaceClient
: public SpeechRecognitionSurfaceClientInterfaceBase { … };
class SpeechRecognitionClientBrowserInterfaceProxy;
template <typename ImplRefTraits>
class SpeechRecognitionClientBrowserInterfaceStub;
class SpeechRecognitionClientBrowserInterfaceRequestValidator;
class SpeechRecognitionClientBrowserInterface
: public SpeechRecognitionClientBrowserInterfaceInterfaceBase { … };
class SpeechRecognitionContextProxy
: public SpeechRecognitionContext { … };
class SpeechRecognitionRecognizerProxy
: public SpeechRecognitionRecognizer { … };
class SpeechRecognitionRecognizerClientProxy
: public SpeechRecognitionRecognizerClient { … };
class SpeechRecognitionBrowserObserverProxy
: public SpeechRecognitionBrowserObserver { … };
class SpeechRecognitionSurfaceProxy
: public SpeechRecognitionSurface { … };
class SpeechRecognitionSurfaceClientProxy
: public SpeechRecognitionSurfaceClient { … };
class SpeechRecognitionClientBrowserInterfaceProxy
: public SpeechRecognitionClientBrowserInterface { … };
class SpeechRecognitionContextStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<SpeechRecognitionContext>>
class SpeechRecognitionContextStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
SpeechRecognitionContextStub() = default;
~SpeechRecognitionContextStub() override = default;
void set_sink(ImplPointerType sink) { … }
ImplPointerType& sink() { … }
bool Accept(mojo::Message* message) override { … }
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override { … }
private:
ImplPointerType sink_;
};
class SpeechRecognitionRecognizerStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<SpeechRecognitionRecognizer>>
class SpeechRecognitionRecognizerStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
SpeechRecognitionRecognizerStub() = default;
~SpeechRecognitionRecognizerStub() override = default;
void set_sink(ImplPointerType sink) { … }
ImplPointerType& sink() { … }
bool Accept(mojo::Message* message) override { … }
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override { … }
private:
ImplPointerType sink_;
};
class SpeechRecognitionRecognizerClientStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<SpeechRecognitionRecognizerClient>>
class SpeechRecognitionRecognizerClientStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
SpeechRecognitionRecognizerClientStub() = default;
~SpeechRecognitionRecognizerClientStub() override = default;
void set_sink(ImplPointerType sink) { … }
ImplPointerType& sink() { … }
bool Accept(mojo::Message* message) override { … }
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override { … }
private:
ImplPointerType sink_;
};
class SpeechRecognitionBrowserObserverStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<SpeechRecognitionBrowserObserver>>
class SpeechRecognitionBrowserObserverStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
SpeechRecognitionBrowserObserverStub() = default;
~SpeechRecognitionBrowserObserverStub() override = default;
void set_sink(ImplPointerType sink) { … }
ImplPointerType& sink() { … }
bool Accept(mojo::Message* message) override { … }
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override { … }
private:
ImplPointerType sink_;
};
class SpeechRecognitionSurfaceStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<SpeechRecognitionSurface>>
class SpeechRecognitionSurfaceStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
SpeechRecognitionSurfaceStub() = default;
~SpeechRecognitionSurfaceStub() override = default;
void set_sink(ImplPointerType sink) { … }
ImplPointerType& sink() { … }
bool Accept(mojo::Message* message) override { … }
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override { … }
private:
ImplPointerType sink_;
};
class SpeechRecognitionSurfaceClientStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<SpeechRecognitionSurfaceClient>>
class SpeechRecognitionSurfaceClientStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
SpeechRecognitionSurfaceClientStub() = default;
~SpeechRecognitionSurfaceClientStub() override = default;
void set_sink(ImplPointerType sink) { … }
ImplPointerType& sink() { … }
bool Accept(mojo::Message* message) override { … }
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override { … }
private:
ImplPointerType sink_;
};
class SpeechRecognitionClientBrowserInterfaceStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<SpeechRecognitionClientBrowserInterface>>
class SpeechRecognitionClientBrowserInterfaceStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
SpeechRecognitionClientBrowserInterfaceStub() = default;
~SpeechRecognitionClientBrowserInterfaceStub() override = default;
void set_sink(ImplPointerType sink) { … }
ImplPointerType& sink() { … }
bool Accept(mojo::Message* message) override { … }
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override { … }
private:
ImplPointerType sink_;
};
class SpeechRecognitionContextRequestValidator : public mojo::MessageReceiver { … };
class SpeechRecognitionRecognizerRequestValidator : public mojo::MessageReceiver { … };
class SpeechRecognitionRecognizerClientRequestValidator : public mojo::MessageReceiver { … };
class SpeechRecognitionBrowserObserverRequestValidator : public mojo::MessageReceiver { … };
class SpeechRecognitionSurfaceRequestValidator : public mojo::MessageReceiver { … };
class SpeechRecognitionSurfaceClientRequestValidator : public mojo::MessageReceiver { … };
class SpeechRecognitionClientBrowserInterfaceRequestValidator : public mojo::MessageReceiver { … };
class SpeechRecognitionContextResponseValidator : public mojo::MessageReceiver { … };
class SpeechRecognitionRecognizerClientResponseValidator : public mojo::MessageReceiver { … };
class SpeechRecognitionSurfaceResponseValidator : public mojo::MessageReceiver { … };
class LanguageIdentificationEvent { … };
template <typename T, LanguageIdentificationEvent::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, LanguageIdentificationEvent::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, LanguageIdentificationEvent::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, LanguageIdentificationEvent::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class HypothesisParts { … };
template <typename T, HypothesisParts::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, HypothesisParts::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, HypothesisParts::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, HypothesisParts::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class TimingInformation { … };
template <typename T, TimingInformation::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, TimingInformation::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, TimingInformation::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, TimingInformation::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class SpeechRecognitionResult { … };
template <typename T, SpeechRecognitionResult::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, SpeechRecognitionResult::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, SpeechRecognitionResult::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, SpeechRecognitionResult::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class SpeechRecognitionSurfaceMetadata { … };
template <typename T, SpeechRecognitionSurfaceMetadata::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, SpeechRecognitionSurfaceMetadata::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, SpeechRecognitionSurfaceMetadata::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, SpeechRecognitionSurfaceMetadata::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class SpeechRecognitionOptions { … };
template <typename T, SpeechRecognitionOptions::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, SpeechRecognitionOptions::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, SpeechRecognitionOptions::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, SpeechRecognitionOptions::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
HypothesisPartsPtr HypothesisParts::Clone() const { … }
template <typename T, HypothesisParts::EnableIfSame<T>*>
bool HypothesisParts::Equals(const T& other_struct) const { … }
template <typename T, HypothesisParts::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
TimingInformationPtr TimingInformation::Clone() const { … }
template <typename T, TimingInformation::EnableIfSame<T>*>
bool TimingInformation::Equals(const T& other_struct) const { … }
template <typename T, TimingInformation::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
SpeechRecognitionResultPtr SpeechRecognitionResult::Clone() const { … }
template <typename T, SpeechRecognitionResult::EnableIfSame<T>*>
bool SpeechRecognitionResult::Equals(const T& other_struct) const { … }
template <typename T, SpeechRecognitionResult::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
LanguageIdentificationEventPtr LanguageIdentificationEvent::Clone() const { … }
template <typename T, LanguageIdentificationEvent::EnableIfSame<T>*>
bool LanguageIdentificationEvent::Equals(const T& other_struct) const { … }
template <typename T, LanguageIdentificationEvent::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
SpeechRecognitionSurfaceMetadataPtr SpeechRecognitionSurfaceMetadata::Clone() const { … }
template <typename T, SpeechRecognitionSurfaceMetadata::EnableIfSame<T>*>
bool SpeechRecognitionSurfaceMetadata::Equals(const T& other_struct) const { … }
template <typename T, SpeechRecognitionSurfaceMetadata::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
SpeechRecognitionOptionsPtr SpeechRecognitionOptions::Clone() const { … }
template <typename T, SpeechRecognitionOptions::EnableIfSame<T>*>
bool SpeechRecognitionOptions::Equals(const T& other_struct) const { … }
template <typename T, SpeechRecognitionOptions::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
}
namespace mojo {
template <>
struct StructTraits<::media::mojom::HypothesisParts::DataView,
::media::mojom::HypothesisPartsPtr> { … };
template <>
struct StructTraits<::media::mojom::TimingInformation::DataView,
::media::mojom::TimingInformationPtr> { … };
template <>
struct StructTraits<::media::mojom::SpeechRecognitionResult::DataView,
::media::mojom::SpeechRecognitionResultPtr> { … };
template <>
struct StructTraits<::media::mojom::LanguageIdentificationEvent::DataView,
::media::mojom::LanguageIdentificationEventPtr> { … };
template <>
struct StructTraits<::media::mojom::SpeechRecognitionSurfaceMetadata::DataView,
::media::mojom::SpeechRecognitionSurfaceMetadataPtr> { … };
template <>
struct StructTraits<::media::mojom::SpeechRecognitionOptions::DataView,
::media::mojom::SpeechRecognitionOptionsPtr> { … };
}
#endif