// chrome/common/renderer_configuration.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 CHROME_COMMON_RENDERER_CONFIGURATION_MOJOM_DATA_VIEW_H_
#define CHROME_COMMON_RENDERER_CONFIGURATION_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 "chrome/common/renderer_configuration.mojom-shared-internal.h"
#include "components/content_settings/common/content_settings_manager.mojom-shared.h"
#include "components/content_settings/core/common/content_settings.mojom-shared.h"
#include "mojo/public/mojom/base/time.mojom-shared.h"
#include "url/mojom/url.mojom-shared.h"


namespace chrome::mojom {
class DynamicParamsDataView;



}  // chrome::mojom


namespace mojo {
namespace internal {

template <>
struct MojomTypeTraits<::chrome::mojom::DynamicParamsDataView> {
  using Data = ::chrome::mojom::internal::DynamicParams_Data;
  using DataAsArrayElement = Pointer<Data>;
  static constexpr MojomTypeCategory category = MojomTypeCategory::kStruct;
};

}  // namespace internal
}  // namespace mojo


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

using BoundSessionRequestThrottledHandlerPtrDataView =
    mojo::InterfacePtrDataView<BoundSessionRequestThrottledHandlerInterfaceBase>;
using BoundSessionRequestThrottledHandlerRequestDataView =
    mojo::InterfaceRequestDataView<BoundSessionRequestThrottledHandlerInterfaceBase>;
using BoundSessionRequestThrottledHandlerAssociatedPtrInfoDataView =
    mojo::AssociatedInterfacePtrInfoDataView<BoundSessionRequestThrottledHandlerInterfaceBase>;
using BoundSessionRequestThrottledHandlerAssociatedRequestDataView =
    mojo::AssociatedInterfaceRequestDataView<BoundSessionRequestThrottledHandlerInterfaceBase>;
class ChromeOSListenerInterfaceBase {};

using ChromeOSListenerPtrDataView =
    mojo::InterfacePtrDataView<ChromeOSListenerInterfaceBase>;
using ChromeOSListenerRequestDataView =
    mojo::InterfaceRequestDataView<ChromeOSListenerInterfaceBase>;
using ChromeOSListenerAssociatedPtrInfoDataView =
    mojo::AssociatedInterfacePtrInfoDataView<ChromeOSListenerInterfaceBase>;
using ChromeOSListenerAssociatedRequestDataView =
    mojo::AssociatedInterfaceRequestDataView<ChromeOSListenerInterfaceBase>;
class RendererConfigurationInterfaceBase {};

using RendererConfigurationPtrDataView =
    mojo::InterfacePtrDataView<RendererConfigurationInterfaceBase>;
using RendererConfigurationRequestDataView =
    mojo::InterfaceRequestDataView<RendererConfigurationInterfaceBase>;
using RendererConfigurationAssociatedPtrInfoDataView =
    mojo::AssociatedInterfacePtrInfoDataView<RendererConfigurationInterfaceBase>;
using RendererConfigurationAssociatedRequestDataView =
    mojo::AssociatedInterfaceRequestDataView<RendererConfigurationInterfaceBase>;


class DynamicParamsDataView {
 public:
  DynamicParamsDataView() = default;

  DynamicParamsDataView(
      internal::DynamicParams_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

  bool is_null() const { return !data_; }
  bool force_safe_search() const {
    return data_->force_safe_search;
  }
  int32_t youtube_restrict() const {
    return data_->youtube_restrict;
  }
  inline void GetAllowedDomainsForAppsDataView(
      mojo::StringDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadAllowedDomainsForApps(UserType* output) {
    
    auto* pointer = data_->allowed_domains_for_apps.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
 private:
  internal::DynamicParams_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};


}  // chrome::mojom

#endif  // CHROME_COMMON_RENDERER_CONFIGURATION_MOJOM_DATA_VIEW_H_