// third_party/blink/public/mojom/frame/find_in_page.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_FRAME_FIND_IN_PAGE_MOJOM_DATA_VIEW_H_
#define THIRD_PARTY_BLINK_PUBLIC_MOJOM_FRAME_FIND_IN_PAGE_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/frame/find_in_page.mojom-shared-internal.h"
#include "ui/gfx/geometry/mojom/geometry.mojom-shared.h"


namespace blink::mojom {
class FindOptionsDataView;



}  // blink::mojom


namespace mojo {
namespace internal {

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

}  // namespace internal
}  // namespace mojo


namespace blink::mojom {


enum class StopFindAction : int32_t {
  
  kStopFindActionClearSelection = 0,
  
  kStopFindActionKeepSelection = 1,
  
  kStopFindActionActivateSelection = 2,
  kMinValue = 0,
  kMaxValue = 2,
};

COMPONENT_EXPORT(MOJOM_SHARED_BLINK_COMMON_EXPORT) std::ostream& operator<<(std::ostream& os, StopFindAction value);
inline bool IsKnownEnumValue(StopFindAction value) {
  return internal::StopFindAction_Data::IsKnownValue(
      static_cast<int32_t>(value));
}

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


enum class FindMatchUpdateType : int32_t {
  
  kFinalUpdate = 0,
  
  kMoreUpdatesComing = 1,
  kMinValue = 0,
  kMaxValue = 1,
};

COMPONENT_EXPORT(MOJOM_SHARED_BLINK_COMMON_EXPORT) std::ostream& operator<<(std::ostream& os, FindMatchUpdateType value);
inline bool IsKnownEnumValue(FindMatchUpdateType value) {
  return internal::FindMatchUpdateType_Data::IsKnownValue(
      static_cast<int32_t>(value));
}

// Returns true if the enum has an infallible conversion from the mojom enum.
consteval bool HasInfallibleConversion(FindMatchUpdateType) {
  return true;
}
// Interface base classes. They are used for type safety check.
class FindInPageInterfaceBase {};

using FindInPagePtrDataView =
    mojo::InterfacePtrDataView<FindInPageInterfaceBase>;
using FindInPageRequestDataView =
    mojo::InterfaceRequestDataView<FindInPageInterfaceBase>;
using FindInPageAssociatedPtrInfoDataView =
    mojo::AssociatedInterfacePtrInfoDataView<FindInPageInterfaceBase>;
using FindInPageAssociatedRequestDataView =
    mojo::AssociatedInterfaceRequestDataView<FindInPageInterfaceBase>;
class FindInPageClientInterfaceBase {};

using FindInPageClientPtrDataView =
    mojo::InterfacePtrDataView<FindInPageClientInterfaceBase>;
using FindInPageClientRequestDataView =
    mojo::InterfaceRequestDataView<FindInPageClientInterfaceBase>;
using FindInPageClientAssociatedPtrInfoDataView =
    mojo::AssociatedInterfacePtrInfoDataView<FindInPageClientInterfaceBase>;
using FindInPageClientAssociatedRequestDataView =
    mojo::AssociatedInterfaceRequestDataView<FindInPageClientInterfaceBase>;


class FindOptionsDataView {
 public:
  FindOptionsDataView() = default;

  FindOptionsDataView(
      internal::FindOptions_Data* data,
      mojo::Message* message)
      : data_(data) {}

  bool is_null() const { return !data_; }
  bool forward() const {
    return data_->forward;
  }
  bool match_case() const {
    return data_->match_case;
  }
  bool new_session() const {
    return data_->new_session;
  }
  bool find_match() const {
    return data_->find_match;
  }
  bool force() const {
    return data_->force;
  }
  bool run_synchronously_for_testing() const {
    return data_->run_synchronously_for_testing;
  }
 private:
  internal::FindOptions_Data* data_ = nullptr;
};


}  // blink::mojom

#endif  // THIRD_PARTY_BLINK_PUBLIC_MOJOM_FRAME_FIND_IN_PAGE_MOJOM_DATA_VIEW_H_