// third_party/blink/public/mojom/navigation/navigation_params.mojom.cc is auto generated by mojom_bindings_generator.py, do not edit

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif

#include "third_party/blink/public/mojom/navigation/navigation_params.mojom.h"
#include <math.h>
#include <stdint.h>
#include <utility>
#include "base/debug/alias.h"
#include "base/notreached.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/typed_macros.h"
#include "mojo/public/cpp/bindings/lib/default_construct_tag_internal.h"
#include "mojo/public/cpp/bindings/lib/generated_code_util.h"
#include "mojo/public/cpp/bindings/lib/message_internal.h"
#include "mojo/public/cpp/bindings/lib/proxy_to_responder.h"
#include "mojo/public/cpp/bindings/lib/send_message_helper.h"
#include "mojo/public/cpp/bindings/lib/serialization.h"
#include "mojo/public/cpp/bindings/lib/unserialized_message_context.h"
#include "mojo/public/cpp/bindings/lib/validate_params.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/mojo_buildflags.h"
#include "mojo/public/cpp/bindings/urgent_message_scope.h"
#include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value.h"

#include "third_party/blink/public/mojom/navigation/navigation_params.mojom-params-data.h"
#include "third_party/blink/public/mojom/navigation/navigation_params.mojom-shared-message-ids.h"

#include "third_party/blink/public/mojom/navigation/navigation_params.mojom-import-headers.h"
#include "third_party/blink/public/mojom/navigation/navigation_params.mojom-test-utils.h"
#include "services/network/public/mojom/cookie_access_observer.mojom.h"
#include "services/network/public/mojom/device_bound_sessions.mojom.h"
#include "services/network/public/mojom/devtools_observer.mojom.h"
#include "services/network/public/mojom/trust_token_access_observer.mojom.h"
#include "third_party/blink/public/common/frame/view_transition_state_mojom_traits.h"
#include "third_party/blink/public/common/messaging/task_attribution_id_mojom_traits.h"


namespace blink::mojom {
BeginNavigationParams::BeginNavigationParams()
    : initiator_frame_token(),
      initiator_state_token(),
      initiator_document_token(),
      headers(),
      load_flags(0),
      skip_service_worker(false),
      request_context_type(::blink::mojom::RequestContextType::UNSPECIFIED),
      mixed_content_context_type(::blink::mojom::MixedContentContextType::kNotMixedContent),
      is_form_submission(false),
      was_initiated_by_link_click(false),
      force_history_push(ForceHistoryPush::kNo),
      searchable_form_url(),
      searchable_form_encoding(),
      client_side_redirect_url(),
      devtools_initiator(),
      trust_token_params(),
      before_unload_start(),
      before_unload_end(),
      before_unload_dialog_opened(),
      before_unload_dialog_closed(),
      started_with_transient_activation(),
      started_by_ad(),
      is_container_initiated(false),
      has_rel_opener(false),
      script_tool_invocation_id() {}

BeginNavigationParams::BeginNavigationParams(
    const std::optional<::blink::LocalFrameToken>& initiator_frame_token_in,
    const std::optional<::base::UnguessableToken>& initiator_state_token_in,
    const std::optional<::blink::DocumentToken>& initiator_document_token_in,
    const std::string& headers_in,
    int32_t load_flags_in,
    bool skip_service_worker_in,
    ::blink::mojom::RequestContextType request_context_type_in,
    ::blink::mojom::MixedContentContextType mixed_content_context_type_in,
    bool is_form_submission_in,
    bool was_initiated_by_link_click_in,
    ForceHistoryPush force_history_push_in,
    const ::GURL& searchable_form_url_in,
    const std::string& searchable_form_encoding_in,
    const ::GURL& client_side_redirect_url_in,
    std::optional<::base::DictValue> devtools_initiator_in,
    ::network::mojom::TrustTokenParamsPtr trust_token_params_in,
    ::base::TimeTicks before_unload_start_in,
    ::base::TimeTicks before_unload_end_in,
    ::base::TimeTicks before_unload_dialog_opened_in,
    ::base::TimeTicks before_unload_dialog_closed_in,
    bool started_with_transient_activation_in,
    bool started_by_ad_in,
    bool is_container_initiated_in,
    bool has_rel_opener_in,
    const std::optional<::base::UnguessableToken>& script_tool_invocation_id_in)
    : initiator_frame_token(std::move(initiator_frame_token_in)),
      initiator_state_token(std::move(initiator_state_token_in)),
      initiator_document_token(std::move(initiator_document_token_in)),
      headers(std::move(headers_in)),
      load_flags(std::move(load_flags_in)),
      skip_service_worker(std::move(skip_service_worker_in)),
      request_context_type(std::move(request_context_type_in)),
      mixed_content_context_type(std::move(mixed_content_context_type_in)),
      is_form_submission(std::move(is_form_submission_in)),
      was_initiated_by_link_click(std::move(was_initiated_by_link_click_in)),
      force_history_push(std::move(force_history_push_in)),
      searchable_form_url(std::move(searchable_form_url_in)),
      searchable_form_encoding(std::move(searchable_form_encoding_in)),
      client_side_redirect_url(std::move(client_side_redirect_url_in)),
      devtools_initiator(std::move(devtools_initiator_in)),
      trust_token_params(std::move(trust_token_params_in)),
      before_unload_start(std::move(before_unload_start_in)),
      before_unload_end(std::move(before_unload_end_in)),
      before_unload_dialog_opened(std::move(before_unload_dialog_opened_in)),
      before_unload_dialog_closed(std::move(before_unload_dialog_closed_in)),
      started_with_transient_activation(std::move(started_with_transient_activation_in)),
      started_by_ad(std::move(started_by_ad_in)),
      is_container_initiated(std::move(is_container_initiated_in)),
      has_rel_opener(std::move(has_rel_opener_in)),
      script_tool_invocation_id(std::move(script_tool_invocation_id_in)) {}

BeginNavigationParams::~BeginNavigationParams() = default;

void BeginNavigationParams::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "initiator_frame_token"), this->initiator_frame_token,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<::blink::LocalFrameToken>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "initiator_state_token"), this->initiator_state_token,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<::base::UnguessableToken>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "initiator_document_token"), this->initiator_document_token,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<::blink::DocumentToken>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "headers"), this->headers,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "load_flags"), this->load_flags,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type int32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "skip_service_worker"), this->skip_service_worker,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "request_context_type"), this->request_context_type,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::blink::mojom::RequestContextType>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "mixed_content_context_type"), this->mixed_content_context_type,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::blink::mojom::MixedContentContextType>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "is_form_submission"), this->is_form_submission,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "was_initiated_by_link_click"), this->was_initiated_by_link_click,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "force_history_push"), this->force_history_push,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ForceHistoryPush>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "searchable_form_url"), this->searchable_form_url,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::GURL&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "searchable_form_encoding"), this->searchable_form_encoding,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "client_side_redirect_url"), this->client_side_redirect_url,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::GURL&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "devtools_initiator"), this->devtools_initiator,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type std::optional<::base::DictValue>>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "trust_token_params"), this->trust_token_params,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::network::mojom::TrustTokenParamsPtr>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "before_unload_start"), this->before_unload_start,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::base::TimeTicks>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "before_unload_end"), this->before_unload_end,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::base::TimeTicks>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "before_unload_dialog_opened"), this->before_unload_dialog_opened,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::base::TimeTicks>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "before_unload_dialog_closed"), this->before_unload_dialog_closed,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::base::TimeTicks>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "started_with_transient_activation"), this->started_with_transient_activation,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "started_by_ad"), this->started_by_ad,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "is_container_initiated"), this->is_container_initiated,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "has_rel_opener"), this->has_rel_opener,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "script_tool_invocation_id"), this->script_tool_invocation_id,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<::base::UnguessableToken>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool BeginNavigationParams::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
CommonNavigationParams::CommonNavigationParams()
    : url(),
      initiator_origin(),
      initiator_base_url(),
      referrer(),
      transition(),
      navigation_type(NavigationType::DIFFERENT_DOCUMENT),
      download_policy(),
      should_replace_current_entry(false),
      base_url_for_data_url(),
      actual_navigation_start(),
      navigation_start(),
      method("GET"),
      post_data(),
      source_location(),
      started_from_context_menu(false),
      has_possibly_filtered_user_gesture(false),
      text_fragment_token(false),
      should_check_main_world_csp(::network::mojom::CSPDisposition::CHECK),
      initiator_origin_trial_features(),
      href_translate(),
      is_history_navigation_in_new_child_frame(false),
      input_start(),
      request_destination(::network::mojom::RequestDestination::kEmpty) {}

CommonNavigationParams::CommonNavigationParams(
    const ::GURL& url_in,
    const std::optional<::url::Origin>& initiator_origin_in,
    const std::optional<::GURL>& initiator_base_url_in,
    ::blink::mojom::ReferrerPtr referrer_in,
    int32_t transition_in,
    NavigationType navigation_type_in,
    const ::blink::NavigationDownloadPolicy& download_policy_in,
    bool should_replace_current_entry_in,
    const ::GURL& base_url_for_data_url_in,
    ::base::TimeTicks actual_navigation_start_in,
    ::base::TimeTicks navigation_start_in,
    const std::string& method_in,
    ::scoped_refptr<::network::ResourceRequestBody> post_data_in,
    ::network::mojom::SourceLocationPtr source_location_in,
    bool started_from_context_menu_in,
    bool has_possibly_filtered_user_gesture_in,
    bool text_fragment_token_in,
    ::network::mojom::CSPDisposition should_check_main_world_csp_in,
    std::vector<int32_t> initiator_origin_trial_features_in,
    const std::string& href_translate_in,
    bool is_history_navigation_in_new_child_frame_in,
    ::base::TimeTicks input_start_in,
    ::network::mojom::RequestDestination request_destination_in)
    : url(std::move(url_in)),
      initiator_origin(std::move(initiator_origin_in)),
      initiator_base_url(std::move(initiator_base_url_in)),
      referrer(std::move(referrer_in)),
      transition(std::move(transition_in)),
      navigation_type(std::move(navigation_type_in)),
      download_policy(std::move(download_policy_in)),
      should_replace_current_entry(std::move(should_replace_current_entry_in)),
      base_url_for_data_url(std::move(base_url_for_data_url_in)),
      actual_navigation_start(std::move(actual_navigation_start_in)),
      navigation_start(std::move(navigation_start_in)),
      method(std::move(method_in)),
      post_data(std::move(post_data_in)),
      source_location(std::move(source_location_in)),
      started_from_context_menu(std::move(started_from_context_menu_in)),
      has_possibly_filtered_user_gesture(std::move(has_possibly_filtered_user_gesture_in)),
      text_fragment_token(std::move(text_fragment_token_in)),
      should_check_main_world_csp(std::move(should_check_main_world_csp_in)),
      initiator_origin_trial_features(std::move(initiator_origin_trial_features_in)),
      href_translate(std::move(href_translate_in)),
      is_history_navigation_in_new_child_frame(std::move(is_history_navigation_in_new_child_frame_in)),
      input_start(std::move(input_start_in)),
      request_destination(std::move(request_destination_in)) {}

CommonNavigationParams::~CommonNavigationParams() = default;

void CommonNavigationParams::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "url"), this->url,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::GURL&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "initiator_origin"), this->initiator_origin,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<::url::Origin>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "initiator_base_url"), this->initiator_base_url,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<::GURL>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "referrer"), this->referrer,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::blink::mojom::ReferrerPtr>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "transition"), this->transition,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type int32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "navigation_type"), this->navigation_type,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type NavigationType>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "download_policy"), this->download_policy,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::blink::NavigationDownloadPolicy&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "should_replace_current_entry"), this->should_replace_current_entry,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "base_url_for_data_url"), this->base_url_for_data_url,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::GURL&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "actual_navigation_start"), this->actual_navigation_start,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::base::TimeTicks>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "navigation_start"), this->navigation_start,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::base::TimeTicks>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "method"), this->method,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "post_data"), this->post_data,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::scoped_refptr<::network::ResourceRequestBody>>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "source_location"), this->source_location,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::network::mojom::SourceLocationPtr>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "started_from_context_menu"), this->started_from_context_menu,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "has_possibly_filtered_user_gesture"), this->has_possibly_filtered_user_gesture,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "text_fragment_token"), this->text_fragment_token,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "should_check_main_world_csp"), this->should_check_main_world_csp,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::network::mojom::CSPDisposition>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "initiator_origin_trial_features"), this->initiator_origin_trial_features,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::vector<int32_t>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "href_translate"), this->href_translate,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "is_history_navigation_in_new_child_frame"), this->is_history_navigation_in_new_child_frame,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "input_start"), this->input_start,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::base::TimeTicks>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "request_destination"), this->request_destination,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::network::mojom::RequestDestination>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool CommonNavigationParams::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
NavigationTiming::NavigationTiming()
    : redirect_start(),
      redirect_end(),
      fetch_start(),
      parent_resource_timing_access(ParentResourceTimingAccess::kDoNotReport) {}

NavigationTiming::NavigationTiming(
    ::base::TimeTicks redirect_start_in,
    ::base::TimeTicks redirect_end_in,
    ::base::TimeTicks fetch_start_in,
    ParentResourceTimingAccess parent_resource_timing_access_in)
    : redirect_start(std::move(redirect_start_in)),
      redirect_end(std::move(redirect_end_in)),
      fetch_start(std::move(fetch_start_in)),
      parent_resource_timing_access(std::move(parent_resource_timing_access_in)) {}

NavigationTiming::~NavigationTiming() = default;

void NavigationTiming::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "redirect_start"), this->redirect_start,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::base::TimeTicks>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "redirect_end"), this->redirect_end,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::base::TimeTicks>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "fetch_start"), this->fetch_start,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::base::TimeTicks>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "parent_resource_timing_access"), this->parent_resource_timing_access,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ParentResourceTimingAccess>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool NavigationTiming::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
NavigationRedirectParams::NavigationRedirectParams()
    : redirect_info(),
      response_head() {}

NavigationRedirectParams::NavigationRedirectParams(
    const ::net::RedirectInfo& redirect_info_in,
    ::network::mojom::URLResponseHeadPtr response_head_in)
    : redirect_info(std::move(redirect_info_in)),
      response_head(std::move(response_head_in)) {}

NavigationRedirectParams::~NavigationRedirectParams() = default;

void NavigationRedirectParams::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "redirect_info"), this->redirect_info,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::net::RedirectInfo&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "response_head"), this->response_head,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::network::mojom::URLResponseHeadPtr>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool NavigationRedirectParams::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
OldPageInfo::OldPageInfo()
    : frame_token_for_old_main_frame(),
      new_lifecycle_state_for_old_page() {}

OldPageInfo::OldPageInfo(
    const ::blink::LocalFrameToken& frame_token_for_old_main_frame_in,
    ::blink::mojom::PageLifecycleStatePtr new_lifecycle_state_for_old_page_in)
    : frame_token_for_old_main_frame(std::move(frame_token_for_old_main_frame_in)),
      new_lifecycle_state_for_old_page(std::move(new_lifecycle_state_for_old_page_in)) {}

OldPageInfo::~OldPageInfo() = default;

void OldPageInfo::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "frame_token_for_old_main_frame"), this->frame_token_for_old_main_frame,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::blink::LocalFrameToken&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "new_lifecycle_state_for_old_page"), this->new_lifecycle_state_for_old_page,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::blink::mojom::PageLifecycleStatePtr>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool OldPageInfo::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
IsolatedAppPermissionPolicyEntry::IsolatedAppPermissionPolicyEntry()
    : feature(),
      allowed_origins() {}

IsolatedAppPermissionPolicyEntry::IsolatedAppPermissionPolicyEntry(
    const std::string& feature_in,
    std::vector<std::string> allowed_origins_in)
    : feature(std::move(feature_in)),
      allowed_origins(std::move(allowed_origins_in)) {}

IsolatedAppPermissionPolicyEntry::~IsolatedAppPermissionPolicyEntry() = default;

void IsolatedAppPermissionPolicyEntry::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "feature"), this->feature,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "allowed_origins"), this->allowed_origins,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::vector<std::string>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool IsolatedAppPermissionPolicyEntry::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
CommitNavigationParams::CommitNavigationParams()
    : origin_to_commit(),
      storage_key(),
      is_overriding_user_agent(false),
      redirects(),
      redirect_params(),
      post_content_type(),
      original_url(),
      original_method(),
      can_load_local_resources(false),
      page_state(),
      nav_entry_id(0),
      subframe_unique_names(),
      intended_as_new_entry(false),
      pending_history_list_index(-1),
      current_history_list_index(-1),
      current_history_list_length(0),
      was_discarded(false),
      is_view_source(false),
      should_clear_history_list(false),
      navigation_timing(),
      was_activated(::blink::mojom::WasActivatedOption::kUnknown),
      navigation_token(),
      prefetched_signed_exchanges(),
      data_url_as_string(),
      is_browser_initiated(false),
      has_ua_visual_transition(false),
      document_ukm_source_id(),
      frame_policy(),
      force_enabled_origin_trials(),
      agent_cluster_key(),
      enabled_client_hints(),
      is_cross_site_cross_browsing_context_group(false),
      should_have_sticky_user_activation(false),
      old_page_info(),
      http_response_code(-1),
      navigation_api_history_entry_arrays(),
      early_hints_preloaded_resources(),
      early_hints_preconnects(),
      navigation_preconnects(),
      commit_sent(),
      srcdoc_value(),
      is_load_data_with_base_url(false),
      ancestor_or_self_has_cspee(false),
      reduced_accept_language(),
      navigation_delivery_type(::network::mojom::NavigationDeliveryType::kDefault),
      view_transition_state(),
      soft_navigation_heuristics_task_id(),
      modified_runtime_features(),
      fenced_frame_properties(),
      not_restored_reasons(),
      load_with_storage_access(mojo::internal::ConvertEnumValue<::network::mojom::StorageAccessApiStatus, ::net::StorageAccessApiStatus>(::network::mojom::StorageAccessApiStatus::kNone)),
      browsing_context_group_token(),
      lcpp_hint(),
      content_settings(),
      visited_link_salt(),
      local_surface_id(),
      initial_permission_statuses(),
      should_skip_screenshot(),
      force_new_document_sequence_number(false),
      navigation_metrics_token(),
      commit_target_frame_token(),
      is_initial_webui(false),
      isolated_app_policy(),
      internal_scroll_to_text_fragment(),
      is_secure_context_root(false),
      script_injection_policy(ScriptInjectionPolicy::kNone) {}

CommitNavigationParams::CommitNavigationParams(
    const ::url::Origin& origin_to_commit_in,
    const ::blink::StorageKey& storage_key_in,
    bool is_overriding_user_agent_in,
    std::vector<::GURL> redirects_in,
    std::vector<NavigationRedirectParamsPtr> redirect_params_in,
    const std::string& post_content_type_in,
    const ::GURL& original_url_in,
    const std::string& original_method_in,
    bool can_load_local_resources_in,
    const std::string& page_state_in,
    int32_t nav_entry_id_in,
    const base::flat_map<std::string, bool>& subframe_unique_names_in,
    bool intended_as_new_entry_in,
    int32_t pending_history_list_index_in,
    int32_t current_history_list_index_in,
    int32_t current_history_list_length_in,
    bool was_discarded_in,
    bool is_view_source_in,
    bool should_clear_history_list_in,
    NavigationTimingPtr navigation_timing_in,
    ::blink::mojom::WasActivatedOption was_activated_in,
    const ::base::UnguessableToken& navigation_token_in,
    std::vector<::blink::mojom::PrefetchedSignedExchangeInfoPtr> prefetched_signed_exchanges_in,
    const std::string& data_url_as_string_in,
    bool is_browser_initiated_in,
    bool has_ua_visual_transition_in,
    int64_t document_ukm_source_id_in,
    const ::blink::FramePolicy& frame_policy_in,
    std::vector<std::string> force_enabled_origin_trials_in,
    ::blink::mojom::AgentClusterKeyPtr agent_cluster_key_in,
    std::vector<::network::mojom::WebClientHintsType> enabled_client_hints_in,
    bool is_cross_site_cross_browsing_context_group_in,
    bool should_have_sticky_user_activation_in,
    OldPageInfoPtr old_page_info_in,
    int32_t http_response_code_in,
    ::blink::mojom::NavigationApiHistoryEntryArraysPtr navigation_api_history_entry_arrays_in,
    std::vector<::network::mojom::LinkHeaderPtr> early_hints_preloaded_resources_in,
    std::vector<::network::mojom::LinkHeaderPtr> early_hints_preconnects_in,
    std::vector<::network::mojom::LinkHeaderPtr> navigation_preconnects_in,
    ::base::TimeTicks commit_sent_in,
    const std::string& srcdoc_value_in,
    bool is_load_data_with_base_url_in,
    bool ancestor_or_self_has_cspee_in,
    const std::string& reduced_accept_language_in,
    ::network::mojom::NavigationDeliveryType navigation_delivery_type_in,
    const std::optional<::blink::ViewTransitionState>& view_transition_state_in,
    std::optional<::blink::scheduler::TaskAttributionId> soft_navigation_heuristics_task_id_in,
    const base::flat_map<::blink::mojom::RuntimeFeature, bool>& modified_runtime_features_in,
    const std::optional<::blink::FencedFrame::RedactedFencedFrameProperties>& fenced_frame_properties_in,
    ::blink::mojom::BackForwardCacheNotRestoredReasonsPtr not_restored_reasons_in,
    ::net::StorageAccessApiStatus load_with_storage_access_in,
    const std::optional<::base::UnguessableToken>& browsing_context_group_token_in,
    ::blink::mojom::LCPCriticalPathPredictorNavigationTimeHintPtr lcpp_hint_in,
    ::blink::mojom::RendererContentSettingsPtr content_settings_in,
    std::optional<uint64_t> visited_link_salt_in,
    const std::optional<::viz::LocalSurfaceId>& local_surface_id_in,
    const std::optional<base::flat_map<::blink::mojom::PermissionName, ::blink::mojom::PermissionStatus>>& initial_permission_statuses_in,
    bool should_skip_screenshot_in,
    bool force_new_document_sequence_number_in,
    const ::base::UnguessableToken& navigation_metrics_token_in,
    const std::optional<::blink::LocalFrameToken>& commit_target_frame_token_in,
    bool is_initial_webui_in,
    std::optional<std::vector<IsolatedAppPermissionPolicyEntryPtr>> isolated_app_policy_in,
    const std::optional<std::string>& internal_scroll_to_text_fragment_in,
    bool is_secure_context_root_in,
    ScriptInjectionPolicy script_injection_policy_in)
    : origin_to_commit(std::move(origin_to_commit_in)),
      storage_key(std::move(storage_key_in)),
      is_overriding_user_agent(std::move(is_overriding_user_agent_in)),
      redirects(std::move(redirects_in)),
      redirect_params(std::move(redirect_params_in)),
      post_content_type(std::move(post_content_type_in)),
      original_url(std::move(original_url_in)),
      original_method(std::move(original_method_in)),
      can_load_local_resources(std::move(can_load_local_resources_in)),
      page_state(std::move(page_state_in)),
      nav_entry_id(std::move(nav_entry_id_in)),
      subframe_unique_names(std::move(subframe_unique_names_in)),
      intended_as_new_entry(std::move(intended_as_new_entry_in)),
      pending_history_list_index(std::move(pending_history_list_index_in)),
      current_history_list_index(std::move(current_history_list_index_in)),
      current_history_list_length(std::move(current_history_list_length_in)),
      was_discarded(std::move(was_discarded_in)),
      is_view_source(std::move(is_view_source_in)),
      should_clear_history_list(std::move(should_clear_history_list_in)),
      navigation_timing(std::move(navigation_timing_in)),
      was_activated(std::move(was_activated_in)),
      navigation_token(std::move(navigation_token_in)),
      prefetched_signed_exchanges(std::move(prefetched_signed_exchanges_in)),
      data_url_as_string(std::move(data_url_as_string_in)),
      is_browser_initiated(std::move(is_browser_initiated_in)),
      has_ua_visual_transition(std::move(has_ua_visual_transition_in)),
      document_ukm_source_id(std::move(document_ukm_source_id_in)),
      frame_policy(std::move(frame_policy_in)),
      force_enabled_origin_trials(std::move(force_enabled_origin_trials_in)),
      agent_cluster_key(std::move(agent_cluster_key_in)),
      enabled_client_hints(std::move(enabled_client_hints_in)),
      is_cross_site_cross_browsing_context_group(std::move(is_cross_site_cross_browsing_context_group_in)),
      should_have_sticky_user_activation(std::move(should_have_sticky_user_activation_in)),
      old_page_info(std::move(old_page_info_in)),
      http_response_code(std::move(http_response_code_in)),
      navigation_api_history_entry_arrays(std::move(navigation_api_history_entry_arrays_in)),
      early_hints_preloaded_resources(std::move(early_hints_preloaded_resources_in)),
      early_hints_preconnects(std::move(early_hints_preconnects_in)),
      navigation_preconnects(std::move(navigation_preconnects_in)),
      commit_sent(std::move(commit_sent_in)),
      srcdoc_value(std::move(srcdoc_value_in)),
      is_load_data_with_base_url(std::move(is_load_data_with_base_url_in)),
      ancestor_or_self_has_cspee(std::move(ancestor_or_self_has_cspee_in)),
      reduced_accept_language(std::move(reduced_accept_language_in)),
      navigation_delivery_type(std::move(navigation_delivery_type_in)),
      view_transition_state(std::move(view_transition_state_in)),
      soft_navigation_heuristics_task_id(std::move(soft_navigation_heuristics_task_id_in)),
      modified_runtime_features(std::move(modified_runtime_features_in)),
      fenced_frame_properties(std::move(fenced_frame_properties_in)),
      not_restored_reasons(std::move(not_restored_reasons_in)),
      load_with_storage_access(std::move(load_with_storage_access_in)),
      browsing_context_group_token(std::move(browsing_context_group_token_in)),
      lcpp_hint(std::move(lcpp_hint_in)),
      content_settings(std::move(content_settings_in)),
      visited_link_salt(std::move(visited_link_salt_in)),
      local_surface_id(std::move(local_surface_id_in)),
      initial_permission_statuses(std::move(initial_permission_statuses_in)),
      should_skip_screenshot(std::move(should_skip_screenshot_in)),
      force_new_document_sequence_number(std::move(force_new_document_sequence_number_in)),
      navigation_metrics_token(std::move(navigation_metrics_token_in)),
      commit_target_frame_token(std::move(commit_target_frame_token_in)),
      is_initial_webui(std::move(is_initial_webui_in)),
      isolated_app_policy(std::move(isolated_app_policy_in)),
      internal_scroll_to_text_fragment(std::move(internal_scroll_to_text_fragment_in)),
      is_secure_context_root(std::move(is_secure_context_root_in)),
      script_injection_policy(std::move(script_injection_policy_in)) {}

CommitNavigationParams::~CommitNavigationParams() = default;

void CommitNavigationParams::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "origin_to_commit"), this->origin_to_commit,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::url::Origin&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "storage_key"), this->storage_key,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::blink::StorageKey&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "is_overriding_user_agent"), this->is_overriding_user_agent,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "redirects"), this->redirects,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::vector<::GURL>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "redirect_params"), this->redirect_params,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type std::vector<NavigationRedirectParamsPtr>>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "post_content_type"), this->post_content_type,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "original_url"), this->original_url,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::GURL&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "original_method"), this->original_method,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "can_load_local_resources"), this->can_load_local_resources,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "page_state"), this->page_state,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "nav_entry_id"), this->nav_entry_id,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type int32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "subframe_unique_names"), this->subframe_unique_names,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const base::flat_map<std::string, bool>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "intended_as_new_entry"), this->intended_as_new_entry,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "pending_history_list_index"), this->pending_history_list_index,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type int32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "current_history_list_index"), this->current_history_list_index,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type int32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "current_history_list_length"), this->current_history_list_length,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type int32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "was_discarded"), this->was_discarded,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "is_view_source"), this->is_view_source,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "should_clear_history_list"), this->should_clear_history_list,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "navigation_timing"), this->navigation_timing,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type NavigationTimingPtr>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "was_activated"), this->was_activated,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::blink::mojom::WasActivatedOption>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "navigation_token"), this->navigation_token,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::base::UnguessableToken&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "prefetched_signed_exchanges"), this->prefetched_signed_exchanges,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type std::vector<::blink::mojom::PrefetchedSignedExchangeInfoPtr>>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "data_url_as_string"), this->data_url_as_string,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "is_browser_initiated"), this->is_browser_initiated,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "has_ua_visual_transition"), this->has_ua_visual_transition,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "document_ukm_source_id"), this->document_ukm_source_id,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type int64_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "frame_policy"), this->frame_policy,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::blink::FramePolicy&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "force_enabled_origin_trials"), this->force_enabled_origin_trials,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::vector<std::string>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "agent_cluster_key"), this->agent_cluster_key,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::blink::mojom::AgentClusterKeyPtr>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "enabled_client_hints"), this->enabled_client_hints,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::vector<::network::mojom::WebClientHintsType>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "is_cross_site_cross_browsing_context_group"), this->is_cross_site_cross_browsing_context_group,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "should_have_sticky_user_activation"), this->should_have_sticky_user_activation,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "old_page_info"), this->old_page_info,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type OldPageInfoPtr>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "http_response_code"), this->http_response_code,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type int32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "navigation_api_history_entry_arrays"), this->navigation_api_history_entry_arrays,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::blink::mojom::NavigationApiHistoryEntryArraysPtr>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "early_hints_preloaded_resources"), this->early_hints_preloaded_resources,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type std::vector<::network::mojom::LinkHeaderPtr>>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "early_hints_preconnects"), this->early_hints_preconnects,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type std::vector<::network::mojom::LinkHeaderPtr>>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "navigation_preconnects"), this->navigation_preconnects,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type std::vector<::network::mojom::LinkHeaderPtr>>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "commit_sent"), this->commit_sent,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::base::TimeTicks>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "srcdoc_value"), this->srcdoc_value,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "is_load_data_with_base_url"), this->is_load_data_with_base_url,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "ancestor_or_self_has_cspee"), this->ancestor_or_self_has_cspee,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "reduced_accept_language"), this->reduced_accept_language,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "navigation_delivery_type"), this->navigation_delivery_type,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::network::mojom::NavigationDeliveryType>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "view_transition_state"), this->view_transition_state,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<::blink::ViewTransitionState>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "soft_navigation_heuristics_task_id"), this->soft_navigation_heuristics_task_id,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type std::optional<::blink::scheduler::TaskAttributionId>>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "modified_runtime_features"), this->modified_runtime_features,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const base::flat_map<::blink::mojom::RuntimeFeature, bool>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "fenced_frame_properties"), this->fenced_frame_properties,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<::blink::FencedFrame::RedactedFencedFrameProperties>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "not_restored_reasons"), this->not_restored_reasons,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::blink::mojom::BackForwardCacheNotRestoredReasonsPtr>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "load_with_storage_access"), this->load_with_storage_access,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::net::StorageAccessApiStatus>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "browsing_context_group_token"), this->browsing_context_group_token,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<::base::UnguessableToken>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "lcpp_hint"), this->lcpp_hint,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::blink::mojom::LCPCriticalPathPredictorNavigationTimeHintPtr>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "content_settings"), this->content_settings,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::blink::mojom::RendererContentSettingsPtr>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "visited_link_salt"), this->visited_link_salt,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type std::optional<uint64_t>>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "local_surface_id"), this->local_surface_id,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<::viz::LocalSurfaceId>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "initial_permission_statuses"), this->initial_permission_statuses,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<base::flat_map<::blink::mojom::PermissionName, ::blink::mojom::PermissionStatus>>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "should_skip_screenshot"), this->should_skip_screenshot,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "force_new_document_sequence_number"), this->force_new_document_sequence_number,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "navigation_metrics_token"), this->navigation_metrics_token,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::base::UnguessableToken&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "commit_target_frame_token"), this->commit_target_frame_token,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<::blink::LocalFrameToken>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "is_initial_webui"), this->is_initial_webui,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "isolated_app_policy"), this->isolated_app_policy,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type std::optional<std::vector<IsolatedAppPermissionPolicyEntryPtr>>>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "internal_scroll_to_text_fragment"), this->internal_scroll_to_text_fragment,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<std::string>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "is_secure_context_root"), this->is_secure_context_root,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "script_injection_policy"), this->script_injection_policy,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ScriptInjectionPolicy>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool CommitNavigationParams::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
PageSwapEventParams::PageSwapEventParams()
    : url(),
      page_state(),
      navigation_type() {}

PageSwapEventParams::PageSwapEventParams(
    const ::GURL& url_in,
    const std::string& page_state_in,
    ::blink::mojom::NavigationTypeForNavigationApi navigation_type_in)
    : url(std::move(url_in)),
      page_state(std::move(page_state_in)),
      navigation_type(std::move(navigation_type_in)) {}

PageSwapEventParams::~PageSwapEventParams() = default;

void PageSwapEventParams::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "url"), this->url,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::GURL&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "page_state"), this->page_state,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "navigation_type"), this->navigation_type,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::blink::mojom::NavigationTypeForNavigationApi>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool PageSwapEventParams::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
// The declaration includes the definition on other builds.

NavigationResumeDeferredCommitListener::IPCStableHashFunction NavigationResumeDeferredCommitListener::MessageToMethodInfo_(mojo::Message& message) {
#if !BUILDFLAG(IS_FUCHSIA)
  switch (static_cast<messages::NavigationResumeDeferredCommitListener>(message.name())) {
    case messages::NavigationResumeDeferredCommitListener::kResumeDeferredCommit: {
      return &NavigationResumeDeferredCommitListener::ResumeDeferredCommit_Sym::IPCStableHash;
    }
  }
#endif  // !BUILDFLAG(IS_FUCHSIA)
  return nullptr;
}


const char* NavigationResumeDeferredCommitListener::MessageToMethodName_(mojo::Message& message) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  bool is_response = message.has_flag(mojo::Message::kFlagIsResponse);
  if (!is_response) {
    switch (static_cast<messages::NavigationResumeDeferredCommitListener>(message.name())) {
      case messages::NavigationResumeDeferredCommitListener::kResumeDeferredCommit:
            return "Receive blink::mojom::NavigationResumeDeferredCommitListener::ResumeDeferredCommit";
    }
  } else {
    switch (static_cast<messages::NavigationResumeDeferredCommitListener>(message.name())) {
      case messages::NavigationResumeDeferredCommitListener::kResumeDeferredCommit:
            return "Receive reply blink::mojom::NavigationResumeDeferredCommitListener::ResumeDeferredCommit";
    }
  }
  return "Receive unknown mojo message";
#else
  bool is_response = message.has_flag(mojo::Message::kFlagIsResponse);
  if (is_response) {
    return "Receive mojo reply";
  } else {
    return "Receive mojo message";
  }
#endif // BUILDFLAG(MOJO_TRACE_ENABLED)
}

#if !BUILDFLAG(IS_FUCHSIA)
uint32_t NavigationResumeDeferredCommitListener::ResumeDeferredCommit_Sym::IPCStableHash() {
  // This method's address is used for identifying the mojo method name after
  // symbolization. So each IPCStableHash should have a unique address.
  // We cannot use NO_CODE_FOLDING() here - it relies on the uniqueness of
  // __LINE__ value, which is not unique across different mojo modules.
  // The code below is very similar to NO_CODE_FOLDING, but it uses a unique
  // hash instead of __LINE__.
  static constexpr uint32_t kHash = 0x337425f2;  // IPCStableHash for blink::mojom::NavigationResumeDeferredCommitListener::ResumeDeferredCommit
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
# endif // !BUILDFLAG(IS_FUCHSIA)

NavigationResumeDeferredCommitListenerProxy::NavigationResumeDeferredCommitListenerProxy(mojo::MessageReceiverWithResponder* receiver)
    : receiver_(receiver) {
}

void NavigationResumeDeferredCommitListenerProxy::ResumeDeferredCommit(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send blink::mojom::NavigationResumeDeferredCommitListener::ResumeDeferredCommit");
#endif

  const bool kExpectsResponse = false;
  const bool kIsSync = false;
  const bool kAllowInterrupt = true;
  const bool is_urgent = false;

  const uint32_t kFlags =
      ((kExpectsResponse) ? mojo::Message::kFlagExpectsResponse : 0) |
      ((kIsSync) ? mojo::Message::kFlagIsSync : 0) |
      ((kAllowInterrupt) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((is_urgent) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::NavigationResumeDeferredCommitListener::kResumeDeferredCommit), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::blink::mojom::internal::NavigationResumeDeferredCommitListener_ResumeDeferredCommit_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(NavigationResumeDeferredCommitListener::Name_);
  message.set_method_name("ResumeDeferredCommit");
#endif
  // This return value may be ignored as false implies the Connector has
  // encountered an error, which will be visible through other means.
  ::mojo::internal::SendMojoMessage(*receiver_, message);
}

// static
bool NavigationResumeDeferredCommitListenerStubDispatch::Accept(
    NavigationResumeDeferredCommitListener* impl,
    mojo::Message* message) {
  switch (static_cast<messages::NavigationResumeDeferredCommitListener>(message->header()->name)) {
    case messages::NavigationResumeDeferredCommitListener::kResumeDeferredCommit: {
      DCHECK(message->is_serialized());
      internal::NavigationResumeDeferredCommitListener_ResumeDeferredCommit_Params_Data* params =
          reinterpret_cast<internal::NavigationResumeDeferredCommitListener_ResumeDeferredCommit_Params_Data*>(
              message->mutable_payload());
      

      // Validation for NavigationResumeDeferredCommitListener.0
      bool success = true;
      NavigationResumeDeferredCommitListener_ResumeDeferredCommit_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            NavigationResumeDeferredCommitListener::Name_, 0, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->ResumeDeferredCommit(        );
      return true;
    }
  }
  return false;
}

// static
bool NavigationResumeDeferredCommitListenerStubDispatch::AcceptWithResponder(
    NavigationResumeDeferredCommitListener* impl,
    mojo::Message* message,
    std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
  [[maybe_unused]] const bool message_is_sync =
      message->has_flag(mojo::Message::kFlagIsSync);
  [[maybe_unused]] const uint64_t request_id = message->request_id();
  switch (static_cast<messages::NavigationResumeDeferredCommitListener>(message->header()->name)) {
    case messages::NavigationResumeDeferredCommitListener::kResumeDeferredCommit: {
      break;
    }
  }
  return false;
}
namespace {
}  // namespace
static const mojo::internal::GenericValidationInfo kNavigationResumeDeferredCommitListenerValidationInfo[] = {
    { &internal::NavigationResumeDeferredCommitListener_ResumeDeferredCommit_Params_Data::Validate,
     nullptr /* no response */},
};

bool NavigationResumeDeferredCommitListenerRequestValidator::Accept(mojo::Message* message) {
  return mojo::internal::ValidateRequestGenericPacked(
    message,
    ::blink::mojom::NavigationResumeDeferredCommitListener::Name_,
    kNavigationResumeDeferredCommitListenerValidationInfo);
}



}  // blink::mojom


namespace mojo {


// static
bool StructTraits<::blink::mojom::BeginNavigationParams::DataView, ::blink::mojom::BeginNavigationParamsPtr>::Read(
    ::blink::mojom::BeginNavigationParams::DataView input,
    ::blink::mojom::BeginNavigationParamsPtr* output) {
  bool success = true;
  ::blink::mojom::BeginNavigationParamsPtr result(::blink::mojom::BeginNavigationParams::New());
  
      if (success && !input.ReadInitiatorFrameToken(&result->initiator_frame_token))
        success = false;
      if (success && !input.ReadInitiatorStateToken(&result->initiator_state_token))
        success = false;
      if (success && !input.ReadInitiatorDocumentToken(&result->initiator_document_token))
        success = false;
      if (success && !input.ReadHeaders(&result->headers))
        success = false;
      if (success)
        result->load_flags = input.load_flags();
      if (success)
        result->skip_service_worker = input.skip_service_worker();
      if (success && !input.ReadRequestContextType(&result->request_context_type))
        success = false;
      if (success && !input.ReadMixedContentContextType(&result->mixed_content_context_type))
        success = false;
      if (success)
        result->is_form_submission = input.is_form_submission();
      if (success)
        result->was_initiated_by_link_click = input.was_initiated_by_link_click();
      if (success && !input.ReadForceHistoryPush(&result->force_history_push))
        success = false;
      if (success && !input.ReadSearchableFormUrl(&result->searchable_form_url))
        success = false;
      if (success && !input.ReadSearchableFormEncoding(&result->searchable_form_encoding))
        success = false;
      if (success && !input.ReadClientSideRedirectUrl(&result->client_side_redirect_url))
        success = false;
      if (success && !input.ReadDevtoolsInitiator(&result->devtools_initiator))
        success = false;
      if (success && !input.ReadTrustTokenParams(&result->trust_token_params))
        success = false;
      if (success && !input.ReadBeforeUnloadStart(&result->before_unload_start))
        success = false;
      if (success && !input.ReadBeforeUnloadEnd(&result->before_unload_end))
        success = false;
      if (success && !input.ReadBeforeUnloadDialogOpened(&result->before_unload_dialog_opened))
        success = false;
      if (success && !input.ReadBeforeUnloadDialogClosed(&result->before_unload_dialog_closed))
        success = false;
      if (success)
        result->started_with_transient_activation = input.started_with_transient_activation();
      if (success)
        result->started_by_ad = input.started_by_ad();
      if (success)
        result->is_container_initiated = input.is_container_initiated();
      if (success)
        result->has_rel_opener = input.has_rel_opener();
      if (success && !input.ReadScriptToolInvocationId(&result->script_tool_invocation_id))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::blink::mojom::CommonNavigationParams::DataView, ::blink::mojom::CommonNavigationParamsPtr>::Read(
    ::blink::mojom::CommonNavigationParams::DataView input,
    ::blink::mojom::CommonNavigationParamsPtr* output) {
  bool success = true;
  ::blink::mojom::CommonNavigationParamsPtr result(::blink::mojom::CommonNavigationParams::New());
  
      if (success && !input.ReadUrl(&result->url))
        success = false;
      if (success && !input.ReadInitiatorOrigin(&result->initiator_origin))
        success = false;
      if (success && !input.ReadInitiatorBaseUrl(&result->initiator_base_url))
        success = false;
      if (success && !input.ReadReferrer(&result->referrer))
        success = false;
      if (success)
        result->transition = input.transition();
      if (success && !input.ReadNavigationType(&result->navigation_type))
        success = false;
      if (success && !input.ReadDownloadPolicy(&result->download_policy))
        success = false;
      if (success)
        result->should_replace_current_entry = input.should_replace_current_entry();
      if (success && !input.ReadBaseUrlForDataUrl(&result->base_url_for_data_url))
        success = false;
      if (success && !input.ReadActualNavigationStart(&result->actual_navigation_start))
        success = false;
      if (success && !input.ReadNavigationStart(&result->navigation_start))
        success = false;
      if (success && !input.ReadMethod(&result->method))
        success = false;
      if (success && !input.ReadPostData(&result->post_data))
        success = false;
      if (success && !input.ReadSourceLocation(&result->source_location))
        success = false;
      if (success)
        result->started_from_context_menu = input.started_from_context_menu();
      if (success)
        result->has_possibly_filtered_user_gesture = input.has_possibly_filtered_user_gesture();
      if (success)
        result->text_fragment_token = input.text_fragment_token();
      if (success && !input.ReadShouldCheckMainWorldCsp(&result->should_check_main_world_csp))
        success = false;
      if (success && !input.ReadInitiatorOriginTrialFeatures(&result->initiator_origin_trial_features))
        success = false;
      if (success && !input.ReadHrefTranslate(&result->href_translate))
        success = false;
      if (success)
        result->is_history_navigation_in_new_child_frame = input.is_history_navigation_in_new_child_frame();
      if (success && !input.ReadInputStart(&result->input_start))
        success = false;
      if (success && !input.ReadRequestDestination(&result->request_destination))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::blink::mojom::NavigationTiming::DataView, ::blink::mojom::NavigationTimingPtr>::Read(
    ::blink::mojom::NavigationTiming::DataView input,
    ::blink::mojom::NavigationTimingPtr* output) {
  bool success = true;
  ::blink::mojom::NavigationTimingPtr result(::blink::mojom::NavigationTiming::New());
  
      if (success && !input.ReadRedirectStart(&result->redirect_start))
        success = false;
      if (success && !input.ReadRedirectEnd(&result->redirect_end))
        success = false;
      if (success && !input.ReadFetchStart(&result->fetch_start))
        success = false;
      if (success && !input.ReadParentResourceTimingAccess(&result->parent_resource_timing_access))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::blink::mojom::NavigationRedirectParams::DataView, ::blink::mojom::NavigationRedirectParamsPtr>::Read(
    ::blink::mojom::NavigationRedirectParams::DataView input,
    ::blink::mojom::NavigationRedirectParamsPtr* output) {
  bool success = true;
  ::blink::mojom::NavigationRedirectParamsPtr result(::blink::mojom::NavigationRedirectParams::New());
  
      if (success && !input.ReadRedirectInfo(&result->redirect_info))
        success = false;
      if (success && !input.ReadResponseHead(&result->response_head))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::blink::mojom::OldPageInfo::DataView, ::blink::mojom::OldPageInfoPtr>::Read(
    ::blink::mojom::OldPageInfo::DataView input,
    ::blink::mojom::OldPageInfoPtr* output) {
  bool success = true;
  ::blink::mojom::OldPageInfoPtr result(::blink::mojom::OldPageInfo::New());
  
      if (success && !input.ReadFrameTokenForOldMainFrame(&result->frame_token_for_old_main_frame))
        success = false;
      if (success && !input.ReadNewLifecycleStateForOldPage(&result->new_lifecycle_state_for_old_page))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::blink::mojom::IsolatedAppPermissionPolicyEntry::DataView, ::blink::mojom::IsolatedAppPermissionPolicyEntryPtr>::Read(
    ::blink::mojom::IsolatedAppPermissionPolicyEntry::DataView input,
    ::blink::mojom::IsolatedAppPermissionPolicyEntryPtr* output) {
  bool success = true;
  ::blink::mojom::IsolatedAppPermissionPolicyEntryPtr result(::blink::mojom::IsolatedAppPermissionPolicyEntry::New());
  
      if (success && !input.ReadFeature(&result->feature))
        success = false;
      if (success && !input.ReadAllowedOrigins(&result->allowed_origins))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::blink::mojom::CommitNavigationParams::DataView, ::blink::mojom::CommitNavigationParamsPtr>::Read(
    ::blink::mojom::CommitNavigationParams::DataView input,
    ::blink::mojom::CommitNavigationParamsPtr* output) {
  bool success = true;
  ::blink::mojom::CommitNavigationParamsPtr result(::blink::mojom::CommitNavigationParams::New());
  
      if (success && !input.ReadOriginToCommit(&result->origin_to_commit))
        success = false;
      if (success && !input.ReadStorageKey(&result->storage_key))
        success = false;
      if (success)
        result->is_overriding_user_agent = input.is_overriding_user_agent();
      if (success && !input.ReadRedirects(&result->redirects))
        success = false;
      if (success && !input.ReadRedirectParams(&result->redirect_params))
        success = false;
      if (success && !input.ReadPostContentType(&result->post_content_type))
        success = false;
      if (success && !input.ReadOriginalUrl(&result->original_url))
        success = false;
      if (success && !input.ReadOriginalMethod(&result->original_method))
        success = false;
      if (success)
        result->can_load_local_resources = input.can_load_local_resources();
      if (success && !input.ReadPageState(&result->page_state))
        success = false;
      if (success)
        result->nav_entry_id = input.nav_entry_id();
      if (success && !input.ReadSubframeUniqueNames(&result->subframe_unique_names))
        success = false;
      if (success)
        result->intended_as_new_entry = input.intended_as_new_entry();
      if (success)
        result->pending_history_list_index = input.pending_history_list_index();
      if (success)
        result->current_history_list_index = input.current_history_list_index();
      if (success)
        result->current_history_list_length = input.current_history_list_length();
      if (success)
        result->was_discarded = input.was_discarded();
      if (success)
        result->is_view_source = input.is_view_source();
      if (success)
        result->should_clear_history_list = input.should_clear_history_list();
      if (success && !input.ReadNavigationTiming(&result->navigation_timing))
        success = false;
      if (success && !input.ReadWasActivated(&result->was_activated))
        success = false;
      if (success && !input.ReadNavigationToken(&result->navigation_token))
        success = false;
      if (success && !input.ReadPrefetchedSignedExchanges(&result->prefetched_signed_exchanges))
        success = false;
      if (success && !input.ReadDataUrlAsString(&result->data_url_as_string))
        success = false;
      if (success)
        result->is_browser_initiated = input.is_browser_initiated();
      if (success)
        result->has_ua_visual_transition = input.has_ua_visual_transition();
      if (success)
        result->document_ukm_source_id = input.document_ukm_source_id();
      if (success && !input.ReadFramePolicy(&result->frame_policy))
        success = false;
      if (success && !input.ReadForceEnabledOriginTrials(&result->force_enabled_origin_trials))
        success = false;
      if (success && !input.ReadAgentClusterKey(&result->agent_cluster_key))
        success = false;
      if (success && !input.ReadEnabledClientHints(&result->enabled_client_hints))
        success = false;
      if (success)
        result->is_cross_site_cross_browsing_context_group = input.is_cross_site_cross_browsing_context_group();
      if (success)
        result->should_have_sticky_user_activation = input.should_have_sticky_user_activation();
      if (success && !input.ReadOldPageInfo(&result->old_page_info))
        success = false;
      if (success)
        result->http_response_code = input.http_response_code();
      if (success && !input.ReadNavigationApiHistoryEntryArrays(&result->navigation_api_history_entry_arrays))
        success = false;
      if (success && !input.ReadEarlyHintsPreloadedResources(&result->early_hints_preloaded_resources))
        success = false;
      if (success && !input.ReadEarlyHintsPreconnects(&result->early_hints_preconnects))
        success = false;
      if (success && !input.ReadNavigationPreconnects(&result->navigation_preconnects))
        success = false;
      if (success && !input.ReadCommitSent(&result->commit_sent))
        success = false;
      if (success && !input.ReadSrcdocValue(&result->srcdoc_value))
        success = false;
      if (success)
        result->is_load_data_with_base_url = input.is_load_data_with_base_url();
      if (success)
        result->ancestor_or_self_has_cspee = input.ancestor_or_self_has_cspee();
      if (success && !input.ReadReducedAcceptLanguage(&result->reduced_accept_language))
        success = false;
      if (success && !input.ReadNavigationDeliveryType(&result->navigation_delivery_type))
        success = false;
      if (success && !input.ReadViewTransitionState(&result->view_transition_state))
        success = false;
      if (success && !input.ReadSoftNavigationHeuristicsTaskId(&result->soft_navigation_heuristics_task_id))
        success = false;
      if (success && !input.ReadModifiedRuntimeFeatures(&result->modified_runtime_features))
        success = false;
      if (success && !input.ReadFencedFrameProperties(&result->fenced_frame_properties))
        success = false;
      if (success && !input.ReadNotRestoredReasons(&result->not_restored_reasons))
        success = false;
      if (success && !input.ReadLoadWithStorageAccess(&result->load_with_storage_access))
        success = false;
      if (success && !input.ReadBrowsingContextGroupToken(&result->browsing_context_group_token))
        success = false;
      if (success && !input.ReadLcppHint(&result->lcpp_hint))
        success = false;
      if (success && !input.ReadContentSettings(&result->content_settings))
        success = false;
      if (success) {
        result->visited_link_salt = input.visited_link_salt();
      }
      if (success && !input.ReadLocalSurfaceId(&result->local_surface_id))
        success = false;
      if (success && !input.ReadInitialPermissionStatuses(&result->initial_permission_statuses))
        success = false;
      if (success)
        result->should_skip_screenshot = input.should_skip_screenshot();
      if (success)
        result->force_new_document_sequence_number = input.force_new_document_sequence_number();
      if (success && !input.ReadNavigationMetricsToken(&result->navigation_metrics_token))
        success = false;
      if (success && !input.ReadCommitTargetFrameToken(&result->commit_target_frame_token))
        success = false;
      if (success)
        result->is_initial_webui = input.is_initial_webui();
      if (success && !input.ReadIsolatedAppPolicy(&result->isolated_app_policy))
        success = false;
      if (success && !input.ReadInternalScrollToTextFragment(&result->internal_scroll_to_text_fragment))
        success = false;
      if (success)
        result->is_secure_context_root = input.is_secure_context_root();
      if (success && !input.ReadScriptInjectionPolicy(&result->script_injection_policy))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::blink::mojom::PageSwapEventParams::DataView, ::blink::mojom::PageSwapEventParamsPtr>::Read(
    ::blink::mojom::PageSwapEventParams::DataView input,
    ::blink::mojom::PageSwapEventParamsPtr* output) {
  bool success = true;
  ::blink::mojom::PageSwapEventParamsPtr result(::blink::mojom::PageSwapEventParams::New());
  
      if (success && !input.ReadUrl(&result->url))
        success = false;
      if (success && !input.ReadPageState(&result->page_state))
        success = false;
      if (success && !input.ReadNavigationType(&result->navigation_type))
        success = false;
  *output = std::move(result);
  return success;
}

}  // namespace mojo


// Symbols declared in the -test-utils.h header are defined here instead of a
// separate .cc file to save compile time.


namespace blink::mojom {


void NavigationResumeDeferredCommitListenerInterceptorForTesting::ResumeDeferredCommit() {
  GetForwardingInterface()->ResumeDeferredCommit();
}
NavigationResumeDeferredCommitListenerAsyncWaiter::NavigationResumeDeferredCommitListenerAsyncWaiter(
    NavigationResumeDeferredCommitListener* proxy) : proxy_(proxy) {}

NavigationResumeDeferredCommitListenerAsyncWaiter::~NavigationResumeDeferredCommitListenerAsyncWaiter() = default;







}  // blink::mojom


#if defined(__clang__)
#pragma clang diagnostic pop
#endif