#ifndef SERVICES_DEVICE_PUBLIC_MOJOM_HID_MOJOM_BLINK_H_
#define SERVICES_DEVICE_PUBLIC_MOJOM_HID_MOJOM_BLINK_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 "services/device/public/mojom/hid.mojom-features.h"
#include "services/device/public/mojom/hid.mojom-shared.h"
#include "services/device/public/mojom/hid.mojom-blink-forward.h"
#include "mojo/public/cpp/bindings/lib/wtf_clone_equals_util.h"
#include "mojo/public/cpp/bindings/lib/wtf_hash_util.h"
#include "third_party/blink/renderer/platform/wtf/hash_functions.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#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 "base/token.h"
#include "third_party/blink/public/platform/web_common.h"
namespace device::mojom::blink {
class HidManagerClientProxy;
template <typename ImplRefTraits>
class HidManagerClientStub;
class HidManagerClientRequestValidator;
class BLINK_PLATFORM_EXPORT HidManagerClient
: public HidManagerClientInterfaceBase { … };
class HidManagerProxy;
template <typename ImplRefTraits>
class HidManagerStub;
class HidManagerRequestValidator;
class HidManagerResponseValidator;
class BLINK_PLATFORM_EXPORT HidManager
: public HidManagerInterfaceBase { … };
class HidConnectionProxy;
template <typename ImplRefTraits>
class HidConnectionStub;
class HidConnectionRequestValidator;
class HidConnectionResponseValidator;
class BLINK_PLATFORM_EXPORT HidConnection
: public HidConnectionInterfaceBase { … };
class HidConnectionClientProxy;
template <typename ImplRefTraits>
class HidConnectionClientStub;
class HidConnectionClientRequestValidator;
class BLINK_PLATFORM_EXPORT HidConnectionClient
: public HidConnectionClientInterfaceBase { … };
class HidConnectionWatcherProxy;
template <typename ImplRefTraits>
class HidConnectionWatcherStub;
class HidConnectionWatcherRequestValidator;
class BLINK_PLATFORM_EXPORT HidConnectionWatcher
: public HidConnectionWatcherInterfaceBase { … };
class BLINK_PLATFORM_EXPORT HidManagerClientProxy
: public HidManagerClient { … };
class BLINK_PLATFORM_EXPORT HidManagerProxy
: public HidManager { … };
class BLINK_PLATFORM_EXPORT HidConnectionProxy
: public HidConnection { … };
class BLINK_PLATFORM_EXPORT HidConnectionClientProxy
: public HidConnectionClient { … };
class BLINK_PLATFORM_EXPORT HidConnectionWatcherProxy
: public HidConnectionWatcher { … };
class BLINK_PLATFORM_EXPORT HidManagerClientStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<HidManagerClient>>
class HidManagerClientStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
HidManagerClientStub() = default;
~HidManagerClientStub() 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 BLINK_PLATFORM_EXPORT HidManagerStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<HidManager>>
class HidManagerStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
HidManagerStub() = default;
~HidManagerStub() 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 BLINK_PLATFORM_EXPORT HidConnectionStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<HidConnection>>
class HidConnectionStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
HidConnectionStub() = default;
~HidConnectionStub() 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 BLINK_PLATFORM_EXPORT HidConnectionClientStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<HidConnectionClient>>
class HidConnectionClientStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
HidConnectionClientStub() = default;
~HidConnectionClientStub() 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 BLINK_PLATFORM_EXPORT HidConnectionWatcherStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<HidConnectionWatcher>>
class HidConnectionWatcherStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
HidConnectionWatcherStub() = default;
~HidConnectionWatcherStub() 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 BLINK_PLATFORM_EXPORT HidManagerClientRequestValidator : public mojo::MessageReceiver { … };
class BLINK_PLATFORM_EXPORT HidManagerRequestValidator : public mojo::MessageReceiver { … };
class BLINK_PLATFORM_EXPORT HidConnectionRequestValidator : public mojo::MessageReceiver { … };
class BLINK_PLATFORM_EXPORT HidConnectionClientRequestValidator : public mojo::MessageReceiver { … };
class BLINK_PLATFORM_EXPORT HidConnectionWatcherRequestValidator : public mojo::MessageReceiver { … };
class BLINK_PLATFORM_EXPORT HidManagerResponseValidator : public mojo::MessageReceiver { … };
class BLINK_PLATFORM_EXPORT HidConnectionResponseValidator : public mojo::MessageReceiver { … };
class BLINK_PLATFORM_EXPORT HidUsageAndPage { … };
template <typename T, HidUsageAndPage::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, HidUsageAndPage::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, HidUsageAndPage::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, HidUsageAndPage::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class BLINK_PLATFORM_EXPORT HidReportItem { … };
template <typename T, HidReportItem::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, HidReportItem::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, HidReportItem::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, HidReportItem::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class BLINK_PLATFORM_EXPORT HidReportDescription { … };
template <typename T, HidReportDescription::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, HidReportDescription::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, HidReportDescription::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, HidReportDescription::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class BLINK_PLATFORM_EXPORT HidCollectionInfo { … };
template <typename T, HidCollectionInfo::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, HidCollectionInfo::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, HidCollectionInfo::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, HidCollectionInfo::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class BLINK_PLATFORM_EXPORT HidDeviceInfo { … };
template <typename T, HidDeviceInfo::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, HidDeviceInfo::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, HidDeviceInfo::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, HidDeviceInfo::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
HidUsageAndPagePtr HidUsageAndPage::Clone() const { … }
template <typename T, HidUsageAndPage::EnableIfSame<T>*>
bool HidUsageAndPage::Equals(const T& other_struct) const { … }
template <typename T, HidUsageAndPage::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
HidReportItemPtr HidReportItem::Clone() const { … }
template <typename T, HidReportItem::EnableIfSame<T>*>
bool HidReportItem::Equals(const T& other_struct) const { … }
template <typename T, HidReportItem::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
HidReportDescriptionPtr HidReportDescription::Clone() const { … }
template <typename T, HidReportDescription::EnableIfSame<T>*>
bool HidReportDescription::Equals(const T& other_struct) const { … }
template <typename T, HidReportDescription::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
HidCollectionInfoPtr HidCollectionInfo::Clone() const { … }
template <typename T, HidCollectionInfo::EnableIfSame<T>*>
bool HidCollectionInfo::Equals(const T& other_struct) const { … }
template <typename T, HidCollectionInfo::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
HidDeviceInfoPtr HidDeviceInfo::Clone() const { … }
template <typename T, HidDeviceInfo::EnableIfSame<T>*>
bool HidDeviceInfo::Equals(const T& other_struct) const { … }
template <typename T, HidDeviceInfo::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
}
namespace mojo {
template <>
struct BLINK_PLATFORM_EXPORT StructTraits<::device::mojom::blink::HidUsageAndPage::DataView,
::device::mojom::blink::HidUsageAndPagePtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT StructTraits<::device::mojom::blink::HidReportItem::DataView,
::device::mojom::blink::HidReportItemPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT StructTraits<::device::mojom::blink::HidReportDescription::DataView,
::device::mojom::blink::HidReportDescriptionPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT StructTraits<::device::mojom::blink::HidCollectionInfo::DataView,
::device::mojom::blink::HidCollectionInfoPtr> { … };
template <>
struct BLINK_PLATFORM_EXPORT StructTraits<::device::mojom::blink::HidDeviceInfo::DataView,
::device::mojom::blink::HidDeviceInfoPtr> { … };
}
#endif