// components/surface_embed/common/surface_embed.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 COMPONENTS_SURFACE_EMBED_COMMON_SURFACE_EMBED_MOJOM_DATA_VIEW_H_
#define COMPONENTS_SURFACE_EMBED_COMMON_SURFACE_EMBED_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 "components/surface_embed/common/surface_embed.mojom-shared-internal.h"
#include "mojo/public/mojom/base/unguessable_token.mojom-shared.h"
#include "services/viz/public/mojom/compositing/frame_sink_id.mojom-shared.h"
#include "services/viz/public/mojom/compositing/local_surface_id.mojom-shared.h"
#include "third_party/blink/public/mojom/frame/frame_visual_properties.mojom-shared.h"
#include "third_party/blink/public/mojom/input/focus_type.mojom-shared.h"


namespace surface_embed::mojom {
class RenderThrottlingStatusDataView;



}  // surface_embed::mojom


namespace mojo {
namespace internal {

template <>
struct MojomTypeTraits<::surface_embed::mojom::RenderThrottlingStatusDataView> {
  using Data = ::surface_embed::mojom::internal::RenderThrottlingStatus_Data;
  using DataAsArrayElement = Pointer<Data>;
  static constexpr MojomTypeCategory category = MojomTypeCategory::kStruct;
};

}  // namespace internal
}  // namespace mojo


namespace surface_embed::mojom {
// Interface base classes. They are used for type safety check.
class SurfaceEmbedInterfaceBase {};

using SurfaceEmbedPtrDataView =
    mojo::InterfacePtrDataView<SurfaceEmbedInterfaceBase>;
using SurfaceEmbedRequestDataView =
    mojo::InterfaceRequestDataView<SurfaceEmbedInterfaceBase>;
using SurfaceEmbedAssociatedPtrInfoDataView =
    mojo::AssociatedInterfacePtrInfoDataView<SurfaceEmbedInterfaceBase>;
using SurfaceEmbedAssociatedRequestDataView =
    mojo::AssociatedInterfaceRequestDataView<SurfaceEmbedInterfaceBase>;
class SurfaceEmbedHostInterfaceBase {};

using SurfaceEmbedHostPtrDataView =
    mojo::InterfacePtrDataView<SurfaceEmbedHostInterfaceBase>;
using SurfaceEmbedHostRequestDataView =
    mojo::InterfaceRequestDataView<SurfaceEmbedHostInterfaceBase>;
using SurfaceEmbedHostAssociatedPtrInfoDataView =
    mojo::AssociatedInterfacePtrInfoDataView<SurfaceEmbedHostInterfaceBase>;
using SurfaceEmbedHostAssociatedRequestDataView =
    mojo::AssociatedInterfaceRequestDataView<SurfaceEmbedHostInterfaceBase>;


class RenderThrottlingStatusDataView {
 public:
  RenderThrottlingStatusDataView() = default;

  RenderThrottlingStatusDataView(
      internal::RenderThrottlingStatus_Data* data,
      mojo::Message* message)
      : data_(data) {}

  bool is_null() const { return !data_; }
  bool is_throttled() const {
    return data_->is_throttled;
  }
  bool subtree_throttled() const {
    return data_->subtree_throttled;
  }
  bool display_locked() const {
    return data_->display_locked;
  }
 private:
  internal::RenderThrottlingStatus_Data* data_ = nullptr;
};


}  // surface_embed::mojom

#endif  // COMPONENTS_SURFACE_EMBED_COMMON_SURFACE_EMBED_MOJOM_DATA_VIEW_H_