// content/browser/xr/webxr_internals/mojom/webxr_internals.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 CONTENT_BROWSER_XR_WEBXR_INTERNALS_MOJOM_WEBXR_INTERNALS_MOJOM_H_
#define CONTENT_BROWSER_XR_WEBXR_INTERNALS_MOJOM_WEBXR_INTERNALS_MOJOM_H_

#include <stdint.h>

#include <limits>
#include <optional>
#include <type_traits>
#include <utility>
#include "mojo/public/cpp/bindings/clone_traits.h"
#include "mojo/public/cpp/bindings/equals_traits.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 "mojo/public/cpp/bindings/lib/serialization.h"

#include "third_party/perfetto/include/perfetto/tracing/traced_value_forward.h"

#include "content/browser/xr/webxr_internals/mojom/webxr_internals.mojom-features.h"  // IWYU pragma: export
#include "content/browser/xr/webxr_internals/mojom/webxr_internals.mojom-shared.h"  // IWYU pragma: export
#include "content/browser/xr/webxr_internals/mojom/webxr_internals.mojom-forward.h"  // IWYU pragma: export
#include "device/vr/public/mojom/xr_device.mojom-forward.h"
#include "device/vr/public/mojom/xr_session.mojom.h"
#include "mojo/public/mojom/base/time.mojom.h"
#include <string>
#include <vector>

#include "mojo/public/cpp/bindings/lib/control_message_handler.h"
#include "mojo/public/cpp/bindings/raw_ptr_impl_ref_traits.h"






namespace webxr::mojom {

class WebXrInternalsHandlerProxy;

template <typename ImplRefTraits>
class WebXrInternalsHandlerStub;

class WebXrInternalsHandlerRequestValidator;
class WebXrInternalsHandlerResponseValidator;


class WebXrInternalsHandler
    : public WebXrInternalsHandlerInterfaceBase {
 public:
  using IPCStableHashFunction = uint32_t(*)();
  static constexpr const char* Name_ = "webxr.mojom.WebXrInternalsHandler";
  static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
  static const char* MessageToMethodName_(mojo::Message& message);
  static constexpr uint32_t Version_ = 0;
  static constexpr bool PassesAssociatedKinds_ = false;
  static constexpr bool HasUninterruptableMethods_ = false;

  using Base_ = WebXrInternalsHandlerInterfaceBase;
  using Proxy_ = WebXrInternalsHandlerProxy;

  template <typename ImplRefTraits>
  using Stub_ = WebXrInternalsHandlerStub<ImplRefTraits>;

  using RequestValidator_ = WebXrInternalsHandlerRequestValidator;
  using ResponseValidator_ = WebXrInternalsHandlerResponseValidator;
  enum MethodMinVersions : uint32_t {
    kGetDeviceInfoMinVersion = 0,
    kGetActiveRuntimesMinVersion = 0,
    kSubscribeToEventsMinVersion = 0,
  };

// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
  struct GetDeviceInfo_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct GetActiveRuntimes_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct SubscribeToEvents_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
#endif // !BUILDFLAG(IS_FUCHSIA)
  virtual ~WebXrInternalsHandler() = default;

  using GetDeviceInfoCallback = base::OnceCallback<void(DeviceInfoPtr)>;
  using GetDeviceInfoMojoCallback = base::OnceCallback<void(DeviceInfoPtr)>;

  virtual void GetDeviceInfo(GetDeviceInfoCallback callback) = 0;

  using GetActiveRuntimesCallback = base::OnceCallback<void(std::vector<RuntimeInfoPtr>)>;
  using GetActiveRuntimesMojoCallback = base::OnceCallback<void(std::vector<RuntimeInfoPtr>)>;

  virtual void GetActiveRuntimes(GetActiveRuntimesCallback callback) = 0;

  virtual void SubscribeToEvents(::mojo::PendingRemote<XRInternalsSessionListener> listener) = 0;
};

class XRInternalsSessionListenerProxy;

template <typename ImplRefTraits>
class XRInternalsSessionListenerStub;

class XRInternalsSessionListenerRequestValidator;


class XRInternalsSessionListener
    : public XRInternalsSessionListenerInterfaceBase {
 public:
  using IPCStableHashFunction = uint32_t(*)();
  static constexpr const char* Name_ = "webxr.mojom.XRInternalsSessionListener";
  static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
  static const char* MessageToMethodName_(mojo::Message& message);
  static constexpr uint32_t Version_ = 0;
  static constexpr bool PassesAssociatedKinds_ = false;
  static constexpr bool HasUninterruptableMethods_ = false;

  using Base_ = XRInternalsSessionListenerInterfaceBase;
  using Proxy_ = XRInternalsSessionListenerProxy;

  template <typename ImplRefTraits>
  using Stub_ = XRInternalsSessionListenerStub<ImplRefTraits>;

  using RequestValidator_ = XRInternalsSessionListenerRequestValidator;
  using ResponseValidator_ = mojo::PassThroughFilter;
  enum MethodMinVersions : uint32_t {
    kLogXrSessionRequestedMinVersion = 0,
    kLogXrSessionRejectedMinVersion = 0,
    kLogXrSessionStartedMinVersion = 0,
    kLogXrSessionStoppedMinVersion = 0,
    kLogXrRuntimeAddedMinVersion = 0,
    kLogXrRuntimeRemovedMinVersion = 0,
    kLogFrameDataMinVersion = 0,
    kLogConsoleMessagesMinVersion = 0,
  };

// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
  struct LogXrSessionRequested_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct LogXrSessionRejected_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct LogXrSessionStarted_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct LogXrSessionStopped_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct LogXrRuntimeAdded_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct LogXrRuntimeRemoved_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct LogFrameData_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct LogConsoleMessages_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
#endif // !BUILDFLAG(IS_FUCHSIA)
  virtual ~XRInternalsSessionListener() = default;

  virtual void LogXrSessionRequested(SessionRequestedRecordPtr session_requested_record) = 0;

  virtual void LogXrSessionRejected(SessionRejectedRecordPtr session_rejected_record) = 0;

  virtual void LogXrSessionStarted(SessionStartedRecordPtr session_started_record) = 0;

  virtual void LogXrSessionStopped(SessionStoppedRecordPtr session_stopped_record) = 0;

  virtual void LogXrRuntimeAdded(RuntimeInfoPtr runtime_added_record) = 0;

  virtual void LogXrRuntimeRemoved(::device::mojom::XRDeviceId device_id) = 0;

  virtual void LogFrameData(::device::mojom::XrFrameStatisticsPtr xrframe_statistics) = 0;

  virtual void LogConsoleMessages(::device::mojom::XrLogMessagePtr xrlogging_statistics) = 0;
};



class  WebXrInternalsHandlerProxy
    : public WebXrInternalsHandler {
 public:
  using InterfaceType = WebXrInternalsHandler;

  explicit WebXrInternalsHandlerProxy(mojo::MessageReceiverWithResponder* receiver);
  
  void GetDeviceInfo(GetDeviceInfoCallback callback) final;
  
  void GetActiveRuntimes(GetActiveRuntimesCallback callback) final;
  
  void SubscribeToEvents(::mojo::PendingRemote<XRInternalsSessionListener> listener) final;

 private:
  mojo::MessageReceiverWithResponder* receiver_;
};



class  XRInternalsSessionListenerProxy
    : public XRInternalsSessionListener {
 public:
  using InterfaceType = XRInternalsSessionListener;

  explicit XRInternalsSessionListenerProxy(mojo::MessageReceiverWithResponder* receiver);
  
  void LogXrSessionRequested(SessionRequestedRecordPtr session_requested_record) final;
  
  void LogXrSessionRejected(SessionRejectedRecordPtr session_rejected_record) final;
  
  void LogXrSessionStarted(SessionStartedRecordPtr session_started_record) final;
  
  void LogXrSessionStopped(SessionStoppedRecordPtr session_stopped_record) final;
  
  void LogXrRuntimeAdded(RuntimeInfoPtr runtime_added_record) final;
  
  void LogXrRuntimeRemoved(::device::mojom::XRDeviceId device_id) final;
  
  void LogFrameData(::device::mojom::XrFrameStatisticsPtr xrframe_statistics) final;
  
  void LogConsoleMessages(::device::mojom::XrLogMessagePtr xrlogging_statistics) final;

 private:
  mojo::MessageReceiverWithResponder* receiver_;
};
class  WebXrInternalsHandlerStubDispatch {
 public:
  static bool Accept(WebXrInternalsHandler* impl, mojo::Message* message);
  static bool AcceptWithResponder(
      WebXrInternalsHandler* impl,
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};

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

  WebXrInternalsHandlerStub() = default;
  ~WebXrInternalsHandlerStub() override = default;

  void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
  ImplPointerType& sink() { return sink_; }

  bool Accept(mojo::Message* message) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return WebXrInternalsHandlerStubDispatch::Accept(
        ImplRefTraits::GetRawPointer(&sink_), message);
  }

  bool AcceptWithResponder(
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return WebXrInternalsHandlerStubDispatch::AcceptWithResponder(
        ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
  }

 private:
  ImplPointerType sink_;
};
class  XRInternalsSessionListenerStubDispatch {
 public:
  static bool Accept(XRInternalsSessionListener* impl, mojo::Message* message);
  static bool AcceptWithResponder(
      XRInternalsSessionListener* impl,
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};

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

  XRInternalsSessionListenerStub() = default;
  ~XRInternalsSessionListenerStub() override = default;

  void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
  ImplPointerType& sink() { return sink_; }

  bool Accept(mojo::Message* message) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return XRInternalsSessionListenerStubDispatch::Accept(
        ImplRefTraits::GetRawPointer(&sink_), message);
  }

  bool AcceptWithResponder(
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return XRInternalsSessionListenerStubDispatch::AcceptWithResponder(
        ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
  }

 private:
  ImplPointerType sink_;
};
class  WebXrInternalsHandlerRequestValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class  XRInternalsSessionListenerRequestValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class  WebXrInternalsHandlerResponseValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};





class  DeviceInfo {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<DeviceInfo, T>::value>;
  using DataView = DeviceInfoDataView;
  using Data_ = internal::DeviceInfo_Data;

  template <typename... Args>
  static DeviceInfoPtr New(Args&&... args) {
    return DeviceInfoPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static DeviceInfoPtr From(const U& u) {
    return mojo::TypeConverter<DeviceInfoPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, DeviceInfo>::Convert(*this);
  }


  DeviceInfo();

  DeviceInfo(
      const std::string& operating_system_name,
      const std::string& operating_system_version,
      const std::string& gpu_gl_vendor,
      const std::string& gpu_gl_renderer);


  ~DeviceInfo();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = DeviceInfoPtr>
  DeviceInfoPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, DeviceInfo::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, DeviceInfo::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, DeviceInfo::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }
  size_t Hash(size_t seed) const;

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        DeviceInfo::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        DeviceInfo::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        DeviceInfo::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::DeviceInfo_UnserializedMessageContext<
            UserType, DeviceInfo::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<DeviceInfo::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return DeviceInfo::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::DeviceInfo_UnserializedMessageContext<
            UserType, DeviceInfo::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<DeviceInfo::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  std::string operating_system_name;
  
  std::string operating_system_version;
  
  std::string gpu_gl_vendor;
  
  std::string gpu_gl_renderer;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// 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, DeviceInfo::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

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

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

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













class  SessionRequestedRecord {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<SessionRequestedRecord, T>::value>;
  using DataView = SessionRequestedRecordDataView;
  using Data_ = internal::SessionRequestedRecord_Data;

  template <typename... Args>
  static SessionRequestedRecordPtr New(Args&&... args) {
    return SessionRequestedRecordPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static SessionRequestedRecordPtr From(const U& u) {
    return mojo::TypeConverter<SessionRequestedRecordPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, SessionRequestedRecord>::Convert(*this);
  }


  SessionRequestedRecord();

  SessionRequestedRecord(
      ::device::mojom::XRSessionOptionsPtr options,
      ::base::Time requested_time);

SessionRequestedRecord(const SessionRequestedRecord&) = delete;
SessionRequestedRecord& operator=(const SessionRequestedRecord&) = delete;

  ~SessionRequestedRecord();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = SessionRequestedRecordPtr>
  SessionRequestedRecordPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, SessionRequestedRecord::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, SessionRequestedRecord::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, SessionRequestedRecord::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        SessionRequestedRecord::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::SessionRequestedRecord_UnserializedMessageContext<
            UserType, SessionRequestedRecord::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<SessionRequestedRecord::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return SessionRequestedRecord::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::SessionRequestedRecord_UnserializedMessageContext<
            UserType, SessionRequestedRecord::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<SessionRequestedRecord::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::device::mojom::XRSessionOptionsPtr options;
  
  ::base::Time requested_time;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// 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, SessionRequestedRecord::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

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

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

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





class  SessionRejectedRecord {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<SessionRejectedRecord, T>::value>;
  using DataView = SessionRejectedRecordDataView;
  using Data_ = internal::SessionRejectedRecord_Data;

  template <typename... Args>
  static SessionRejectedRecordPtr New(Args&&... args) {
    return SessionRejectedRecordPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static SessionRejectedRecordPtr From(const U& u) {
    return mojo::TypeConverter<SessionRejectedRecordPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, SessionRejectedRecord>::Convert(*this);
  }


  SessionRejectedRecord();

  SessionRejectedRecord(
      uint64_t trace_id,
      ::device::mojom::RequestSessionError failure_reason,
      ::base::Time rejected_time,
      const std::string& failure_reason_description,
      std::vector<::device::mojom::XRSessionFeature> rejected_features);


  ~SessionRejectedRecord();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = SessionRejectedRecordPtr>
  SessionRejectedRecordPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, SessionRejectedRecord::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, SessionRejectedRecord::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, SessionRejectedRecord::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SessionRejectedRecord::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SessionRejectedRecord::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        SessionRejectedRecord::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::SessionRejectedRecord_UnserializedMessageContext<
            UserType, SessionRejectedRecord::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<SessionRejectedRecord::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return SessionRejectedRecord::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::SessionRejectedRecord_UnserializedMessageContext<
            UserType, SessionRejectedRecord::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<SessionRejectedRecord::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  uint64_t trace_id;
  
  ::device::mojom::RequestSessionError failure_reason;
  
  ::base::Time rejected_time;
  
  std::string failure_reason_description;
  
  std::vector<::device::mojom::XRSessionFeature> rejected_features;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// 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, SessionRejectedRecord::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

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

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

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





class  SessionStartedRecord {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<SessionStartedRecord, T>::value>;
  using DataView = SessionStartedRecordDataView;
  using Data_ = internal::SessionStartedRecord_Data;

  template <typename... Args>
  static SessionStartedRecordPtr New(Args&&... args) {
    return SessionStartedRecordPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static SessionStartedRecordPtr From(const U& u) {
    return mojo::TypeConverter<SessionStartedRecordPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, SessionStartedRecord>::Convert(*this);
  }


  SessionStartedRecord();

  SessionStartedRecord(
      uint64_t trace_id,
      ::device::mojom::XRDeviceId device_id,
      ::base::Time started_time);


  ~SessionStartedRecord();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = SessionStartedRecordPtr>
  SessionStartedRecordPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, SessionStartedRecord::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, SessionStartedRecord::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, SessionStartedRecord::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SessionStartedRecord::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SessionStartedRecord::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        SessionStartedRecord::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::SessionStartedRecord_UnserializedMessageContext<
            UserType, SessionStartedRecord::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<SessionStartedRecord::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return SessionStartedRecord::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::SessionStartedRecord_UnserializedMessageContext<
            UserType, SessionStartedRecord::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<SessionStartedRecord::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  uint64_t trace_id;
  
  ::device::mojom::XRDeviceId device_id;
  
  ::base::Time started_time;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// 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, SessionStartedRecord::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

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

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

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





class  SessionStoppedRecord {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<SessionStoppedRecord, T>::value>;
  using DataView = SessionStoppedRecordDataView;
  using Data_ = internal::SessionStoppedRecord_Data;

  template <typename... Args>
  static SessionStoppedRecordPtr New(Args&&... args) {
    return SessionStoppedRecordPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static SessionStoppedRecordPtr From(const U& u) {
    return mojo::TypeConverter<SessionStoppedRecordPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, SessionStoppedRecord>::Convert(*this);
  }


  SessionStoppedRecord();

  SessionStoppedRecord(
      uint64_t trace_id,
      ::base::Time stopped_time);


  ~SessionStoppedRecord();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = SessionStoppedRecordPtr>
  SessionStoppedRecordPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, SessionStoppedRecord::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, SessionStoppedRecord::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, SessionStoppedRecord::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SessionStoppedRecord::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        SessionStoppedRecord::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        SessionStoppedRecord::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::SessionStoppedRecord_UnserializedMessageContext<
            UserType, SessionStoppedRecord::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<SessionStoppedRecord::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return SessionStoppedRecord::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::SessionStoppedRecord_UnserializedMessageContext<
            UserType, SessionStoppedRecord::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<SessionStoppedRecord::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  uint64_t trace_id;
  
  ::base::Time stopped_time;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// 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, SessionStoppedRecord::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

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

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

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





class  RuntimeInfo {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<RuntimeInfo, T>::value>;
  using DataView = RuntimeInfoDataView;
  using Data_ = internal::RuntimeInfo_Data;

  template <typename... Args>
  static RuntimeInfoPtr New(Args&&... args) {
    return RuntimeInfoPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static RuntimeInfoPtr From(const U& u) {
    return mojo::TypeConverter<RuntimeInfoPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, RuntimeInfo>::Convert(*this);
  }


  RuntimeInfo();

  RuntimeInfo(
      ::device::mojom::XRDeviceId device_id,
      std::vector<::device::mojom::XRSessionFeature> supported_features,
      bool is_ar_blend_mode_supported);


  ~RuntimeInfo();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = RuntimeInfoPtr>
  RuntimeInfoPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, RuntimeInfo::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, RuntimeInfo::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, RuntimeInfo::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        RuntimeInfo::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        RuntimeInfo::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        RuntimeInfo::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::RuntimeInfo_UnserializedMessageContext<
            UserType, RuntimeInfo::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<RuntimeInfo::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return RuntimeInfo::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::RuntimeInfo_UnserializedMessageContext<
            UserType, RuntimeInfo::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<RuntimeInfo::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::device::mojom::XRDeviceId device_id;
  
  std::vector<::device::mojom::XRSessionFeature> supported_features;
  
  bool is_ar_blend_mode_supported;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// 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, RuntimeInfo::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

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

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

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

template <typename StructPtrType>
DeviceInfoPtr DeviceInfo::Clone() const {
  return New(
      mojo::Clone(operating_system_name),
      mojo::Clone(operating_system_version),
      mojo::Clone(gpu_gl_vendor),
      mojo::Clone(gpu_gl_renderer)
  );
}

template <typename T, DeviceInfo::EnableIfSame<T>*>
bool DeviceInfo::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->operating_system_name, other_struct.operating_system_name))
    return false;
  if (!mojo::Equals(this->operating_system_version, other_struct.operating_system_version))
    return false;
  if (!mojo::Equals(this->gpu_gl_vendor, other_struct.gpu_gl_vendor))
    return false;
  if (!mojo::Equals(this->gpu_gl_renderer, other_struct.gpu_gl_renderer))
    return false;
  return true;
}

template <typename T, DeviceInfo::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.operating_system_name < rhs.operating_system_name)
    return true;
  if (rhs.operating_system_name < lhs.operating_system_name)
    return false;
  if (lhs.operating_system_version < rhs.operating_system_version)
    return true;
  if (rhs.operating_system_version < lhs.operating_system_version)
    return false;
  if (lhs.gpu_gl_vendor < rhs.gpu_gl_vendor)
    return true;
  if (rhs.gpu_gl_vendor < lhs.gpu_gl_vendor)
    return false;
  if (lhs.gpu_gl_renderer < rhs.gpu_gl_renderer)
    return true;
  if (rhs.gpu_gl_renderer < lhs.gpu_gl_renderer)
    return false;
  return false;
}
template <typename StructPtrType>
SessionRequestedRecordPtr SessionRequestedRecord::Clone() const {
  return New(
      mojo::Clone(options),
      mojo::Clone(requested_time)
  );
}

template <typename T, SessionRequestedRecord::EnableIfSame<T>*>
bool SessionRequestedRecord::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->options, other_struct.options))
    return false;
  if (!mojo::Equals(this->requested_time, other_struct.requested_time))
    return false;
  return true;
}

template <typename T, SessionRequestedRecord::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.options < rhs.options)
    return true;
  if (rhs.options < lhs.options)
    return false;
  if (lhs.requested_time < rhs.requested_time)
    return true;
  if (rhs.requested_time < lhs.requested_time)
    return false;
  return false;
}
template <typename StructPtrType>
SessionRejectedRecordPtr SessionRejectedRecord::Clone() const {
  return New(
      mojo::Clone(trace_id),
      mojo::Clone(failure_reason),
      mojo::Clone(rejected_time),
      mojo::Clone(failure_reason_description),
      mojo::Clone(rejected_features)
  );
}

template <typename T, SessionRejectedRecord::EnableIfSame<T>*>
bool SessionRejectedRecord::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->trace_id, other_struct.trace_id))
    return false;
  if (!mojo::Equals(this->failure_reason, other_struct.failure_reason))
    return false;
  if (!mojo::Equals(this->rejected_time, other_struct.rejected_time))
    return false;
  if (!mojo::Equals(this->failure_reason_description, other_struct.failure_reason_description))
    return false;
  if (!mojo::Equals(this->rejected_features, other_struct.rejected_features))
    return false;
  return true;
}

template <typename T, SessionRejectedRecord::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.trace_id < rhs.trace_id)
    return true;
  if (rhs.trace_id < lhs.trace_id)
    return false;
  if (lhs.failure_reason < rhs.failure_reason)
    return true;
  if (rhs.failure_reason < lhs.failure_reason)
    return false;
  if (lhs.rejected_time < rhs.rejected_time)
    return true;
  if (rhs.rejected_time < lhs.rejected_time)
    return false;
  if (lhs.failure_reason_description < rhs.failure_reason_description)
    return true;
  if (rhs.failure_reason_description < lhs.failure_reason_description)
    return false;
  if (lhs.rejected_features < rhs.rejected_features)
    return true;
  if (rhs.rejected_features < lhs.rejected_features)
    return false;
  return false;
}
template <typename StructPtrType>
SessionStartedRecordPtr SessionStartedRecord::Clone() const {
  return New(
      mojo::Clone(trace_id),
      mojo::Clone(device_id),
      mojo::Clone(started_time)
  );
}

template <typename T, SessionStartedRecord::EnableIfSame<T>*>
bool SessionStartedRecord::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->trace_id, other_struct.trace_id))
    return false;
  if (!mojo::Equals(this->device_id, other_struct.device_id))
    return false;
  if (!mojo::Equals(this->started_time, other_struct.started_time))
    return false;
  return true;
}

template <typename T, SessionStartedRecord::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.trace_id < rhs.trace_id)
    return true;
  if (rhs.trace_id < lhs.trace_id)
    return false;
  if (lhs.device_id < rhs.device_id)
    return true;
  if (rhs.device_id < lhs.device_id)
    return false;
  if (lhs.started_time < rhs.started_time)
    return true;
  if (rhs.started_time < lhs.started_time)
    return false;
  return false;
}
template <typename StructPtrType>
SessionStoppedRecordPtr SessionStoppedRecord::Clone() const {
  return New(
      mojo::Clone(trace_id),
      mojo::Clone(stopped_time)
  );
}

template <typename T, SessionStoppedRecord::EnableIfSame<T>*>
bool SessionStoppedRecord::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->trace_id, other_struct.trace_id))
    return false;
  if (!mojo::Equals(this->stopped_time, other_struct.stopped_time))
    return false;
  return true;
}

template <typename T, SessionStoppedRecord::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.trace_id < rhs.trace_id)
    return true;
  if (rhs.trace_id < lhs.trace_id)
    return false;
  if (lhs.stopped_time < rhs.stopped_time)
    return true;
  if (rhs.stopped_time < lhs.stopped_time)
    return false;
  return false;
}
template <typename StructPtrType>
RuntimeInfoPtr RuntimeInfo::Clone() const {
  return New(
      mojo::Clone(device_id),
      mojo::Clone(supported_features),
      mojo::Clone(is_ar_blend_mode_supported)
  );
}

template <typename T, RuntimeInfo::EnableIfSame<T>*>
bool RuntimeInfo::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->device_id, other_struct.device_id))
    return false;
  if (!mojo::Equals(this->supported_features, other_struct.supported_features))
    return false;
  if (!mojo::Equals(this->is_ar_blend_mode_supported, other_struct.is_ar_blend_mode_supported))
    return false;
  return true;
}

template <typename T, RuntimeInfo::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.device_id < rhs.device_id)
    return true;
  if (rhs.device_id < lhs.device_id)
    return false;
  if (lhs.supported_features < rhs.supported_features)
    return true;
  if (rhs.supported_features < lhs.supported_features)
    return false;
  if (lhs.is_ar_blend_mode_supported < rhs.is_ar_blend_mode_supported)
    return true;
  if (rhs.is_ar_blend_mode_supported < lhs.is_ar_blend_mode_supported)
    return false;
  return false;
}


}  // webxr::mojom

namespace mojo {


template <>
struct  StructTraits<::webxr::mojom::DeviceInfo::DataView,
                                         ::webxr::mojom::DeviceInfoPtr> {
  static bool IsNull(const ::webxr::mojom::DeviceInfoPtr& input) { return !input; }
  static void SetToNull(::webxr::mojom::DeviceInfoPtr* output) { output->reset(); }

  static const decltype(::webxr::mojom::DeviceInfo::operating_system_name)& operating_system_name(
      const ::webxr::mojom::DeviceInfoPtr& input) {
    return input->operating_system_name;
  }

  static const decltype(::webxr::mojom::DeviceInfo::operating_system_version)& operating_system_version(
      const ::webxr::mojom::DeviceInfoPtr& input) {
    return input->operating_system_version;
  }

  static const decltype(::webxr::mojom::DeviceInfo::gpu_gl_vendor)& gpu_gl_vendor(
      const ::webxr::mojom::DeviceInfoPtr& input) {
    return input->gpu_gl_vendor;
  }

  static const decltype(::webxr::mojom::DeviceInfo::gpu_gl_renderer)& gpu_gl_renderer(
      const ::webxr::mojom::DeviceInfoPtr& input) {
    return input->gpu_gl_renderer;
  }

  static bool Read(::webxr::mojom::DeviceInfo::DataView input, ::webxr::mojom::DeviceInfoPtr* output);
};


template <>
struct  StructTraits<::webxr::mojom::SessionRequestedRecord::DataView,
                                         ::webxr::mojom::SessionRequestedRecordPtr> {
  static bool IsNull(const ::webxr::mojom::SessionRequestedRecordPtr& input) { return !input; }
  static void SetToNull(::webxr::mojom::SessionRequestedRecordPtr* output) { output->reset(); }

  static  decltype(::webxr::mojom::SessionRequestedRecord::options)& options(
       ::webxr::mojom::SessionRequestedRecordPtr& input) {
    return input->options;
  }

  static const decltype(::webxr::mojom::SessionRequestedRecord::requested_time)& requested_time(
      const ::webxr::mojom::SessionRequestedRecordPtr& input) {
    return input->requested_time;
  }

  static bool Read(::webxr::mojom::SessionRequestedRecord::DataView input, ::webxr::mojom::SessionRequestedRecordPtr* output);
};


template <>
struct  StructTraits<::webxr::mojom::SessionRejectedRecord::DataView,
                                         ::webxr::mojom::SessionRejectedRecordPtr> {
  static bool IsNull(const ::webxr::mojom::SessionRejectedRecordPtr& input) { return !input; }
  static void SetToNull(::webxr::mojom::SessionRejectedRecordPtr* output) { output->reset(); }

  static decltype(::webxr::mojom::SessionRejectedRecord::trace_id) trace_id(
      const ::webxr::mojom::SessionRejectedRecordPtr& input) {
    return input->trace_id;
  }

  static decltype(::webxr::mojom::SessionRejectedRecord::failure_reason) failure_reason(
      const ::webxr::mojom::SessionRejectedRecordPtr& input) {
    return input->failure_reason;
  }

  static const decltype(::webxr::mojom::SessionRejectedRecord::rejected_time)& rejected_time(
      const ::webxr::mojom::SessionRejectedRecordPtr& input) {
    return input->rejected_time;
  }

  static const decltype(::webxr::mojom::SessionRejectedRecord::failure_reason_description)& failure_reason_description(
      const ::webxr::mojom::SessionRejectedRecordPtr& input) {
    return input->failure_reason_description;
  }

  static const decltype(::webxr::mojom::SessionRejectedRecord::rejected_features)& rejected_features(
      const ::webxr::mojom::SessionRejectedRecordPtr& input) {
    return input->rejected_features;
  }

  static bool Read(::webxr::mojom::SessionRejectedRecord::DataView input, ::webxr::mojom::SessionRejectedRecordPtr* output);
};


template <>
struct  StructTraits<::webxr::mojom::SessionStartedRecord::DataView,
                                         ::webxr::mojom::SessionStartedRecordPtr> {
  static bool IsNull(const ::webxr::mojom::SessionStartedRecordPtr& input) { return !input; }
  static void SetToNull(::webxr::mojom::SessionStartedRecordPtr* output) { output->reset(); }

  static decltype(::webxr::mojom::SessionStartedRecord::trace_id) trace_id(
      const ::webxr::mojom::SessionStartedRecordPtr& input) {
    return input->trace_id;
  }

  static decltype(::webxr::mojom::SessionStartedRecord::device_id) device_id(
      const ::webxr::mojom::SessionStartedRecordPtr& input) {
    return input->device_id;
  }

  static const decltype(::webxr::mojom::SessionStartedRecord::started_time)& started_time(
      const ::webxr::mojom::SessionStartedRecordPtr& input) {
    return input->started_time;
  }

  static bool Read(::webxr::mojom::SessionStartedRecord::DataView input, ::webxr::mojom::SessionStartedRecordPtr* output);
};


template <>
struct  StructTraits<::webxr::mojom::SessionStoppedRecord::DataView,
                                         ::webxr::mojom::SessionStoppedRecordPtr> {
  static bool IsNull(const ::webxr::mojom::SessionStoppedRecordPtr& input) { return !input; }
  static void SetToNull(::webxr::mojom::SessionStoppedRecordPtr* output) { output->reset(); }

  static decltype(::webxr::mojom::SessionStoppedRecord::trace_id) trace_id(
      const ::webxr::mojom::SessionStoppedRecordPtr& input) {
    return input->trace_id;
  }

  static const decltype(::webxr::mojom::SessionStoppedRecord::stopped_time)& stopped_time(
      const ::webxr::mojom::SessionStoppedRecordPtr& input) {
    return input->stopped_time;
  }

  static bool Read(::webxr::mojom::SessionStoppedRecord::DataView input, ::webxr::mojom::SessionStoppedRecordPtr* output);
};


template <>
struct  StructTraits<::webxr::mojom::RuntimeInfo::DataView,
                                         ::webxr::mojom::RuntimeInfoPtr> {
  static bool IsNull(const ::webxr::mojom::RuntimeInfoPtr& input) { return !input; }
  static void SetToNull(::webxr::mojom::RuntimeInfoPtr* output) { output->reset(); }

  static decltype(::webxr::mojom::RuntimeInfo::device_id) device_id(
      const ::webxr::mojom::RuntimeInfoPtr& input) {
    return input->device_id;
  }

  static const decltype(::webxr::mojom::RuntimeInfo::supported_features)& supported_features(
      const ::webxr::mojom::RuntimeInfoPtr& input) {
    return input->supported_features;
  }

  static decltype(::webxr::mojom::RuntimeInfo::is_ar_blend_mode_supported) is_ar_blend_mode_supported(
      const ::webxr::mojom::RuntimeInfoPtr& input) {
    return input->is_ar_blend_mode_supported;
  }

  static bool Read(::webxr::mojom::RuntimeInfo::DataView input, ::webxr::mojom::RuntimeInfoPtr* output);
};

}  // namespace mojo

#endif  // CONTENT_BROWSER_XR_WEBXR_INTERNALS_MOJOM_WEBXR_INTERNALS_MOJOM_H_