// ui/base/mojom/window_open_disposition.mojom-send-validation.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.

#ifndef UI_BASE_MOJOM_WINDOW_OPEN_DISPOSITION_MOJOM_SEND_VALIDATION_H_
#define UI_BASE_MOJOM_WINDOW_OPEN_DISPOSITION_MOJOM_SEND_VALIDATION_H_

#include "ui/base/mojom/window_open_disposition.mojom-shared-internal.h"

#include "ui/base/mojom/window_open_disposition.mojom-data-view.h"

#include "mojo/public/cpp/bindings/lib/send_validation_type.h"
#include "mojo/public/cpp/bindings/lib/send_validation.h"
#include "mojo/public/cpp/bindings/lib/has_send_validation_helper.h"

namespace mojo::internal {
template <typename MaybeConstUserType>
struct HasSendValidationSerialize<::ui::mojom::WindowOpenDisposition, MaybeConstUserType>
    : std::false_type {};

template <typename MaybeConstUserType, mojo::internal::SendValidation send_validation>
struct SendValidationSerializer<::ui::mojom::ClickModifiersDataView, MaybeConstUserType, send_validation> {
  using UserType = typename std::remove_const<MaybeConstUserType>::type;
  using Traits = StructTraits<::ui::mojom::ClickModifiersDataView, UserType>;
  static void Serialize(
      MaybeConstUserType& input,
      mojo::internal::MessageFragment<::ui::mojom::internal::ClickModifiers_Data>& fragment) {
    if (CallIsNullIfExists<Traits>(input))
      return;
    fragment.Allocate();

      fragment->middle_button = Traits::middle_button(input);

      fragment->alt_key = Traits::alt_key(input);

      fragment->ctrl_key = Traits::ctrl_key(input);

      fragment->meta_key = Traits::meta_key(input);

      fragment->shift_key = Traits::shift_key(input);
  }
};

}  // namespace mojo::internal

#endif  // UI_BASE_MOJOM_WINDOW_OPEN_DISPOSITION_MOJOM_SEND_VALIDATION_H_