// third_party/blink/public/mojom/page/prerender_page_param.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_PAGE_PRERENDER_PAGE_PARAM_MOJOM_DATA_VIEW_H_
#define THIRD_PARTY_BLINK_PUBLIC_MOJOM_PAGE_PRERENDER_PAGE_PARAM_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/page/prerender_page_param.mojom-shared-internal.h"


namespace blink::mojom {
class PrerenderParamDataView;



}  // blink::mojom


namespace mojo {
namespace internal {

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

}  // namespace internal
}  // namespace mojo


namespace blink::mojom {


class PrerenderParamDataView {
 public:
  PrerenderParamDataView() = default;

  PrerenderParamDataView(
      internal::PrerenderParam_Data* data,
      mojo::Message* message)
      : data_(data), message_(message) {}

  bool is_null() const { return !data_; }
  inline void GetPageMetricSuffixDataView(
      mojo::StringDataView* output);

  template <typename UserType>
  [[nodiscard]] bool ReadPageMetricSuffix(UserType* output) {
    
    auto* pointer = data_->page_metric_suffix.Get();
    return mojo::internal::Deserialize<mojo::StringDataView>(
        pointer, output, message_);
  }
  bool should_warm_up_compositor() const {
    return data_->should_warm_up_compositor;
  }
  bool should_prepare_paint_tree() const {
    return data_->should_prepare_paint_tree;
  }
  bool should_pause_javascript_execution() const {
    return data_->should_pause_javascript_execution;
  }
 private:
  internal::PrerenderParam_Data* data_ = nullptr;
  mojo::Message* message_ = nullptr;
};


}  // blink::mojom

#endif  // THIRD_PARTY_BLINK_PUBLIC_MOJOM_PAGE_PRERENDER_PAGE_PARAM_MOJOM_DATA_VIEW_H_