// ui/base/mojom/window_open_disposition.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 UI_BASE_MOJOM_WINDOW_OPEN_DISPOSITION_MOJOM_DATA_VIEW_H_
#define UI_BASE_MOJOM_WINDOW_OPEN_DISPOSITION_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 "ui/base/mojom/window_open_disposition.mojom-shared-internal.h"


namespace ui::mojom {
class ClickModifiersDataView;



}  // ui::mojom


namespace mojo {
namespace internal {

template <>
struct MojomTypeTraits<::ui::mojom::ClickModifiersDataView> {
  using Data = ::ui::mojom::internal::ClickModifiers_Data;
  using DataAsArrayElement = Pointer<Data>;
  static constexpr MojomTypeCategory category = MojomTypeCategory::kStruct;
};

}  // namespace internal
}  // namespace mojo


namespace ui::mojom {


enum class WindowOpenDisposition : int32_t {
  
  UNKNOWN = 0,
  
  CURRENT_TAB = 1,
  
  SINGLETON_TAB = 2,
  
  NEW_FOREGROUND_TAB = 3,
  
  NEW_BACKGROUND_TAB = 4,
  
  NEW_POPUP = 5,
  
  NEW_WINDOW = 6,
  
  SAVE_TO_DISK = 7,
  
  OFF_THE_RECORD = 8,
  
  IGNORE_ACTION = 9,
  
  SWITCH_TO_TAB = 10,
  
  NEW_PICTURE_IN_PICTURE = 11,
  
  NEW_SPLIT_VIEW = 12,
  kMinValue = 0,
  kMaxValue = 12,
};

 std::ostream& operator<<(std::ostream& os, WindowOpenDisposition value);
inline bool IsKnownEnumValue(WindowOpenDisposition value) {
  return internal::WindowOpenDisposition_Data::IsKnownValue(
      static_cast<int32_t>(value));
}

// Returns true if the enum has an infallible conversion from the mojom enum.
consteval bool HasInfallibleConversion(WindowOpenDisposition) {
  return true;
}


class ClickModifiersDataView {
 public:
  ClickModifiersDataView() = default;

  ClickModifiersDataView(
      internal::ClickModifiers_Data* data,
      mojo::Message* message)
      : data_(data) {}

  bool is_null() const { return !data_; }
  bool middle_button() const {
    return data_->middle_button;
  }
  bool alt_key() const {
    return data_->alt_key;
  }
  bool ctrl_key() const {
    return data_->ctrl_key;
  }
  bool meta_key() const {
    return data_->meta_key;
  }
  bool shift_key() const {
    return data_->shift_key;
  }
 private:
  internal::ClickModifiers_Data* data_ = nullptr;
};


}  // ui::mojom

#endif  // UI_BASE_MOJOM_WINDOW_OPEN_DISPOSITION_MOJOM_DATA_VIEW_H_