#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "third_party/blink/public/mojom/hid/hid.mojom-blink.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/hid/hid.mojom-params-data.h"
#include "third_party/blink/public/mojom/hid/hid.mojom-shared-message-ids.h"
#include "third_party/blink/public/mojom/hid/hid.mojom-blink-import-headers.h"
#include "third_party/blink/public/mojom/hid/hid.mojom-blink-test-utils.h"
#include "mojo/public/cpp/bindings/lib/wtf_serialization.h"
namespace blink::mojom::blink {
VendorAndProduct::VendorAndProduct()
: … { … }
VendorAndProduct::VendorAndProduct(
uint16_t vendor_in,
uint16_t product_in)
: … { … }
VendorAndProduct::~VendorAndProduct() = default;
size_t VendorAndProduct::Hash(size_t seed) const { … }
void VendorAndProduct::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool VendorAndProduct::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
HidDeviceFilter::HidDeviceFilter()
: … { … }
HidDeviceFilter::HidDeviceFilter(
DeviceIdFilterPtr device_ids_in,
UsageFilterPtr usage_in)
: … { … }
HidDeviceFilter::~HidDeviceFilter() = default;
void HidDeviceFilter::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool HidDeviceFilter::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
DeviceIdFilter::DeviceIdFilter() : … { … }
DeviceIdFilter::~DeviceIdFilter() { … }
void DeviceIdFilter::set_vendor(
uint16_t vendor) { … }
void DeviceIdFilter::set_vendor_and_product(
VendorAndProductPtr vendor_and_product) { … }
void DeviceIdFilter::DestroyActive() { … }
size_t DeviceIdFilter::Hash(size_t seed) const { … }
bool DeviceIdFilter::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
UsageFilter::UsageFilter() : … { … }
UsageFilter::~UsageFilter() { … }
void UsageFilter::set_page(
uint16_t page) { … }
void UsageFilter::set_usage_and_page(
::device::mojom::blink::HidUsageAndPagePtr usage_and_page) { … }
void UsageFilter::DestroyActive() { … }
size_t UsageFilter::Hash(size_t seed) const { … }
bool UsageFilter::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char HidService::Name_[] = …;
HidService::IPCStableHashFunction HidService::MessageToMethodInfo_(mojo::Message& message) { … }
const char* HidService::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t HidService::RegisterClient_Sym::IPCStableHash() { … }
uint32_t HidService::GetDevices_Sym::IPCStableHash() { … }
uint32_t HidService::RequestDevice_Sym::IPCStableHash() { … }
uint32_t HidService::Connect_Sym::IPCStableHash() { … }
uint32_t HidService::Forget_Sym::IPCStableHash() { … }
# endif
class HidService_GetDevices_ForwardToCallback
: public mojo::MessageReceiver { … };
class HidService_RequestDevice_ForwardToCallback
: public mojo::MessageReceiver { … };
class HidService_Connect_ForwardToCallback
: public mojo::MessageReceiver { … };
class HidService_Forget_ForwardToCallback
: public mojo::MessageReceiver { … };
HidServiceProxy::HidServiceProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void HidServiceProxy::RegisterClient(
::mojo::PendingAssociatedRemote<::device::mojom::blink::HidManagerClient> in_client) { … }
void HidServiceProxy::GetDevices(
GetDevicesCallback callback) { … }
void HidServiceProxy::RequestDevice(
WTF::Vector<HidDeviceFilterPtr> in_filters, WTF::Vector<HidDeviceFilterPtr> in_exclusion_filters, RequestDeviceCallback callback) { … }
void HidServiceProxy::Connect(
const WTF::String& in_device_guid, ::mojo::PendingRemote<::device::mojom::blink::HidConnectionClient> in_client, ConnectCallback callback) { … }
void HidServiceProxy::Forget(
::device::mojom::blink::HidDeviceInfoPtr in_device_info, ForgetCallback callback) { … }
class HidService_GetDevices_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool HidService_GetDevices_ForwardToCallback::Accept(
mojo::Message* message) { … }
void HidService_GetDevices_ProxyToResponder::Run(
WTF::Vector<::device::mojom::blink::HidDeviceInfoPtr> in_devices) { … }
class HidService_RequestDevice_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool HidService_RequestDevice_ForwardToCallback::Accept(
mojo::Message* message) { … }
void HidService_RequestDevice_ProxyToResponder::Run(
WTF::Vector<::device::mojom::blink::HidDeviceInfoPtr> in_devices) { … }
class HidService_Connect_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool HidService_Connect_ForwardToCallback::Accept(
mojo::Message* message) { … }
void HidService_Connect_ProxyToResponder::Run(
::mojo::PendingRemote<::device::mojom::blink::HidConnection> in_connection) { … }
class HidService_Forget_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool HidService_Forget_ForwardToCallback::Accept(
mojo::Message* message) { … }
void HidService_Forget_ProxyToResponder::Run(
) { … }
bool HidServiceStubDispatch::Accept(
HidService* impl,
mojo::Message* message) { … }
bool HidServiceStubDispatch::AcceptWithResponder(
HidService* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kHidServiceValidationInfo[] = …;
bool HidServiceRequestValidator::Accept(mojo::Message* message) { … }
bool HidServiceResponseValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::blink::mojom::blink::VendorAndProduct::DataView, ::blink::mojom::blink::VendorAndProductPtr>::Read(
::blink::mojom::blink::VendorAndProduct::DataView input,
::blink::mojom::blink::VendorAndProductPtr* output) { … }
bool StructTraits<::blink::mojom::blink::HidDeviceFilter::DataView, ::blink::mojom::blink::HidDeviceFilterPtr>::Read(
::blink::mojom::blink::HidDeviceFilter::DataView input,
::blink::mojom::blink::HidDeviceFilterPtr* output) { … }
bool UnionTraits<::blink::mojom::blink::DeviceIdFilter::DataView, ::blink::mojom::blink::DeviceIdFilterPtr>::Read(
::blink::mojom::blink::DeviceIdFilter::DataView input,
::blink::mojom::blink::DeviceIdFilterPtr* output) { … }
bool UnionTraits<::blink::mojom::blink::UsageFilter::DataView, ::blink::mojom::blink::UsageFilterPtr>::Read(
::blink::mojom::blink::UsageFilter::DataView input,
::blink::mojom::blink::UsageFilterPtr* output) { … }
}
namespace blink::mojom::blink {
void HidServiceInterceptorForTesting::RegisterClient(::mojo::PendingAssociatedRemote<::device::mojom::blink::HidManagerClient> client) { … }
void HidServiceInterceptorForTesting::GetDevices(GetDevicesCallback callback) { … }
void HidServiceInterceptorForTesting::RequestDevice(WTF::Vector<HidDeviceFilterPtr> filters, WTF::Vector<HidDeviceFilterPtr> exclusion_filters, RequestDeviceCallback callback) { … }
void HidServiceInterceptorForTesting::Connect(const WTF::String& device_guid, ::mojo::PendingRemote<::device::mojom::blink::HidConnectionClient> client, ConnectCallback callback) { … }
void HidServiceInterceptorForTesting::Forget(::device::mojom::blink::HidDeviceInfoPtr device_info, ForgetCallback callback) { … }
HidServiceAsyncWaiter::HidServiceAsyncWaiter(
HidService* proxy) : … { … }
HidServiceAsyncWaiter::~HidServiceAsyncWaiter() = default;
void HidServiceAsyncWaiter::GetDevices(
WTF::Vector<::device::mojom::blink::HidDeviceInfoPtr>* out_devices) { … }
WTF::Vector<::device::mojom::blink::HidDeviceInfoPtr> HidServiceAsyncWaiter::GetDevices(
) { … }
void HidServiceAsyncWaiter::RequestDevice(
WTF::Vector<HidDeviceFilterPtr> filters, WTF::Vector<HidDeviceFilterPtr> exclusion_filters, WTF::Vector<::device::mojom::blink::HidDeviceInfoPtr>* out_devices) { … }
WTF::Vector<::device::mojom::blink::HidDeviceInfoPtr> HidServiceAsyncWaiter::RequestDevice(
WTF::Vector<HidDeviceFilterPtr> filters, WTF::Vector<HidDeviceFilterPtr> exclusion_filters) { … }
void HidServiceAsyncWaiter::Connect(
const WTF::String& device_guid, ::mojo::PendingRemote<::device::mojom::blink::HidConnectionClient> client, ::mojo::PendingRemote<::device::mojom::blink::HidConnection>* out_connection) { … }
::mojo::PendingRemote<::device::mojom::blink::HidConnection> HidServiceAsyncWaiter::Connect(
const WTF::String& device_guid, ::mojo::PendingRemote<::device::mojom::blink::HidConnectionClient> client) { … }
void HidServiceAsyncWaiter::Forget(
::device::mojom::blink::HidDeviceInfoPtr device_info) { … }
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif