#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "third_party/blink/public/mojom/content_extraction/inner_text.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/content_extraction/inner_text.mojom-params-data.h"
#include "third_party/blink/public/mojom/content_extraction/inner_text.mojom-shared-message-ids.h"
#include "third_party/blink/public/mojom/content_extraction/inner_text.mojom-import-headers.h"
#include "third_party/blink/public/mojom/content_extraction/inner_text.mojom-test-utils.h"
namespace blink::mojom {
InnerTextFrame::InnerTextFrame()
: … { … }
InnerTextFrame::InnerTextFrame(
const ::blink::LocalFrameToken& token_in,
std::vector<InnerTextSegmentPtr> segments_in)
: … { … }
InnerTextFrame::~InnerTextFrame() = default;
void InnerTextFrame::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool InnerTextFrame::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
InnerTextParams::InnerTextParams()
: … { … }
InnerTextParams::InnerTextParams(
std::optional<int32_t> node_id_in,
std::optional<uint32_t> max_words_per_aggregate_passage_in,
std::optional<bool> greedily_aggregate_sibling_nodes_in,
uint32_t max_passages_in,
std::optional<uint32_t> min_words_per_passage_in)
: … { … }
InnerTextParams::~InnerTextParams() = default;
void InnerTextParams::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool InnerTextParams::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
InnerTextSegment::InnerTextSegment() : … { … }
InnerTextSegment::~InnerTextSegment() { … }
void InnerTextSegment::set_node_location(
NodeLocationType node_location) { … }
void InnerTextSegment::set_text(
const std::string& text) { … }
void InnerTextSegment::set_frame(
InnerTextFramePtr frame) { … }
void InnerTextSegment::DestroyActive() { … }
bool InnerTextSegment::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char InnerTextAgent::Name_[] = …;
InnerTextAgent::IPCStableHashFunction InnerTextAgent::MessageToMethodInfo_(mojo::Message& message) { … }
const char* InnerTextAgent::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t InnerTextAgent::GetInnerText_Sym::IPCStableHash() { … }
# endif
class InnerTextAgent_GetInnerText_ForwardToCallback
: public mojo::MessageReceiver { … };
InnerTextAgentProxy::InnerTextAgentProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void InnerTextAgentProxy::GetInnerText(
InnerTextParamsPtr in_params, GetInnerTextCallback callback) { … }
class InnerTextAgent_GetInnerText_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool InnerTextAgent_GetInnerText_ForwardToCallback::Accept(
mojo::Message* message) { … }
void InnerTextAgent_GetInnerText_ProxyToResponder::Run(
InnerTextFramePtr in_frame) { … }
bool InnerTextAgentStubDispatch::Accept(
InnerTextAgent* impl,
mojo::Message* message) { … }
bool InnerTextAgentStubDispatch::AcceptWithResponder(
InnerTextAgent* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kInnerTextAgentValidationInfo[] = …;
bool InnerTextAgentRequestValidator::Accept(mojo::Message* message) { … }
bool InnerTextAgentResponseValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::blink::mojom::InnerTextFrame::DataView, ::blink::mojom::InnerTextFramePtr>::Read(
::blink::mojom::InnerTextFrame::DataView input,
::blink::mojom::InnerTextFramePtr* output) { … }
bool StructTraits<::blink::mojom::InnerTextParams::DataView, ::blink::mojom::InnerTextParamsPtr>::Read(
::blink::mojom::InnerTextParams::DataView input,
::blink::mojom::InnerTextParamsPtr* output) { … }
bool UnionTraits<::blink::mojom::InnerTextSegment::DataView, ::blink::mojom::InnerTextSegmentPtr>::Read(
::blink::mojom::InnerTextSegment::DataView input,
::blink::mojom::InnerTextSegmentPtr* output) { … }
}
namespace blink::mojom {
void InnerTextAgentInterceptorForTesting::GetInnerText(InnerTextParamsPtr params, GetInnerTextCallback callback) { … }
InnerTextAgentAsyncWaiter::InnerTextAgentAsyncWaiter(
InnerTextAgent* proxy) : … { … }
InnerTextAgentAsyncWaiter::~InnerTextAgentAsyncWaiter() = default;
void InnerTextAgentAsyncWaiter::GetInnerText(
InnerTextParamsPtr params, InnerTextFramePtr* out_frame) { … }
InnerTextFramePtr InnerTextAgentAsyncWaiter::GetInnerText(
InnerTextParamsPtr params) { … }
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif