// third_party/blink/public/mojom/widget/platform_widget.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 THIRD_PARTY_BLINK_PUBLIC_MOJOM_WIDGET_PLATFORM_WIDGET_MOJOM_DATA_VIEW_H_
#define THIRD_PARTY_BLINK_PUBLIC_MOJOM_WIDGET_PLATFORM_WIDGET_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 "third_party/blink/public/mojom/widget/platform_widget.mojom-shared-internal.h"
#include "cc/mojom/render_frame_metadata.mojom-shared.h"
#include "mojo/public/mojom/base/string16.mojom-shared.h"
#include "mojo/public/mojom/base/text_direction.mojom-shared.h"
#include "mojo/public/mojom/base/time.mojom-shared.h"
#include "services/viz/public/mojom/compositing/compositor_frame_sink.mojom-shared.h"
#include "ui/base/cursor/mojom/cursor.mojom-shared.h"
#include "ui/gfx/geometry/mojom/geometry.mojom-shared.h"
#include "third_party/blink/public/mojom/input/input_handler.mojom-shared.h"
#include "third_party/blink/public/mojom/widget/visual_properties.mojom-shared.h"
#include "third_party/blink/public/mojom/widget/record_content_to_visible_time_request.mojom-shared.h"
#include "ui/base/ime/mojom/text_input_state.mojom-shared.h"
#include "services/viz/public/mojom/hit_test/input_target_client.mojom-shared.h"
#include "ui/base/mojom/menu_source_type.mojom-shared.h"


namespace blink::mojom {
class InitialFrameSinkParamsDataView;



}  // blink::mojom


namespace mojo {
namespace internal {

template <>
struct MojomTypeTraits<::blink::mojom::InitialFrameSinkParamsDataView> {
  using Data = ::blink::mojom::internal::InitialFrameSinkParams_Data;
  using DataAsArrayElement = Pointer<Data>;
  static constexpr MojomTypeCategory category = MojomTypeCategory::kStruct;
};

}  // namespace internal
}  // namespace mojo


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

using WidgetCompositorPtrDataView =
    mojo::InterfacePtrDataView<WidgetCompositorInterfaceBase>;
using WidgetCompositorRequestDataView =
    mojo::InterfaceRequestDataView<WidgetCompositorInterfaceBase>;
using WidgetCompositorAssociatedPtrInfoDataView =
    mojo::AssociatedInterfacePtrInfoDataView<WidgetCompositorInterfaceBase>;
using WidgetCompositorAssociatedRequestDataView =
    mojo::AssociatedInterfaceRequestDataView<WidgetCompositorInterfaceBase>;
class WidgetHostInterfaceBase {};

using WidgetHostPtrDataView =
    mojo::InterfacePtrDataView<WidgetHostInterfaceBase>;
using WidgetHostRequestDataView =
    mojo::InterfaceRequestDataView<WidgetHostInterfaceBase>;
using WidgetHostAssociatedPtrInfoDataView =
    mojo::AssociatedInterfacePtrInfoDataView<WidgetHostInterfaceBase>;
using WidgetHostAssociatedRequestDataView =
    mojo::AssociatedInterfaceRequestDataView<WidgetHostInterfaceBase>;
class WidgetInterfaceBase {};

using WidgetPtrDataView =
    mojo::InterfacePtrDataView<WidgetInterfaceBase>;
using WidgetRequestDataView =
    mojo::InterfaceRequestDataView<WidgetInterfaceBase>;
using WidgetAssociatedPtrInfoDataView =
    mojo::AssociatedInterfacePtrInfoDataView<WidgetInterfaceBase>;
using WidgetAssociatedRequestDataView =
    mojo::AssociatedInterfaceRequestDataView<WidgetInterfaceBase>;
class RenderInputRouterClientInterfaceBase {};

using RenderInputRouterClientPtrDataView =
    mojo::InterfacePtrDataView<RenderInputRouterClientInterfaceBase>;
using RenderInputRouterClientRequestDataView =
    mojo::InterfaceRequestDataView<RenderInputRouterClientInterfaceBase>;
using RenderInputRouterClientAssociatedPtrInfoDataView =
    mojo::AssociatedInterfacePtrInfoDataView<RenderInputRouterClientInterfaceBase>;
using RenderInputRouterClientAssociatedRequestDataView =
    mojo::AssociatedInterfaceRequestDataView<RenderInputRouterClientInterfaceBase>;


class InitialFrameSinkParamsDataView {
 public:
  InitialFrameSinkParamsDataView() = default;

  InitialFrameSinkParamsDataView(
      internal::InitialFrameSinkParams_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

  bool is_null() const { return !data_; }
  template <typename UserType>
  UserType TakeInitialFrameSink() {
    UserType result;
    bool ret =
        mojo::internal::Deserialize<mojo::InterfacePtrDataView<::viz::mojom::CompositorFrameSinkInterfaceBase>>(
            &data_->initial_frame_sink, &result, message_);
    DCHECK(ret);
    return result;
  }
  template <typename UserType>
  UserType TakeInitialFrameSinkClient() {
    UserType result;
    bool ret =
        mojo::internal::Deserialize<mojo::InterfaceRequestDataView<::viz::mojom::CompositorFrameSinkClientInterfaceBase>>(
            &data_->initial_frame_sink_client, &result, message_);
    DCHECK(ret);
    return result;
  }
  template <typename UserType>
  UserType TakeInitialVizRirClient() {
    UserType result;
    bool ret =
        mojo::internal::Deserialize<mojo::InterfaceRequestDataView<::blink::mojom::RenderInputRouterClientInterfaceBase>>(
            &data_->initial_viz_rir_client, &result, message_);
    DCHECK(ret);
    return result;
  }
 private:
  internal::InitialFrameSinkParams_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};


}  // blink::mojom

#endif  // THIRD_PARTY_BLINK_PUBLIC_MOJOM_WIDGET_PLATFORM_WIDGET_MOJOM_DATA_VIEW_H_