#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "third_party/blink/public/mojom/handwriting/handwriting.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/handwriting/handwriting.mojom-params-data.h"
#include "third_party/blink/public/mojom/handwriting/handwriting.mojom-shared-message-ids.h"
#include "third_party/blink/public/mojom/handwriting/handwriting.mojom-import-headers.h"
#include "third_party/blink/public/mojom/handwriting/handwriting.mojom-test-utils.h"
namespace handwriting::mojom {
HandwritingPoint::HandwritingPoint()
: … { … }
HandwritingPoint::HandwritingPoint(
const ::gfx::PointF& location_in,
std::optional<::base::TimeDelta> t_in)
: … { … }
HandwritingPoint::~HandwritingPoint() = default;
void HandwritingPoint::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool HandwritingPoint::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
HandwritingStroke::HandwritingStroke()
: … { … }
HandwritingStroke::HandwritingStroke(
std::vector<HandwritingPointPtr> points_in)
: … { … }
HandwritingStroke::~HandwritingStroke() = default;
void HandwritingStroke::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool HandwritingStroke::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
HandwritingDrawingSegment::HandwritingDrawingSegment()
: … { … }
HandwritingDrawingSegment::HandwritingDrawingSegment(
uint32_t stroke_index_in,
uint32_t begin_point_index_in,
uint32_t end_point_index_in)
: … { … }
HandwritingDrawingSegment::~HandwritingDrawingSegment() = default;
size_t HandwritingDrawingSegment::Hash(size_t seed) const { … }
void HandwritingDrawingSegment::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool HandwritingDrawingSegment::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
HandwritingSegment::HandwritingSegment()
: … { … }
HandwritingSegment::HandwritingSegment(
const std::string& grapheme_in,
uint32_t begin_index_in,
uint32_t end_index_in,
std::vector<HandwritingDrawingSegmentPtr> drawing_segments_in)
: … { … }
HandwritingSegment::~HandwritingSegment() = default;
void HandwritingSegment::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool HandwritingSegment::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
HandwritingPrediction::HandwritingPrediction()
: … { … }
HandwritingPrediction::HandwritingPrediction(
const std::string& text_in,
std::vector<HandwritingSegmentPtr> segmentation_result_in)
: … { … }
HandwritingPrediction::~HandwritingPrediction() = default;
void HandwritingPrediction::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool HandwritingPrediction::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
HandwritingHints::HandwritingHints()
: … { … }
HandwritingHints::HandwritingHints(
const std::string& recognition_type_in,
const std::string& input_type_in,
const std::optional<std::string>& text_context_in,
uint32_t alternatives_in)
: … { … }
HandwritingHints::~HandwritingHints() = default;
void HandwritingHints::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool HandwritingHints::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
HandwritingHintsQueryResult::HandwritingHintsQueryResult()
: … { … }
HandwritingHintsQueryResult::HandwritingHintsQueryResult(
std::vector<HandwritingRecognitionType> recognition_type_in,
std::vector<HandwritingInputType> input_type_in,
bool text_context_in,
bool alternatives_in)
: … { … }
HandwritingHintsQueryResult::~HandwritingHintsQueryResult() = default;
void HandwritingHintsQueryResult::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool HandwritingHintsQueryResult::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
QueryHandwritingRecognizerResult::QueryHandwritingRecognizerResult()
: … { … }
QueryHandwritingRecognizerResult::QueryHandwritingRecognizerResult(
bool text_alternatives_in,
bool text_segmentation_in,
HandwritingHintsQueryResultPtr hints_in)
: … { … }
QueryHandwritingRecognizerResult::~QueryHandwritingRecognizerResult() = default;
void QueryHandwritingRecognizerResult::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool QueryHandwritingRecognizerResult::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
HandwritingModelConstraint::HandwritingModelConstraint()
: … { … }
HandwritingModelConstraint::HandwritingModelConstraint(
std::vector<std::string> languages_in)
: … { … }
HandwritingModelConstraint::~HandwritingModelConstraint() = default;
void HandwritingModelConstraint::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool HandwritingModelConstraint::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char HandwritingRecognizer::Name_[] = …;
HandwritingRecognizer::IPCStableHashFunction HandwritingRecognizer::MessageToMethodInfo_(mojo::Message& message) { … }
const char* HandwritingRecognizer::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t HandwritingRecognizer::GetPrediction_Sym::IPCStableHash() { … }
# endif
class HandwritingRecognizer_GetPrediction_ForwardToCallback
: public mojo::MessageReceiver { … };
HandwritingRecognizerProxy::HandwritingRecognizerProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void HandwritingRecognizerProxy::GetPrediction(
std::vector<HandwritingStrokePtr> in_strokes, HandwritingHintsPtr in_hints, GetPredictionCallback callback) { … }
class HandwritingRecognizer_GetPrediction_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool HandwritingRecognizer_GetPrediction_ForwardToCallback::Accept(
mojo::Message* message) { … }
void HandwritingRecognizer_GetPrediction_ProxyToResponder::Run(
std::optional<std::vector<HandwritingPredictionPtr>> in_prediction) { … }
bool HandwritingRecognizerStubDispatch::Accept(
HandwritingRecognizer* impl,
mojo::Message* message) { … }
bool HandwritingRecognizerStubDispatch::AcceptWithResponder(
HandwritingRecognizer* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kHandwritingRecognizerValidationInfo[] = …;
bool HandwritingRecognizerRequestValidator::Accept(mojo::Message* message) { … }
bool HandwritingRecognizerResponseValidator::Accept(mojo::Message* message) { … }
const char HandwritingRecognitionService::Name_[] = …;
HandwritingRecognitionService::IPCStableHashFunction HandwritingRecognitionService::MessageToMethodInfo_(mojo::Message& message) { … }
const char* HandwritingRecognitionService::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t HandwritingRecognitionService::CreateHandwritingRecognizer_Sym::IPCStableHash() { … }
uint32_t HandwritingRecognitionService::QueryHandwritingRecognizer_Sym::IPCStableHash() { … }
# endif
class HandwritingRecognitionService_CreateHandwritingRecognizer_ForwardToCallback
: public mojo::MessageReceiver { … };
class HandwritingRecognitionService_QueryHandwritingRecognizer_ForwardToCallback
: public mojo::MessageReceiver { … };
HandwritingRecognitionServiceProxy::HandwritingRecognitionServiceProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void HandwritingRecognitionServiceProxy::CreateHandwritingRecognizer(
HandwritingModelConstraintPtr in_constraint, CreateHandwritingRecognizerCallback callback) { … }
void HandwritingRecognitionServiceProxy::QueryHandwritingRecognizer(
HandwritingModelConstraintPtr in_constraint, QueryHandwritingRecognizerCallback callback) { … }
class HandwritingRecognitionService_CreateHandwritingRecognizer_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool HandwritingRecognitionService_CreateHandwritingRecognizer_ForwardToCallback::Accept(
mojo::Message* message) { … }
void HandwritingRecognitionService_CreateHandwritingRecognizer_ProxyToResponder::Run(
CreateHandwritingRecognizerResult in_result, ::mojo::PendingRemote<HandwritingRecognizer> in_handwriting_recognizer) { … }
class HandwritingRecognitionService_QueryHandwritingRecognizer_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool HandwritingRecognitionService_QueryHandwritingRecognizer_ForwardToCallback::Accept(
mojo::Message* message) { … }
void HandwritingRecognitionService_QueryHandwritingRecognizer_ProxyToResponder::Run(
QueryHandwritingRecognizerResultPtr in_result) { … }
bool HandwritingRecognitionServiceStubDispatch::Accept(
HandwritingRecognitionService* impl,
mojo::Message* message) { … }
bool HandwritingRecognitionServiceStubDispatch::AcceptWithResponder(
HandwritingRecognitionService* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kHandwritingRecognitionServiceValidationInfo[] = …;
bool HandwritingRecognitionServiceRequestValidator::Accept(mojo::Message* message) { … }
bool HandwritingRecognitionServiceResponseValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::handwriting::mojom::HandwritingPoint::DataView, ::handwriting::mojom::HandwritingPointPtr>::Read(
::handwriting::mojom::HandwritingPoint::DataView input,
::handwriting::mojom::HandwritingPointPtr* output) { … }
bool StructTraits<::handwriting::mojom::HandwritingStroke::DataView, ::handwriting::mojom::HandwritingStrokePtr>::Read(
::handwriting::mojom::HandwritingStroke::DataView input,
::handwriting::mojom::HandwritingStrokePtr* output) { … }
bool StructTraits<::handwriting::mojom::HandwritingDrawingSegment::DataView, ::handwriting::mojom::HandwritingDrawingSegmentPtr>::Read(
::handwriting::mojom::HandwritingDrawingSegment::DataView input,
::handwriting::mojom::HandwritingDrawingSegmentPtr* output) { … }
bool StructTraits<::handwriting::mojom::HandwritingSegment::DataView, ::handwriting::mojom::HandwritingSegmentPtr>::Read(
::handwriting::mojom::HandwritingSegment::DataView input,
::handwriting::mojom::HandwritingSegmentPtr* output) { … }
bool StructTraits<::handwriting::mojom::HandwritingPrediction::DataView, ::handwriting::mojom::HandwritingPredictionPtr>::Read(
::handwriting::mojom::HandwritingPrediction::DataView input,
::handwriting::mojom::HandwritingPredictionPtr* output) { … }
bool StructTraits<::handwriting::mojom::HandwritingHints::DataView, ::handwriting::mojom::HandwritingHintsPtr>::Read(
::handwriting::mojom::HandwritingHints::DataView input,
::handwriting::mojom::HandwritingHintsPtr* output) { … }
bool StructTraits<::handwriting::mojom::HandwritingHintsQueryResult::DataView, ::handwriting::mojom::HandwritingHintsQueryResultPtr>::Read(
::handwriting::mojom::HandwritingHintsQueryResult::DataView input,
::handwriting::mojom::HandwritingHintsQueryResultPtr* output) { … }
bool StructTraits<::handwriting::mojom::QueryHandwritingRecognizerResult::DataView, ::handwriting::mojom::QueryHandwritingRecognizerResultPtr>::Read(
::handwriting::mojom::QueryHandwritingRecognizerResult::DataView input,
::handwriting::mojom::QueryHandwritingRecognizerResultPtr* output) { … }
bool StructTraits<::handwriting::mojom::HandwritingModelConstraint::DataView, ::handwriting::mojom::HandwritingModelConstraintPtr>::Read(
::handwriting::mojom::HandwritingModelConstraint::DataView input,
::handwriting::mojom::HandwritingModelConstraintPtr* output) { … }
}
namespace handwriting::mojom {
void HandwritingRecognizerInterceptorForTesting::GetPrediction(std::vector<HandwritingStrokePtr> strokes, HandwritingHintsPtr hints, GetPredictionCallback callback) { … }
HandwritingRecognizerAsyncWaiter::HandwritingRecognizerAsyncWaiter(
HandwritingRecognizer* proxy) : … { … }
HandwritingRecognizerAsyncWaiter::~HandwritingRecognizerAsyncWaiter() = default;
void HandwritingRecognizerAsyncWaiter::GetPrediction(
std::vector<HandwritingStrokePtr> strokes, HandwritingHintsPtr hints, std::optional<std::vector<HandwritingPredictionPtr>>* out_prediction) { … }
std::optional<std::vector<HandwritingPredictionPtr>> HandwritingRecognizerAsyncWaiter::GetPrediction(
std::vector<HandwritingStrokePtr> strokes, HandwritingHintsPtr hints) { … }
void HandwritingRecognitionServiceInterceptorForTesting::CreateHandwritingRecognizer(HandwritingModelConstraintPtr constraint, CreateHandwritingRecognizerCallback callback) { … }
void HandwritingRecognitionServiceInterceptorForTesting::QueryHandwritingRecognizer(HandwritingModelConstraintPtr constraint, QueryHandwritingRecognizerCallback callback) { … }
HandwritingRecognitionServiceAsyncWaiter::HandwritingRecognitionServiceAsyncWaiter(
HandwritingRecognitionService* proxy) : … { … }
HandwritingRecognitionServiceAsyncWaiter::~HandwritingRecognitionServiceAsyncWaiter() = default;
void HandwritingRecognitionServiceAsyncWaiter::CreateHandwritingRecognizer(
HandwritingModelConstraintPtr constraint, CreateHandwritingRecognizerResult* out_result, ::mojo::PendingRemote<HandwritingRecognizer>* out_handwriting_recognizer) { … }
void HandwritingRecognitionServiceAsyncWaiter::QueryHandwritingRecognizer(
HandwritingModelConstraintPtr constraint, QueryHandwritingRecognizerResultPtr* out_result) { … }
QueryHandwritingRecognizerResultPtr HandwritingRecognitionServiceAsyncWaiter::QueryHandwritingRecognizer(
HandwritingModelConstraintPtr constraint) { … }
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif