chromium/out/Default/gen/services/webnn/public/mojom/webnn_buffer.mojom.h

// services/webnn/public/mojom/webnn_buffer.mojom.h is auto generated by mojom_bindings_generator.py, do not edit

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SERVICES_WEBNN_PUBLIC_MOJOM_WEBNN_BUFFER_MOJOM_H_
#define SERVICES_WEBNN_PUBLIC_MOJOM_WEBNN_BUFFER_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 "services/webnn/public/mojom/webnn_buffer.mojom-features.h"  // IWYU pragma: export
#include "services/webnn/public/mojom/webnn_buffer.mojom-shared.h"  // IWYU pragma: export
#include "services/webnn/public/mojom/webnn_buffer.mojom-forward.h"  // IWYU pragma: export
#include "mojo/public/mojom/base/big_buffer.mojom.h"
#include "services/webnn/public/mojom/webnn_graph.mojom.h"
#include "services/webnn/public/mojom/webnn_error.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 "services/webnn/public/mojom/buffer_usage_mojom_traits.h"
#include "services/webnn/public/mojom/context_properties_mojom_traits.h"
#include "services/webnn/public/mojom/data_type_limits_mojom_traits.h"
#include "services/webnn/public/mojom/operand_descriptor_mojom_traits.h"
#include "services/webnn/public/mojom/supported_data_types_mojom_traits.h"
#include "base/component_export.h"




namespace webnn::mojom {

class WebNNBufferProxy;

template <typename ImplRefTraits>
class WebNNBufferStub;

class WebNNBufferRequestValidator;
class WebNNBufferResponseValidator;


class COMPONENT_EXPORT(WEBNN_MOJOM) WebNNBuffer
    : public WebNNBufferInterfaceBase {};



class COMPONENT_EXPORT(WEBNN_MOJOM) WebNNBufferProxy
    : public WebNNBuffer {};
class COMPONENT_EXPORT(WEBNN_MOJOM) WebNNBufferStubDispatch {};

template <typename ImplRefTraits =
              mojo::RawPtrImplRefTraits<WebNNBuffer>>
class WebNNBufferStub
    : public mojo::MessageReceiverWithResponderStatus {
 public:
  using ImplPointerType = typename ImplRefTraits::PointerType;

  WebNNBufferStub() = default;
  ~WebNNBufferStub() 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 COMPONENT_EXPORT(WEBNN_MOJOM) WebNNBufferRequestValidator : public mojo::MessageReceiver {};
class COMPONENT_EXPORT(WEBNN_MOJOM) WebNNBufferResponseValidator : public mojo::MessageReceiver {};





class COMPONENT_EXPORT(WEBNN_MOJOM) BufferUsage {};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, BufferUsage::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, BufferUsage::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {}

template <typename T, BufferUsage::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {}

template <typename T, BufferUsage::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {}






class COMPONENT_EXPORT(WEBNN_MOJOM) ReadBufferResult {};






class COMPONENT_EXPORT(WEBNN_MOJOM) BufferInfo {};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, BufferInfo::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, BufferInfo::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {}

template <typename T, BufferInfo::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {}

template <typename T, BufferInfo::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {}

template <typename UnionPtrType>
ReadBufferResultPtr ReadBufferResult::Clone() const {}

template <typename T,
          typename std::enable_if<std::is_same<
              T, ReadBufferResult>::value>::type*>
bool ReadBufferResult::Equals(const T& other) const {}
template <typename StructPtrType>
BufferUsagePtr BufferUsage::Clone() const {}

template <typename T, BufferUsage::EnableIfSame<T>*>
bool BufferUsage::Equals(const T& other_struct) const {}

template <typename T, BufferUsage::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {}
template <typename StructPtrType>
BufferInfoPtr BufferInfo::Clone() const {}

template <typename T, BufferInfo::EnableIfSame<T>*>
bool BufferInfo::Equals(const T& other_struct) const {}

template <typename T, BufferInfo::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {}


}  // webnn::mojom

namespace mojo {


template <>
struct COMPONENT_EXPORT(WEBNN_MOJOM) StructTraits<::webnn::mojom::BufferUsage::DataView,
                                         ::webnn::mojom::BufferUsagePtr> {};


template <>
struct COMPONENT_EXPORT(WEBNN_MOJOM) StructTraits<::webnn::mojom::BufferInfo::DataView,
                                         ::webnn::mojom::BufferInfoPtr> {};


template <>
struct COMPONENT_EXPORT(WEBNN_MOJOM) UnionTraits<::webnn::mojom::ReadBufferResult::DataView,
                                        ::webnn::mojom::ReadBufferResultPtr> {};

}  // namespace mojo

#endif  // SERVICES_WEBNN_PUBLIC_MOJOM_WEBNN_BUFFER_MOJOM_H_