// cc/mojom/touch_action.mojom-data-view.h is auto generated by mojom_bindings_generator.py, do not edit

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

// This file defines XDataView for type traits and can be included in
// _mojom_traits.h definitions but otherwise please use .mojom-forward.h,
// .mojom-shared.h or .mojom.h.

// IWYU pragma: private
// IWYU pragma: friend "traits"

#ifndef CC_MOJOM_TOUCH_ACTION_MOJOM_DATA_VIEW_H_
#define CC_MOJOM_TOUCH_ACTION_MOJOM_DATA_VIEW_H_

#include <stdint.h>

#include <functional>
#include <iosfwd>
#include <type_traits>
#include <utility>
#include "mojo/public/cpp/bindings/array_data_view.h"
#include "mojo/public/cpp/bindings/string_data_view.h"
#include "mojo/public/cpp/bindings/lib/serialization.h"

#include "cc/mojom/touch_action.mojom-shared-internal.h"


namespace cc::mojom {
class TouchActionDataView;



}  // cc::mojom


namespace mojo {
namespace internal {

template <>
struct MojomTypeTraits<::cc::mojom::TouchActionDataView> {
  using Data = ::cc::mojom::internal::TouchAction_Data;
  using DataAsArrayElement = Pointer<Data>;
  static constexpr MojomTypeCategory category = MojomTypeCategory::kStruct;
};

}  // namespace internal
}  // namespace mojo


namespace cc::mojom {


class TouchActionDataView {
 public:
  TouchActionDataView() = default;

  TouchActionDataView(
      internal::TouchAction_Data* data,
      mojo::Message* message)
      : data_(data) {}

  bool is_null() const { return !data_; }
  uint32_t value() const {
    return data_->value;
  }
 private:
  internal::TouchAction_Data* data_ = nullptr;
};


}  // cc::mojom

#endif  // CC_MOJOM_TOUCH_ACTION_MOJOM_DATA_VIEW_H_