// components/omnibox/browser/searchbox.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 "components/omnibox/browser/searchbox.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 "components/omnibox/browser/searchbox.mojom-params-data.h"
#include "components/omnibox/browser/searchbox.mojom-shared-message-ids.h"

#include "components/omnibox/browser/searchbox.mojom-import-headers.h"
#include "components/omnibox/browser/searchbox.mojom-test-utils.h"


namespace searchbox::mojom {
ACMatchClassification::ACMatchClassification()
    : offset(),
      style() {}

ACMatchClassification::ACMatchClassification(
    uint32_t offset_in,
    int32_t style_in)
    : offset(std::move(offset_in)),
      style(std::move(style_in)) {}

ACMatchClassification::~ACMatchClassification() = default;
size_t ACMatchClassification::Hash(size_t seed) const {
  seed = mojo::internal::Hash(seed, this->offset);
  seed = mojo::internal::Hash(seed, this->style);
  return seed;
}

void ACMatchClassification::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "offset"), this->offset,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type uint32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "style"), this->style,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type int32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool ACMatchClassification::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
Action::Action()
    : hint(),
      suggestion_contents(),
      icon_path(),
      a11y_label() {}

Action::Action(
    const std::string& hint_in,
    const std::string& suggestion_contents_in,
    const std::string& icon_path_in,
    const std::string& a11y_label_in)
    : hint(std::move(hint_in)),
      suggestion_contents(std::move(suggestion_contents_in)),
      icon_path(std::move(icon_path_in)),
      a11y_label(std::move(a11y_label_in)) {}

Action::~Action() = default;
size_t Action::Hash(size_t seed) const {
  seed = mojo::internal::Hash(seed, this->hint);
  seed = mojo::internal::Hash(seed, this->suggestion_contents);
  seed = mojo::internal::Hash(seed, this->icon_path);
  seed = mojo::internal::Hash(seed, this->a11y_label);
  return seed;
}

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

bool Action::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
SuggestionAnswer::SuggestionAnswer()
    : first_line(),
      second_line() {}

SuggestionAnswer::SuggestionAnswer(
    const ::std::u16string& first_line_in,
    const ::std::u16string& second_line_in)
    : first_line(std::move(first_line_in)),
      second_line(std::move(second_line_in)) {}

SuggestionAnswer::~SuggestionAnswer() = default;

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

bool SuggestionAnswer::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
InputKeywordModel::InputKeywordModel()
    : type(),
      keyword(),
      display_text() {}

InputKeywordModel::InputKeywordModel(
    KeywordType type_in,
    const std::string& keyword_in,
    const std::string& display_text_in)
    : type(std::move(type_in)),
      keyword(std::move(keyword_in)),
      display_text(std::move(display_text_in)) {}

InputKeywordModel::~InputKeywordModel() = default;
size_t InputKeywordModel::Hash(size_t seed) const {
  seed = mojo::internal::Hash(seed, this->type);
  seed = mojo::internal::Hash(seed, this->keyword);
  seed = mojo::internal::Hash(seed, this->display_text);
  return seed;
}

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

bool InputKeywordModel::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
MatchKeywordModel::MatchKeywordModel()
    : type(),
      chip_hint(),
      chip_a11y(),
      placeholder(),
      keyword() {}

MatchKeywordModel::MatchKeywordModel(
    KeywordType type_in,
    const std::string& chip_hint_in,
    const std::string& chip_a11y_in,
    const std::string& placeholder_in,
    const std::string& keyword_in)
    : type(std::move(type_in)),
      chip_hint(std::move(chip_hint_in)),
      chip_a11y(std::move(chip_a11y_in)),
      placeholder(std::move(placeholder_in)),
      keyword(std::move(keyword_in)) {}

MatchKeywordModel::~MatchKeywordModel() = default;
size_t MatchKeywordModel::Hash(size_t seed) const {
  seed = mojo::internal::Hash(seed, this->type);
  seed = mojo::internal::Hash(seed, this->chip_hint);
  seed = mojo::internal::Hash(seed, this->chip_a11y);
  seed = mojo::internal::Hash(seed, this->placeholder);
  seed = mojo::internal::Hash(seed, this->keyword);
  return seed;
}

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

bool MatchKeywordModel::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
AutocompleteMatch::AutocompleteMatch()
    : is_hidden(),
      a11y_label(),
      allowed_to_be_default_match(),
      actions(),
      answer(),
      contents(),
      contents_class(),
      description(),
      description_class(),
      destination_url(),
      inline_autocompletion(),
      fill_into_edit(),
      is_weather_answer_suggestion(),
      icon_path(),
      icon_url(),
      image_dominant_color(),
      image_url(),
      is_contextual_suggestion(),
      is_noncanned_aim_suggestion(),
      is_rich_suggestion(),
      is_search_type(),
      is_enterprise_search_aggregator_people_type(),
      type(),
      remove_button_a11y_label(),
      swap_contents_and_description(),
      show_contextual_description(),
      suggestion_group_id(),
      supports_deletion(),
      tail_suggest_common_prefix(),
      keyword_model(),
      fusebox_action() {}

AutocompleteMatch::AutocompleteMatch(
    bool is_hidden_in,
    const ::std::u16string& a11y_label_in,
    bool allowed_to_be_default_match_in,
    std::vector<ActionPtr> actions_in,
    SuggestionAnswerPtr answer_in,
    const ::std::u16string& contents_in,
    std::vector<ACMatchClassificationPtr> contents_class_in,
    const ::std::u16string& description_in,
    std::vector<ACMatchClassificationPtr> description_class_in,
    const ::GURL& destination_url_in,
    const ::std::u16string& inline_autocompletion_in,
    const ::std::u16string& fill_into_edit_in,
    std::optional<bool> is_weather_answer_suggestion_in,
    const std::string& icon_path_in,
    const ::GURL& icon_url_in,
    const std::string& image_dominant_color_in,
    const std::string& image_url_in,
    bool is_contextual_suggestion_in,
    bool is_noncanned_aim_suggestion_in,
    bool is_rich_suggestion_in,
    bool is_search_type_in,
    bool is_enterprise_search_aggregator_people_type_in,
    const std::string& type_in,
    const ::std::u16string& remove_button_a11y_label_in,
    bool swap_contents_and_description_in,
    bool show_contextual_description_in,
    int32_t suggestion_group_id_in,
    bool supports_deletion_in,
    const std::optional<::std::u16string>& tail_suggest_common_prefix_in,
    MatchKeywordModelPtr keyword_model_in,
    ::fusebox_action::mojom::FuseboxActionPtr fusebox_action_in)
    : is_hidden(std::move(is_hidden_in)),
      a11y_label(std::move(a11y_label_in)),
      allowed_to_be_default_match(std::move(allowed_to_be_default_match_in)),
      actions(std::move(actions_in)),
      answer(std::move(answer_in)),
      contents(std::move(contents_in)),
      contents_class(std::move(contents_class_in)),
      description(std::move(description_in)),
      description_class(std::move(description_class_in)),
      destination_url(std::move(destination_url_in)),
      inline_autocompletion(std::move(inline_autocompletion_in)),
      fill_into_edit(std::move(fill_into_edit_in)),
      is_weather_answer_suggestion(std::move(is_weather_answer_suggestion_in)),
      icon_path(std::move(icon_path_in)),
      icon_url(std::move(icon_url_in)),
      image_dominant_color(std::move(image_dominant_color_in)),
      image_url(std::move(image_url_in)),
      is_contextual_suggestion(std::move(is_contextual_suggestion_in)),
      is_noncanned_aim_suggestion(std::move(is_noncanned_aim_suggestion_in)),
      is_rich_suggestion(std::move(is_rich_suggestion_in)),
      is_search_type(std::move(is_search_type_in)),
      is_enterprise_search_aggregator_people_type(std::move(is_enterprise_search_aggregator_people_type_in)),
      type(std::move(type_in)),
      remove_button_a11y_label(std::move(remove_button_a11y_label_in)),
      swap_contents_and_description(std::move(swap_contents_and_description_in)),
      show_contextual_description(std::move(show_contextual_description_in)),
      suggestion_group_id(std::move(suggestion_group_id_in)),
      supports_deletion(std::move(supports_deletion_in)),
      tail_suggest_common_prefix(std::move(tail_suggest_common_prefix_in)),
      keyword_model(std::move(keyword_model_in)),
      fusebox_action(std::move(fusebox_action_in)) {}

AutocompleteMatch::~AutocompleteMatch() = default;

void AutocompleteMatch::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "is_hidden"), this->is_hidden,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "a11y_label"), this->a11y_label,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::std::u16string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "allowed_to_be_default_match"), this->allowed_to_be_default_match,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "actions"), this->actions,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type std::vector<ActionPtr>>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "answer"), this->answer,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type SuggestionAnswerPtr>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "contents"), this->contents,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::std::u16string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "contents_class"), this->contents_class,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type std::vector<ACMatchClassificationPtr>>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "description"), this->description,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::std::u16string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "description_class"), this->description_class,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type std::vector<ACMatchClassificationPtr>>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "destination_url"), this->destination_url,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::GURL&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "inline_autocompletion"), this->inline_autocompletion,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::std::u16string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "fill_into_edit"), this->fill_into_edit,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::std::u16string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "is_weather_answer_suggestion"), this->is_weather_answer_suggestion,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type std::optional<bool>>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "icon_path"), this->icon_path,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "icon_url"), this->icon_url,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::GURL&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "image_dominant_color"), this->image_dominant_color,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "image_url"), this->image_url,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "is_contextual_suggestion"), this->is_contextual_suggestion,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "is_noncanned_aim_suggestion"), this->is_noncanned_aim_suggestion,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "is_rich_suggestion"), this->is_rich_suggestion,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "is_search_type"), this->is_search_type,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "is_enterprise_search_aggregator_people_type"), this->is_enterprise_search_aggregator_people_type,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "type"), this->type,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "remove_button_a11y_label"), this->remove_button_a11y_label,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::std::u16string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "swap_contents_and_description"), this->swap_contents_and_description,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "show_contextual_description"), this->show_contextual_description,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "suggestion_group_id"), this->suggestion_group_id,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type int32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "supports_deletion"), this->supports_deletion,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "tail_suggest_common_prefix"), this->tail_suggest_common_prefix,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<::std::u16string>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "keyword_model"), this->keyword_model,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type MatchKeywordModelPtr>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "fusebox_action"), this->fusebox_action,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::fusebox_action::mojom::FuseboxActionPtr>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool AutocompleteMatch::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
TabInfo::TabInfo()
    : tab_id(),
      title(),
      url(),
      show_in_current_tab_chip(),
      show_in_previous_tab_chip(),
      last_active() {}

TabInfo::TabInfo(
    int32_t tab_id_in,
    const std::string& title_in,
    const ::GURL& url_in,
    bool show_in_current_tab_chip_in,
    bool show_in_previous_tab_chip_in,
    ::base::TimeTicks last_active_in)
    : tab_id(std::move(tab_id_in)),
      title(std::move(title_in)),
      url(std::move(url_in)),
      show_in_current_tab_chip(std::move(show_in_current_tab_chip_in)),
      show_in_previous_tab_chip(std::move(show_in_previous_tab_chip_in)),
      last_active(std::move(last_active_in)) {}

TabInfo::~TabInfo() = default;

void TabInfo::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "tab_id"), this->tab_id,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type int32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "title"), this->title,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  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(
      "show_in_current_tab_chip"), this->show_in_current_tab_chip,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "show_in_previous_tab_chip"), this->show_in_previous_tab_chip,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "last_active"), this->last_active,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::base::TimeTicks>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool TabInfo::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
FileAttachment::FileAttachment()
    : uuid(),
      name(),
      mime_type(),
      image_data_url(),
      error_type(),
      icon_url(),
      thumbnail_url() {}

FileAttachment::FileAttachment(
    const ::base::UnguessableToken& uuid_in,
    const std::string& name_in,
    const std::string& mime_type_in,
    const std::optional<std::string>& image_data_url_in,
    std::optional<::contextual_search::ContextUploadErrorType> error_type_in,
    const std::optional<::GURL>& icon_url_in,
    const std::optional<::GURL>& thumbnail_url_in)
    : uuid(std::move(uuid_in)),
      name(std::move(name_in)),
      mime_type(std::move(mime_type_in)),
      image_data_url(std::move(image_data_url_in)),
      error_type(std::move(error_type_in)),
      icon_url(std::move(icon_url_in)),
      thumbnail_url(std::move(thumbnail_url_in)) {}

FileAttachment::~FileAttachment() = default;

void FileAttachment::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "uuid"), this->uuid,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::base::UnguessableToken&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "name"), this->name,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "mime_type"), this->mime_type,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "image_data_url"), this->image_data_url,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<std::string>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "error_type"), this->error_type,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type std::optional<::contextual_search::ContextUploadErrorType>>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "icon_url"), this->icon_url,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<::GURL>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "thumbnail_url"), this->thumbnail_url,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<::GURL>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool FileAttachment::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
TabAttachment::TabAttachment()
    : tab_id(),
      title(),
      url(),
      source() {}

TabAttachment::TabAttachment(
    int32_t tab_id_in,
    const std::string& title_in,
    const ::GURL& url_in,
    TabAttachmentSource source_in)
    : tab_id(std::move(tab_id_in)),
      title(std::move(title_in)),
      url(std::move(url_in)),
      source(std::move(source_in)) {}

TabAttachment::~TabAttachment() = default;

void TabAttachment::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "tab_id"), this->tab_id,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type int32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "title"), this->title,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  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(
      "source"), this->source,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type TabAttachmentSource>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool TabAttachment::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
SearchContext::SearchContext()
    : input(),
      attachments(),
      tool_mode() {}

SearchContext::SearchContext(
    const std::string& input_in,
    std::vector<SearchContextAttachmentPtr> attachments_in,
    ::omnibox::ToolMode tool_mode_in)
    : input(std::move(input_in)),
      attachments(std::move(attachments_in)),
      tool_mode(std::move(tool_mode_in)) {}

SearchContext::~SearchContext() = default;

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

bool SearchContext::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
SelectedFileInfo::SelectedFileInfo()
    : file_name(),
      mime_type(),
      image_data_url(),
      is_deletable(),
      selection_time(),
      thumbnail_url() {}

SelectedFileInfo::SelectedFileInfo(
    const std::string& file_name_in,
    const std::string& mime_type_in,
    const std::optional<std::string>& image_data_url_in,
    bool is_deletable_in,
    ::base::Time selection_time_in,
    const std::optional<::GURL>& thumbnail_url_in)
    : file_name(std::move(file_name_in)),
      mime_type(std::move(mime_type_in)),
      image_data_url(std::move(image_data_url_in)),
      is_deletable(std::move(is_deletable_in)),
      selection_time(std::move(selection_time_in)),
      thumbnail_url(std::move(thumbnail_url_in)) {}

SelectedFileInfo::~SelectedFileInfo() = default;

void SelectedFileInfo::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "file_name"), this->file_name,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "mime_type"), this->mime_type,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "image_data_url"), this->image_data_url,
#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_deletable"), this->is_deletable,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "selection_time"), this->selection_time,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::base::Time>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "thumbnail_url"), this->thumbnail_url,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<::GURL>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool SelectedFileInfo::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
SuggestionGroup::SuggestionGroup()
    : header(),
      render_type(RenderType::kDefaultVertical),
      side_type(SideType::kDefaultPrimary) {}

SuggestionGroup::SuggestionGroup(
    const ::std::u16string& header_in,
    RenderType render_type_in,
    SideType side_type_in)
    : header(std::move(header_in)),
      render_type(std::move(render_type_in)),
      side_type(std::move(side_type_in)) {}

SuggestionGroup::~SuggestionGroup() = default;

void SuggestionGroup::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "header"), this->header,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::std::u16string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "render_type"), this->render_type,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type RenderType>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "side_type"), this->side_type,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type SideType>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool SuggestionGroup::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
SmartComposeStats::SmartComposeStats()
    : enabled(),
      shown_count(),
      accepted_count(),
      characters_accepted(),
      shown_length() {}

SmartComposeStats::SmartComposeStats(
    bool enabled_in,
    int32_t shown_count_in,
    int32_t accepted_count_in,
    int32_t characters_accepted_in,
    int32_t shown_length_in)
    : enabled(std::move(enabled_in)),
      shown_count(std::move(shown_count_in)),
      accepted_count(std::move(accepted_count_in)),
      characters_accepted(std::move(characters_accepted_in)),
      shown_length(std::move(shown_length_in)) {}

SmartComposeStats::~SmartComposeStats() = default;
size_t SmartComposeStats::Hash(size_t seed) const {
  seed = mojo::internal::Hash(seed, this->enabled);
  seed = mojo::internal::Hash(seed, this->shown_count);
  seed = mojo::internal::Hash(seed, this->accepted_count);
  seed = mojo::internal::Hash(seed, this->characters_accepted);
  seed = mojo::internal::Hash(seed, this->shown_length);
  return seed;
}

void SmartComposeStats::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "enabled"), this->enabled,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "shown_count"), this->shown_count,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type int32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "accepted_count"), this->accepted_count,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type int32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "characters_accepted"), this->characters_accepted,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type int32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "shown_length"), this->shown_length,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type int32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool SmartComposeStats::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
AutocompleteResult::AutocompleteResult()
    : query_id(),
      sequence_id(),
      input(),
      suggestion_groups_map(),
      matches(),
      smart_compose_inline_hint() {}

AutocompleteResult::AutocompleteResult(
    int32_t query_id_in,
    uint32_t sequence_id_in,
    const ::std::u16string& input_in,
    base::flat_map<int32_t, SuggestionGroupPtr> suggestion_groups_map_in,
    std::vector<AutocompleteMatchPtr> matches_in,
    const std::optional<::std::u16string>& smart_compose_inline_hint_in)
    : query_id(std::move(query_id_in)),
      sequence_id(std::move(sequence_id_in)),
      input(std::move(input_in)),
      suggestion_groups_map(std::move(suggestion_groups_map_in)),
      matches(std::move(matches_in)),
      smart_compose_inline_hint(std::move(smart_compose_inline_hint_in)) {}

AutocompleteResult::~AutocompleteResult() = default;

void AutocompleteResult::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "query_id"), this->query_id,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type int32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "sequence_id"), this->sequence_id,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type uint32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "input"), this->input,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::std::u16string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "suggestion_groups_map"), this->suggestion_groups_map,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type base::flat_map<int32_t, SuggestionGroupPtr>>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "matches"), this->matches,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type std::vector<AutocompleteMatchPtr>>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "smart_compose_inline_hint"), this->smart_compose_inline_hint,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<::std::u16string>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool AutocompleteResult::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
OmniboxPopupSelection::OmniboxPopupSelection()
    : line(),
      state(),
      action_index() {}

OmniboxPopupSelection::OmniboxPopupSelection(
    uint8_t line_in,
    SelectionLineState state_in,
    uint8_t action_index_in)
    : line(std::move(line_in)),
      state(std::move(state_in)),
      action_index(std::move(action_index_in)) {}

OmniboxPopupSelection::~OmniboxPopupSelection() = default;
size_t OmniboxPopupSelection::Hash(size_t seed) const {
  seed = mojo::internal::Hash(seed, this->line);
  seed = mojo::internal::Hash(seed, this->state);
  seed = mojo::internal::Hash(seed, this->action_index);
  return seed;
}

void OmniboxPopupSelection::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "line"), this->line,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type uint8_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "state"), this->state,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type SelectionLineState>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "action_index"), this->action_index,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type uint8_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool OmniboxPopupSelection::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
ActionModifiers::ActionModifiers()
    : alt_key(false),
      ctrl_key(false),
      meta_key(false),
      shift_key(false) {}

ActionModifiers::ActionModifiers(
    bool alt_key_in,
    bool ctrl_key_in,
    bool meta_key_in,
    bool shift_key_in)
    : alt_key(std::move(alt_key_in)),
      ctrl_key(std::move(ctrl_key_in)),
      meta_key(std::move(meta_key_in)),
      shift_key(std::move(shift_key_in)) {}

ActionModifiers::~ActionModifiers() = default;
size_t ActionModifiers::Hash(size_t seed) const {
  seed = mojo::internal::Hash(seed, this->alt_key);
  seed = mojo::internal::Hash(seed, this->ctrl_key);
  seed = mojo::internal::Hash(seed, this->meta_key);
  seed = mojo::internal::Hash(seed, this->shift_key);
  return seed;
}

void ActionModifiers::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "alt_key"), this->alt_key,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "ctrl_key"), this->ctrl_key,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "meta_key"), this->meta_key,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "shift_key"), this->shift_key,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool ActionModifiers::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
PlaceholderConfig::PlaceholderConfig()
    : texts(),
      change_text_animation_interval(),
      fade_text_animation_duration() {}

PlaceholderConfig::PlaceholderConfig(
    std::vector<::std::u16string> texts_in,
    ::base::TimeDelta change_text_animation_interval_in,
    ::base::TimeDelta fade_text_animation_duration_in)
    : texts(std::move(texts_in)),
      change_text_animation_interval(std::move(change_text_animation_interval_in)),
      fade_text_animation_duration(std::move(fade_text_animation_duration_in)) {}

PlaceholderConfig::~PlaceholderConfig() = default;

void PlaceholderConfig::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "texts"), this->texts,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::vector<::std::u16string>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "change_text_animation_interval"), this->change_text_animation_interval,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::base::TimeDelta>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "fade_text_animation_duration"), this->fade_text_animation_duration,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::base::TimeDelta>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool PlaceholderConfig::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
DriveFile::DriveFile()
    : token(),
      mime_type(),
      file_name(),
      thumbnail_url(),
      icon_url() {}

DriveFile::DriveFile(
    const ::base::UnguessableToken& token_in,
    const std::string& mime_type_in,
    const std::string& file_name_in,
    const std::optional<std::string>& thumbnail_url_in,
    const std::optional<::GURL>& icon_url_in)
    : token(std::move(token_in)),
      mime_type(std::move(mime_type_in)),
      file_name(std::move(file_name_in)),
      thumbnail_url(std::move(thumbnail_url_in)),
      icon_url(std::move(icon_url_in)) {}

DriveFile::~DriveFile() = default;

void DriveFile::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "token"), this->token,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::base::UnguessableToken&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "mime_type"), this->mime_type,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "file_name"), this->file_name,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "thumbnail_url"), this->thumbnail_url,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<std::string>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "icon_url"), this->icon_url,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<::GURL>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool DriveFile::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
DriveUploadResponse::DriveUploadResponse()
    : files(),
      error() {}

DriveUploadResponse::DriveUploadResponse(
    std::vector<DriveFilePtr> files_in,
    std::optional<DriveUploadError> error_in)
    : files(std::move(files_in)),
      error(std::move(error_in)) {}

DriveUploadResponse::~DriveUploadResponse() = default;

void DriveUploadResponse::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "files"), this->files,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type std::vector<DriveFilePtr>>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "error"), this->error,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type std::optional<DriveUploadError>>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool DriveUploadResponse::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
SearchContextAttachmentPtr
SearchContextAttachment::NewFileAttachment(
    FileAttachmentPtr value) {
  return SearchContextAttachmentPtr(
      std::in_place,
      std::in_place_index<static_cast<size_t>(Tag::kFileAttachment)>,
      std::move(value));
}

SearchContextAttachmentPtr
SearchContextAttachment::NewTabAttachment(
    TabAttachmentPtr value) {
  return SearchContextAttachmentPtr(
      std::in_place,
      std::in_place_index<static_cast<size_t>(Tag::kTabAttachment)>,
      std::move(value));
}

SearchContextAttachment::SearchContextAttachment(
    std::in_place_index_t<static_cast<size_t>(Tag::kFileAttachment)>,
    FileAttachmentPtr value)
    : tag_(Tag::kFileAttachment),
      data_(std::in_place_index<static_cast<size_t>(Tag::kFileAttachment)>,
            std::move(value)) {}

SearchContextAttachment::SearchContextAttachment(
    std::in_place_index_t<static_cast<size_t>(Tag::kTabAttachment)>,
    TabAttachmentPtr value)
    : tag_(Tag::kTabAttachment),
      data_(std::in_place_index<static_cast<size_t>(Tag::kTabAttachment)>,
            std::move(value)) {}
SearchContextAttachment::~SearchContextAttachment() {
  DestroyActive();
}

void SearchContextAttachment::set_file_attachment(FileAttachmentPtr file_attachment) {
  if (tag_ == Tag::kFileAttachment) {
    data_.file_attachment = std::move(file_attachment);
  } else {
    DestroyActive();
    tag_ = Tag::kFileAttachment;
    new (&data_.file_attachment) FileAttachmentPtr(
        std::move(file_attachment));
  }
}

void SearchContextAttachment::set_tab_attachment(TabAttachmentPtr tab_attachment) {
  if (tag_ == Tag::kTabAttachment) {
    data_.tab_attachment = std::move(tab_attachment);
  } else {
    DestroyActive();
    tag_ = Tag::kTabAttachment;
    new (&data_.tab_attachment) TabAttachmentPtr(
        std::move(tab_attachment));
  }
}


SearchContextAttachment::Union_::Union_(
    std::in_place_index_t<static_cast<size_t>(Tag::kFileAttachment)>,
    FileAttachmentPtr value)
    : file_attachment(std::move(value)) {}

SearchContextAttachment::Union_::Union_(
    std::in_place_index_t<static_cast<size_t>(Tag::kTabAttachment)>,
    TabAttachmentPtr value)
    : tab_attachment(std::move(value)) {}

void SearchContextAttachment::DestroyActive() {
  switch (tag_) {

    case Tag::kFileAttachment:
      std::destroy_at(&data_.file_attachment);
      break;
    case Tag::kTabAttachment:
      std::destroy_at(&data_.tab_attachment);
      break;
  }
}

bool SearchContextAttachment::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context, false);
}
PageHandler_AddFileContext_ResponseParam_ResultPtr
PageHandler_AddFileContext_ResponseParam_Result::NewSuccess(
    const ::base::UnguessableToken& value) {
  return PageHandler_AddFileContext_ResponseParam_ResultPtr(
      std::in_place,
      std::in_place_index<static_cast<size_t>(Tag::kSuccess)>,
      std::move(value));
}

PageHandler_AddFileContext_ResponseParam_ResultPtr
PageHandler_AddFileContext_ResponseParam_Result::NewFailure(
    ::contextual_search::ContextUploadErrorType value) {
  return PageHandler_AddFileContext_ResponseParam_ResultPtr(
      std::in_place,
      std::in_place_index<static_cast<size_t>(Tag::kFailure)>,
      std::move(value));
}

PageHandler_AddFileContext_ResponseParam_Result::PageHandler_AddFileContext_ResponseParam_Result(
    std::in_place_index_t<static_cast<size_t>(Tag::kSuccess)>,
    const ::base::UnguessableToken& value)
    : tag_(Tag::kSuccess),
      data_(std::in_place_index<static_cast<size_t>(Tag::kSuccess)>,
            std::move(value)) {}

PageHandler_AddFileContext_ResponseParam_Result::PageHandler_AddFileContext_ResponseParam_Result(
    std::in_place_index_t<static_cast<size_t>(Tag::kFailure)>,
    ::contextual_search::ContextUploadErrorType value)
    : tag_(Tag::kFailure),
      data_(std::in_place_index<static_cast<size_t>(Tag::kFailure)>,
            std::move(value)) {}
PageHandler_AddFileContext_ResponseParam_Result::~PageHandler_AddFileContext_ResponseParam_Result() {
  DestroyActive();
}

void PageHandler_AddFileContext_ResponseParam_Result::set_success(const ::base::UnguessableToken& success) {
  if (tag_ == Tag::kSuccess) {
    data_.success = std::move(success);
  } else {
    DestroyActive();
    tag_ = Tag::kSuccess;
    new (&data_.success) ::base::UnguessableToken(
        std::move(success));
  }
}

void PageHandler_AddFileContext_ResponseParam_Result::set_failure(::contextual_search::ContextUploadErrorType failure) {
  if (tag_ != Tag::kFailure) {
    DestroyActive();
    tag_ = Tag::kFailure;
  }
  data_.failure = failure;
}


PageHandler_AddFileContext_ResponseParam_Result::Union_::Union_(
    std::in_place_index_t<static_cast<size_t>(Tag::kSuccess)>,
    const ::base::UnguessableToken& value)
    : success(std::move(value)) {}

PageHandler_AddFileContext_ResponseParam_Result::Union_::Union_(
    std::in_place_index_t<static_cast<size_t>(Tag::kFailure)>,
    ::contextual_search::ContextUploadErrorType value)
    : failure(std::move(value)) {}

void PageHandler_AddFileContext_ResponseParam_Result::DestroyActive() {
  switch (tag_) {

    case Tag::kSuccess:
      std::destroy_at(&data_.success);
      break;
    case Tag::kFailure:
      std::destroy_at(&data_.failure);
      break;
  }
}

bool PageHandler_AddFileContext_ResponseParam_Result::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context, false);
}
PageHandler_AddTabContext_ResponseParam_ResultPtr
PageHandler_AddTabContext_ResponseParam_Result::NewSuccess(
    const ::base::UnguessableToken& value) {
  return PageHandler_AddTabContext_ResponseParam_ResultPtr(
      std::in_place,
      std::in_place_index<static_cast<size_t>(Tag::kSuccess)>,
      std::move(value));
}

PageHandler_AddTabContext_ResponseParam_ResultPtr
PageHandler_AddTabContext_ResponseParam_Result::NewFailure(
    ::contextual_search::ContextUploadErrorType value) {
  return PageHandler_AddTabContext_ResponseParam_ResultPtr(
      std::in_place,
      std::in_place_index<static_cast<size_t>(Tag::kFailure)>,
      std::move(value));
}

PageHandler_AddTabContext_ResponseParam_Result::PageHandler_AddTabContext_ResponseParam_Result(
    std::in_place_index_t<static_cast<size_t>(Tag::kSuccess)>,
    const ::base::UnguessableToken& value)
    : tag_(Tag::kSuccess),
      data_(std::in_place_index<static_cast<size_t>(Tag::kSuccess)>,
            std::move(value)) {}

PageHandler_AddTabContext_ResponseParam_Result::PageHandler_AddTabContext_ResponseParam_Result(
    std::in_place_index_t<static_cast<size_t>(Tag::kFailure)>,
    ::contextual_search::ContextUploadErrorType value)
    : tag_(Tag::kFailure),
      data_(std::in_place_index<static_cast<size_t>(Tag::kFailure)>,
            std::move(value)) {}
PageHandler_AddTabContext_ResponseParam_Result::~PageHandler_AddTabContext_ResponseParam_Result() {
  DestroyActive();
}

void PageHandler_AddTabContext_ResponseParam_Result::set_success(const ::base::UnguessableToken& success) {
  if (tag_ == Tag::kSuccess) {
    data_.success = std::move(success);
  } else {
    DestroyActive();
    tag_ = Tag::kSuccess;
    new (&data_.success) ::base::UnguessableToken(
        std::move(success));
  }
}

void PageHandler_AddTabContext_ResponseParam_Result::set_failure(::contextual_search::ContextUploadErrorType failure) {
  if (tag_ != Tag::kFailure) {
    DestroyActive();
    tag_ = Tag::kFailure;
  }
  data_.failure = failure;
}


PageHandler_AddTabContext_ResponseParam_Result::Union_::Union_(
    std::in_place_index_t<static_cast<size_t>(Tag::kSuccess)>,
    const ::base::UnguessableToken& value)
    : success(std::move(value)) {}

PageHandler_AddTabContext_ResponseParam_Result::Union_::Union_(
    std::in_place_index_t<static_cast<size_t>(Tag::kFailure)>,
    ::contextual_search::ContextUploadErrorType value)
    : failure(std::move(value)) {}

void PageHandler_AddTabContext_ResponseParam_Result::DestroyActive() {
  switch (tag_) {

    case Tag::kSuccess:
      std::destroy_at(&data_.success);
      break;
    case Tag::kFailure:
      std::destroy_at(&data_.failure);
      break;
  }
}

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

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


const char* PageHandlerFactory::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::PageHandlerFactory>(message.name())) {
      case messages::PageHandlerFactory::kCreatePageHandler:
            return "Receive searchbox::mojom::PageHandlerFactory::CreatePageHandler";
    }
  } else {
    switch (static_cast<messages::PageHandlerFactory>(message.name())) {
      case messages::PageHandlerFactory::kCreatePageHandler:
            return "Receive reply searchbox::mojom::PageHandlerFactory::CreatePageHandler";
    }
  }
  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 PageHandlerFactory::CreatePageHandler_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 = 0x1dbec97c;  // IPCStableHash for searchbox::mojom::PageHandlerFactory::CreatePageHandler
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
# endif // !BUILDFLAG(IS_FUCHSIA)

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

void PageHandlerFactoryProxy::CreatePageHandler(
    ::mojo::PendingRemote<Page> in_page, ::mojo::PendingReceiver<PageHandler> in_handler) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandlerFactory::CreatePageHandler", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("page"), in_page,
                        "<value of type ::mojo::PendingRemote<Page>>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("handler"), in_handler,
                        "<value of type ::mojo::PendingReceiver<PageHandler>>");
   });
#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::PageHandlerFactory::kCreatePageHandler), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandlerFactory_CreatePageHandler_Params_Data> params(
          message);
  params.Allocate();

  
  mojo::internal::Serialize<mojo::InterfacePtrDataView<::searchbox::mojom::PageInterfaceBase>>(
    in_page,
    &params->page,
    &params.message());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(!mojo::internal::IsHandleOrInterfaceValid(params->page)),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_HANDLE,
    "invalid page in PageHandlerFactory.CreatePageHandler request");

  
  mojo::internal::Serialize<mojo::InterfaceRequestDataView<::searchbox::mojom::PageHandlerInterfaceBase>>(
    in_handler,
    &params->handler,
    &params.message());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(!mojo::internal::IsHandleOrInterfaceValid(params->handler)),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_HANDLE,
    "invalid handler in PageHandlerFactory.CreatePageHandler request");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandlerFactory::Name_);
  message.set_method_name("CreatePageHandler");
#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 PageHandlerFactoryStubDispatch::Accept(
    PageHandlerFactory* impl,
    mojo::Message* message) {
  switch (static_cast<messages::PageHandlerFactory>(message->header()->name)) {
    case messages::PageHandlerFactory::kCreatePageHandler: {
      DCHECK(message->is_serialized());
      internal::PageHandlerFactory_CreatePageHandler_Params_Data* params =
          reinterpret_cast<internal::PageHandlerFactory_CreatePageHandler_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandlerFactory.0
      bool success = true;
      ::mojo::PendingRemote<Page> p_page{};
      ::mojo::PendingReceiver<PageHandler> p_handler{};
      PageHandlerFactory_CreatePageHandler_ParamsDataView input_data_view(params, message);
      
      if (success) {
        p_page =
            input_data_view.TakePage<decltype(p_page)>();
      }
      if (success) {
        p_handler =
            input_data_view.TakeHandler<decltype(p_handler)>();
      }
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandlerFactory::Name_, 0, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->CreatePageHandler(        
        std::move(p_page), 
        std::move(p_handler));
      return true;
    }
  }
  return false;
}

// static
bool PageHandlerFactoryStubDispatch::AcceptWithResponder(
    PageHandlerFactory* 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::PageHandlerFactory>(message->header()->name)) {
    case messages::PageHandlerFactory::kCreatePageHandler: {
      break;
    }
  }
  return false;
}
namespace {
}  // namespace
static const mojo::internal::GenericValidationInfo kPageHandlerFactoryValidationInfo[] = {
    { &internal::PageHandlerFactory_CreatePageHandler_Params_Data::Validate,
     nullptr /* no response */},
};

bool PageHandlerFactoryRequestValidator::Accept(mojo::Message* message) {
  return mojo::internal::ValidateRequestGenericPacked(
    message,
    ::searchbox::mojom::PageHandlerFactory::Name_,
    kPageHandlerFactoryValidationInfo);
}

// The declaration includes the definition on other builds.

PageHandler::IPCStableHashFunction PageHandler::MessageToMethodInfo_(mojo::Message& message) {
#if !BUILDFLAG(IS_FUCHSIA)
  switch (static_cast<messages::PageHandler>(message.name())) {
    case messages::PageHandler::kOnFocusChanged: {
      return &PageHandler::OnFocusChanged_Sym::IPCStableHash;
    }
    case messages::PageHandler::kQueryAutocomplete: {
      return &PageHandler::QueryAutocomplete_Sym::IPCStableHash;
    }
    case messages::PageHandler::kStopAutocomplete: {
      return &PageHandler::StopAutocomplete_Sym::IPCStableHash;
    }
    case messages::PageHandler::kOpenAutocompleteMatch: {
      return &PageHandler::OpenAutocompleteMatch_Sym::IPCStableHash;
    }
    case messages::PageHandler::kSetSmartComposeStats: {
      return &PageHandler::SetSmartComposeStats_Sym::IPCStableHash;
    }
    case messages::PageHandler::kSetPopupSelection: {
      return &PageHandler::SetPopupSelection_Sym::IPCStableHash;
    }
    case messages::PageHandler::kOpenPopupSelection: {
      return &PageHandler::OpenPopupSelection_Sym::IPCStableHash;
    }
    case messages::PageHandler::kOnNavigationLikely: {
      return &PageHandler::OnNavigationLikely_Sym::IPCStableHash;
    }
    case messages::PageHandler::kDeleteAutocompleteMatch: {
      return &PageHandler::DeleteAutocompleteMatch_Sym::IPCStableHash;
    }
    case messages::PageHandler::kActivateKeyword: {
      return &PageHandler::ActivateKeyword_Sym::IPCStableHash;
    }
    case messages::PageHandler::kExecuteAction: {
      return &PageHandler::ExecuteAction_Sym::IPCStableHash;
    }
    case messages::PageHandler::kOnThumbnailRemoved: {
      return &PageHandler::OnThumbnailRemoved_Sym::IPCStableHash;
    }
    case messages::PageHandler::kGetCyclingPlaceholderConfig: {
      return &PageHandler::GetCyclingPlaceholderConfig_Sym::IPCStableHash;
    }
    case messages::PageHandler::kGetRecentTabs: {
      return &PageHandler::GetRecentTabs_Sym::IPCStableHash;
    }
    case messages::PageHandler::kGetTabPreview: {
      return &PageHandler::GetTabPreview_Sym::IPCStableHash;
    }
    case messages::PageHandler::kWaitForTabFaviconLoad: {
      return &PageHandler::WaitForTabFaviconLoad_Sym::IPCStableHash;
    }
    case messages::PageHandler::kGetInputState: {
      return &PageHandler::GetInputState_Sym::IPCStableHash;
    }
    case messages::PageHandler::kNotifySessionStarted: {
      return &PageHandler::NotifySessionStarted_Sym::IPCStableHash;
    }
    case messages::PageHandler::kNotifySessionAbandoned: {
      return &PageHandler::NotifySessionAbandoned_Sym::IPCStableHash;
    }
    case messages::PageHandler::kAddFileContext: {
      return &PageHandler::AddFileContext_Sym::IPCStableHash;
    }
    case messages::PageHandler::kAddTabContext: {
      return &PageHandler::AddTabContext_Sym::IPCStableHash;
    }
    case messages::PageHandler::kDeleteContext: {
      return &PageHandler::DeleteContext_Sym::IPCStableHash;
    }
    case messages::PageHandler::kDeleteTabContext: {
      return &PageHandler::DeleteTabContext_Sym::IPCStableHash;
    }
    case messages::PageHandler::kClearFiles: {
      return &PageHandler::ClearFiles_Sym::IPCStableHash;
    }
    case messages::PageHandler::kSubmitQuery: {
      return &PageHandler::SubmitQuery_Sym::IPCStableHash;
    }
    case messages::PageHandler::kOpenLensSearch: {
      return &PageHandler::OpenLensSearch_Sym::IPCStableHash;
    }
    case messages::PageHandler::kSetActiveToolMode: {
      return &PageHandler::SetActiveToolMode_Sym::IPCStableHash;
    }
    case messages::PageHandler::kSetActiveModelMode: {
      return &PageHandler::SetActiveModelMode_Sym::IPCStableHash;
    }
    case messages::PageHandler::kActivateMetricsFunnel: {
      return &PageHandler::ActivateMetricsFunnel_Sym::IPCStableHash;
    }
    case messages::PageHandler::kRecordToolSelectionAction: {
      return &PageHandler::RecordToolSelectionAction_Sym::IPCStableHash;
    }
    case messages::PageHandler::kRecordModelSelectionAction: {
      return &PageHandler::RecordModelSelectionAction_Sym::IPCStableHash;
    }
    case messages::PageHandler::kGetDriveDisclaimerStatus: {
      return &PageHandler::GetDriveDisclaimerStatus_Sym::IPCStableHash;
    }
    case messages::PageHandler::kOnDriveDisclaimerAccepted: {
      return &PageHandler::OnDriveDisclaimerAccepted_Sym::IPCStableHash;
    }
    case messages::PageHandler::kOnDriveUploadClicked: {
      return &PageHandler::OnDriveUploadClicked_Sym::IPCStableHash;
    }
    case messages::PageHandler::kOpenProfilePicker: {
      return &PageHandler::OpenProfilePicker_Sym::IPCStableHash;
    }
    case messages::PageHandler::kShowScreenshotMenu: {
      return &PageHandler::ShowScreenshotMenu_Sym::IPCStableHash;
    }
    case messages::PageHandler::kStartScreenshare: {
      return &PageHandler::StartScreenshare_Sym::IPCStableHash;
    }
    case messages::PageHandler::kCaptureRegionScreenshot: {
      return &PageHandler::CaptureRegionScreenshot_Sym::IPCStableHash;
    }
    case messages::PageHandler::kGetPageClassification: {
      return &PageHandler::GetPageClassification_Sym::IPCStableHash;
    }
  }
#endif  // !BUILDFLAG(IS_FUCHSIA)
  return nullptr;
}


const char* PageHandler::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::PageHandler>(message.name())) {
      case messages::PageHandler::kOnFocusChanged:
            return "Receive searchbox::mojom::PageHandler::OnFocusChanged";
      case messages::PageHandler::kQueryAutocomplete:
            return "Receive searchbox::mojom::PageHandler::QueryAutocomplete";
      case messages::PageHandler::kStopAutocomplete:
            return "Receive searchbox::mojom::PageHandler::StopAutocomplete";
      case messages::PageHandler::kOpenAutocompleteMatch:
            return "Receive searchbox::mojom::PageHandler::OpenAutocompleteMatch";
      case messages::PageHandler::kSetSmartComposeStats:
            return "Receive searchbox::mojom::PageHandler::SetSmartComposeStats";
      case messages::PageHandler::kSetPopupSelection:
            return "Receive searchbox::mojom::PageHandler::SetPopupSelection";
      case messages::PageHandler::kOpenPopupSelection:
            return "Receive searchbox::mojom::PageHandler::OpenPopupSelection";
      case messages::PageHandler::kOnNavigationLikely:
            return "Receive searchbox::mojom::PageHandler::OnNavigationLikely";
      case messages::PageHandler::kDeleteAutocompleteMatch:
            return "Receive searchbox::mojom::PageHandler::DeleteAutocompleteMatch";
      case messages::PageHandler::kActivateKeyword:
            return "Receive searchbox::mojom::PageHandler::ActivateKeyword";
      case messages::PageHandler::kExecuteAction:
            return "Receive searchbox::mojom::PageHandler::ExecuteAction";
      case messages::PageHandler::kOnThumbnailRemoved:
            return "Receive searchbox::mojom::PageHandler::OnThumbnailRemoved";
      case messages::PageHandler::kGetCyclingPlaceholderConfig:
            return "Receive searchbox::mojom::PageHandler::GetCyclingPlaceholderConfig";
      case messages::PageHandler::kGetRecentTabs:
            return "Receive searchbox::mojom::PageHandler::GetRecentTabs";
      case messages::PageHandler::kGetTabPreview:
            return "Receive searchbox::mojom::PageHandler::GetTabPreview";
      case messages::PageHandler::kWaitForTabFaviconLoad:
            return "Receive searchbox::mojom::PageHandler::WaitForTabFaviconLoad";
      case messages::PageHandler::kGetInputState:
            return "Receive searchbox::mojom::PageHandler::GetInputState";
      case messages::PageHandler::kNotifySessionStarted:
            return "Receive searchbox::mojom::PageHandler::NotifySessionStarted";
      case messages::PageHandler::kNotifySessionAbandoned:
            return "Receive searchbox::mojom::PageHandler::NotifySessionAbandoned";
      case messages::PageHandler::kAddFileContext:
            return "Receive searchbox::mojom::PageHandler::AddFileContext";
      case messages::PageHandler::kAddTabContext:
            return "Receive searchbox::mojom::PageHandler::AddTabContext";
      case messages::PageHandler::kDeleteContext:
            return "Receive searchbox::mojom::PageHandler::DeleteContext";
      case messages::PageHandler::kDeleteTabContext:
            return "Receive searchbox::mojom::PageHandler::DeleteTabContext";
      case messages::PageHandler::kClearFiles:
            return "Receive searchbox::mojom::PageHandler::ClearFiles";
      case messages::PageHandler::kSubmitQuery:
            return "Receive searchbox::mojom::PageHandler::SubmitQuery";
      case messages::PageHandler::kOpenLensSearch:
            return "Receive searchbox::mojom::PageHandler::OpenLensSearch";
      case messages::PageHandler::kSetActiveToolMode:
            return "Receive searchbox::mojom::PageHandler::SetActiveToolMode";
      case messages::PageHandler::kSetActiveModelMode:
            return "Receive searchbox::mojom::PageHandler::SetActiveModelMode";
      case messages::PageHandler::kActivateMetricsFunnel:
            return "Receive searchbox::mojom::PageHandler::ActivateMetricsFunnel";
      case messages::PageHandler::kRecordToolSelectionAction:
            return "Receive searchbox::mojom::PageHandler::RecordToolSelectionAction";
      case messages::PageHandler::kRecordModelSelectionAction:
            return "Receive searchbox::mojom::PageHandler::RecordModelSelectionAction";
      case messages::PageHandler::kGetDriveDisclaimerStatus:
            return "Receive searchbox::mojom::PageHandler::GetDriveDisclaimerStatus";
      case messages::PageHandler::kOnDriveDisclaimerAccepted:
            return "Receive searchbox::mojom::PageHandler::OnDriveDisclaimerAccepted";
      case messages::PageHandler::kOnDriveUploadClicked:
            return "Receive searchbox::mojom::PageHandler::OnDriveUploadClicked";
      case messages::PageHandler::kOpenProfilePicker:
            return "Receive searchbox::mojom::PageHandler::OpenProfilePicker";
      case messages::PageHandler::kShowScreenshotMenu:
            return "Receive searchbox::mojom::PageHandler::ShowScreenshotMenu";
      case messages::PageHandler::kStartScreenshare:
            return "Receive searchbox::mojom::PageHandler::StartScreenshare";
      case messages::PageHandler::kCaptureRegionScreenshot:
            return "Receive searchbox::mojom::PageHandler::CaptureRegionScreenshot";
      case messages::PageHandler::kGetPageClassification:
            return "Receive searchbox::mojom::PageHandler::GetPageClassification";
    }
  } else {
    switch (static_cast<messages::PageHandler>(message.name())) {
      case messages::PageHandler::kOnFocusChanged:
            return "Receive reply searchbox::mojom::PageHandler::OnFocusChanged";
      case messages::PageHandler::kQueryAutocomplete:
            return "Receive reply searchbox::mojom::PageHandler::QueryAutocomplete";
      case messages::PageHandler::kStopAutocomplete:
            return "Receive reply searchbox::mojom::PageHandler::StopAutocomplete";
      case messages::PageHandler::kOpenAutocompleteMatch:
            return "Receive reply searchbox::mojom::PageHandler::OpenAutocompleteMatch";
      case messages::PageHandler::kSetSmartComposeStats:
            return "Receive reply searchbox::mojom::PageHandler::SetSmartComposeStats";
      case messages::PageHandler::kSetPopupSelection:
            return "Receive reply searchbox::mojom::PageHandler::SetPopupSelection";
      case messages::PageHandler::kOpenPopupSelection:
            return "Receive reply searchbox::mojom::PageHandler::OpenPopupSelection";
      case messages::PageHandler::kOnNavigationLikely:
            return "Receive reply searchbox::mojom::PageHandler::OnNavigationLikely";
      case messages::PageHandler::kDeleteAutocompleteMatch:
            return "Receive reply searchbox::mojom::PageHandler::DeleteAutocompleteMatch";
      case messages::PageHandler::kActivateKeyword:
            return "Receive reply searchbox::mojom::PageHandler::ActivateKeyword";
      case messages::PageHandler::kExecuteAction:
            return "Receive reply searchbox::mojom::PageHandler::ExecuteAction";
      case messages::PageHandler::kOnThumbnailRemoved:
            return "Receive reply searchbox::mojom::PageHandler::OnThumbnailRemoved";
      case messages::PageHandler::kGetCyclingPlaceholderConfig:
            return "Receive reply searchbox::mojom::PageHandler::GetCyclingPlaceholderConfig";
      case messages::PageHandler::kGetRecentTabs:
            return "Receive reply searchbox::mojom::PageHandler::GetRecentTabs";
      case messages::PageHandler::kGetTabPreview:
            return "Receive reply searchbox::mojom::PageHandler::GetTabPreview";
      case messages::PageHandler::kWaitForTabFaviconLoad:
            return "Receive reply searchbox::mojom::PageHandler::WaitForTabFaviconLoad";
      case messages::PageHandler::kGetInputState:
            return "Receive reply searchbox::mojom::PageHandler::GetInputState";
      case messages::PageHandler::kNotifySessionStarted:
            return "Receive reply searchbox::mojom::PageHandler::NotifySessionStarted";
      case messages::PageHandler::kNotifySessionAbandoned:
            return "Receive reply searchbox::mojom::PageHandler::NotifySessionAbandoned";
      case messages::PageHandler::kAddFileContext:
            return "Receive reply searchbox::mojom::PageHandler::AddFileContext";
      case messages::PageHandler::kAddTabContext:
            return "Receive reply searchbox::mojom::PageHandler::AddTabContext";
      case messages::PageHandler::kDeleteContext:
            return "Receive reply searchbox::mojom::PageHandler::DeleteContext";
      case messages::PageHandler::kDeleteTabContext:
            return "Receive reply searchbox::mojom::PageHandler::DeleteTabContext";
      case messages::PageHandler::kClearFiles:
            return "Receive reply searchbox::mojom::PageHandler::ClearFiles";
      case messages::PageHandler::kSubmitQuery:
            return "Receive reply searchbox::mojom::PageHandler::SubmitQuery";
      case messages::PageHandler::kOpenLensSearch:
            return "Receive reply searchbox::mojom::PageHandler::OpenLensSearch";
      case messages::PageHandler::kSetActiveToolMode:
            return "Receive reply searchbox::mojom::PageHandler::SetActiveToolMode";
      case messages::PageHandler::kSetActiveModelMode:
            return "Receive reply searchbox::mojom::PageHandler::SetActiveModelMode";
      case messages::PageHandler::kActivateMetricsFunnel:
            return "Receive reply searchbox::mojom::PageHandler::ActivateMetricsFunnel";
      case messages::PageHandler::kRecordToolSelectionAction:
            return "Receive reply searchbox::mojom::PageHandler::RecordToolSelectionAction";
      case messages::PageHandler::kRecordModelSelectionAction:
            return "Receive reply searchbox::mojom::PageHandler::RecordModelSelectionAction";
      case messages::PageHandler::kGetDriveDisclaimerStatus:
            return "Receive reply searchbox::mojom::PageHandler::GetDriveDisclaimerStatus";
      case messages::PageHandler::kOnDriveDisclaimerAccepted:
            return "Receive reply searchbox::mojom::PageHandler::OnDriveDisclaimerAccepted";
      case messages::PageHandler::kOnDriveUploadClicked:
            return "Receive reply searchbox::mojom::PageHandler::OnDriveUploadClicked";
      case messages::PageHandler::kOpenProfilePicker:
            return "Receive reply searchbox::mojom::PageHandler::OpenProfilePicker";
      case messages::PageHandler::kShowScreenshotMenu:
            return "Receive reply searchbox::mojom::PageHandler::ShowScreenshotMenu";
      case messages::PageHandler::kStartScreenshare:
            return "Receive reply searchbox::mojom::PageHandler::StartScreenshare";
      case messages::PageHandler::kCaptureRegionScreenshot:
            return "Receive reply searchbox::mojom::PageHandler::CaptureRegionScreenshot";
      case messages::PageHandler::kGetPageClassification:
            return "Receive reply searchbox::mojom::PageHandler::GetPageClassification";
    }
  }
  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 PageHandler::OnFocusChanged_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 = 0xd69941f2;  // IPCStableHash for searchbox::mojom::PageHandler::OnFocusChanged
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::QueryAutocomplete_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 = 0xf9f535c9;  // IPCStableHash for searchbox::mojom::PageHandler::QueryAutocomplete
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::StopAutocomplete_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 = 0x674077cc;  // IPCStableHash for searchbox::mojom::PageHandler::StopAutocomplete
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::OpenAutocompleteMatch_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 = 0x72b86ca8;  // IPCStableHash for searchbox::mojom::PageHandler::OpenAutocompleteMatch
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::SetSmartComposeStats_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 = 0x5b10488f;  // IPCStableHash for searchbox::mojom::PageHandler::SetSmartComposeStats
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::SetPopupSelection_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 = 0x6e9e04c3;  // IPCStableHash for searchbox::mojom::PageHandler::SetPopupSelection
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::OpenPopupSelection_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 = 0xeca8fa0a;  // IPCStableHash for searchbox::mojom::PageHandler::OpenPopupSelection
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::OnNavigationLikely_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 = 0xffb7c9bd;  // IPCStableHash for searchbox::mojom::PageHandler::OnNavigationLikely
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::DeleteAutocompleteMatch_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 = 0x969b114e;  // IPCStableHash for searchbox::mojom::PageHandler::DeleteAutocompleteMatch
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::ActivateKeyword_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 = 0xd595b4d6;  // IPCStableHash for searchbox::mojom::PageHandler::ActivateKeyword
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::ExecuteAction_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 = 0x55c5733d;  // IPCStableHash for searchbox::mojom::PageHandler::ExecuteAction
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::OnThumbnailRemoved_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 = 0x14921ab7;  // IPCStableHash for searchbox::mojom::PageHandler::OnThumbnailRemoved
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::GetCyclingPlaceholderConfig_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 = 0xea27d92f;  // IPCStableHash for searchbox::mojom::PageHandler::GetCyclingPlaceholderConfig
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::GetRecentTabs_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 = 0x934a47ac;  // IPCStableHash for searchbox::mojom::PageHandler::GetRecentTabs
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::GetTabPreview_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 = 0x804d3c1a;  // IPCStableHash for searchbox::mojom::PageHandler::GetTabPreview
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::WaitForTabFaviconLoad_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 = 0x621c4c46;  // IPCStableHash for searchbox::mojom::PageHandler::WaitForTabFaviconLoad
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::GetInputState_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 = 0xb375853e;  // IPCStableHash for searchbox::mojom::PageHandler::GetInputState
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::NotifySessionStarted_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 = 0x47c3112d;  // IPCStableHash for searchbox::mojom::PageHandler::NotifySessionStarted
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::NotifySessionAbandoned_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 = 0x4d29ee81;  // IPCStableHash for searchbox::mojom::PageHandler::NotifySessionAbandoned
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::AddFileContext_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 = 0x95b871ea;  // IPCStableHash for searchbox::mojom::PageHandler::AddFileContext
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::AddTabContext_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 = 0xa642c873;  // IPCStableHash for searchbox::mojom::PageHandler::AddTabContext
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::DeleteContext_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 = 0xc9de81c0;  // IPCStableHash for searchbox::mojom::PageHandler::DeleteContext
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::DeleteTabContext_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 = 0x0ebb2983;  // IPCStableHash for searchbox::mojom::PageHandler::DeleteTabContext
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::ClearFiles_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 = 0x1629e704;  // IPCStableHash for searchbox::mojom::PageHandler::ClearFiles
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::SubmitQuery_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 = 0x1ff74501;  // IPCStableHash for searchbox::mojom::PageHandler::SubmitQuery
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::OpenLensSearch_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 = 0x4f65c264;  // IPCStableHash for searchbox::mojom::PageHandler::OpenLensSearch
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::SetActiveToolMode_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 = 0x31eab19f;  // IPCStableHash for searchbox::mojom::PageHandler::SetActiveToolMode
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::SetActiveModelMode_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 = 0x3b4ec343;  // IPCStableHash for searchbox::mojom::PageHandler::SetActiveModelMode
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::ActivateMetricsFunnel_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 = 0x8b5e8ef9;  // IPCStableHash for searchbox::mojom::PageHandler::ActivateMetricsFunnel
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::RecordToolSelectionAction_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 = 0x76f50a7d;  // IPCStableHash for searchbox::mojom::PageHandler::RecordToolSelectionAction
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::RecordModelSelectionAction_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 = 0xfec0b4fd;  // IPCStableHash for searchbox::mojom::PageHandler::RecordModelSelectionAction
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::GetDriveDisclaimerStatus_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 = 0xa49a85cf;  // IPCStableHash for searchbox::mojom::PageHandler::GetDriveDisclaimerStatus
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::OnDriveDisclaimerAccepted_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 = 0xb9c248af;  // IPCStableHash for searchbox::mojom::PageHandler::OnDriveDisclaimerAccepted
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::OnDriveUploadClicked_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 = 0xda9dc475;  // IPCStableHash for searchbox::mojom::PageHandler::OnDriveUploadClicked
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::OpenProfilePicker_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 = 0x084138a2;  // IPCStableHash for searchbox::mojom::PageHandler::OpenProfilePicker
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::ShowScreenshotMenu_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 = 0xca9f3ecf;  // IPCStableHash for searchbox::mojom::PageHandler::ShowScreenshotMenu
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::StartScreenshare_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 = 0x85c8d83e;  // IPCStableHash for searchbox::mojom::PageHandler::StartScreenshare
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::CaptureRegionScreenshot_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 = 0xdf099a5c;  // IPCStableHash for searchbox::mojom::PageHandler::CaptureRegionScreenshot
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::GetPageClassification_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 = 0xefefb561;  // IPCStableHash for searchbox::mojom::PageHandler::GetPageClassification
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
# endif // !BUILDFLAG(IS_FUCHSIA)

class PageHandler_GetCyclingPlaceholderConfig_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_GetCyclingPlaceholderConfig_ForwardToCallback(
      PageHandler::GetCyclingPlaceholderConfigCallback callback
      ) : callback_(std::move(callback)) {
  }

  PageHandler_GetCyclingPlaceholderConfig_ForwardToCallback(const PageHandler_GetCyclingPlaceholderConfig_ForwardToCallback&) = delete;
  PageHandler_GetCyclingPlaceholderConfig_ForwardToCallback& operator=(const PageHandler_GetCyclingPlaceholderConfig_ForwardToCallback&) = delete;

  bool Accept(mojo::Message* message) override;
 private:
  PageHandler::GetCyclingPlaceholderConfigCallback callback_;
};

class PageHandler_GetRecentTabs_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_GetRecentTabs_ForwardToCallback(
      PageHandler::GetRecentTabsCallback callback
      ) : callback_(std::move(callback)) {
  }

  PageHandler_GetRecentTabs_ForwardToCallback(const PageHandler_GetRecentTabs_ForwardToCallback&) = delete;
  PageHandler_GetRecentTabs_ForwardToCallback& operator=(const PageHandler_GetRecentTabs_ForwardToCallback&) = delete;

  bool Accept(mojo::Message* message) override;
 private:
  PageHandler::GetRecentTabsCallback callback_;
};

class PageHandler_GetTabPreview_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_GetTabPreview_ForwardToCallback(
      PageHandler::GetTabPreviewCallback callback
      ) : callback_(std::move(callback)) {
  }

  PageHandler_GetTabPreview_ForwardToCallback(const PageHandler_GetTabPreview_ForwardToCallback&) = delete;
  PageHandler_GetTabPreview_ForwardToCallback& operator=(const PageHandler_GetTabPreview_ForwardToCallback&) = delete;

  bool Accept(mojo::Message* message) override;
 private:
  PageHandler::GetTabPreviewCallback callback_;
};

class PageHandler_WaitForTabFaviconLoad_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_WaitForTabFaviconLoad_ForwardToCallback(
      PageHandler::WaitForTabFaviconLoadCallback callback
      ) : callback_(std::move(callback)) {
  }

  PageHandler_WaitForTabFaviconLoad_ForwardToCallback(const PageHandler_WaitForTabFaviconLoad_ForwardToCallback&) = delete;
  PageHandler_WaitForTabFaviconLoad_ForwardToCallback& operator=(const PageHandler_WaitForTabFaviconLoad_ForwardToCallback&) = delete;

  bool Accept(mojo::Message* message) override;
 private:
  PageHandler::WaitForTabFaviconLoadCallback callback_;
};

class PageHandler_GetInputState_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_GetInputState_ForwardToCallback(
      PageHandler::GetInputStateCallback callback
      ) : callback_(std::move(callback)) {
  }

  PageHandler_GetInputState_ForwardToCallback(const PageHandler_GetInputState_ForwardToCallback&) = delete;
  PageHandler_GetInputState_ForwardToCallback& operator=(const PageHandler_GetInputState_ForwardToCallback&) = delete;

  bool Accept(mojo::Message* message) override;
 private:
  PageHandler::GetInputStateCallback callback_;
};

class PageHandler_AddFileContext_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_AddFileContext_ForwardToCallback(
      PageHandler::AddFileContextCallback callback
      ) : callback_(std::move(callback)) {
  }

  PageHandler_AddFileContext_ForwardToCallback(const PageHandler_AddFileContext_ForwardToCallback&) = delete;
  PageHandler_AddFileContext_ForwardToCallback& operator=(const PageHandler_AddFileContext_ForwardToCallback&) = delete;

  bool Accept(mojo::Message* message) override;
 private:
  PageHandler::AddFileContextCallback callback_;
};

class PageHandler_AddTabContext_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_AddTabContext_ForwardToCallback(
      PageHandler::AddTabContextCallback callback
      ) : callback_(std::move(callback)) {
  }

  PageHandler_AddTabContext_ForwardToCallback(const PageHandler_AddTabContext_ForwardToCallback&) = delete;
  PageHandler_AddTabContext_ForwardToCallback& operator=(const PageHandler_AddTabContext_ForwardToCallback&) = delete;

  bool Accept(mojo::Message* message) override;
 private:
  PageHandler::AddTabContextCallback callback_;
};

class PageHandler_GetDriveDisclaimerStatus_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_GetDriveDisclaimerStatus_ForwardToCallback(
      PageHandler::GetDriveDisclaimerStatusCallback callback
      ) : callback_(std::move(callback)) {
  }

  PageHandler_GetDriveDisclaimerStatus_ForwardToCallback(const PageHandler_GetDriveDisclaimerStatus_ForwardToCallback&) = delete;
  PageHandler_GetDriveDisclaimerStatus_ForwardToCallback& operator=(const PageHandler_GetDriveDisclaimerStatus_ForwardToCallback&) = delete;

  bool Accept(mojo::Message* message) override;
 private:
  PageHandler::GetDriveDisclaimerStatusCallback callback_;
};

class PageHandler_OnDriveUploadClicked_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_OnDriveUploadClicked_ForwardToCallback(
      PageHandler::OnDriveUploadClickedCallback callback
      ) : callback_(std::move(callback)) {
  }

  PageHandler_OnDriveUploadClicked_ForwardToCallback(const PageHandler_OnDriveUploadClicked_ForwardToCallback&) = delete;
  PageHandler_OnDriveUploadClicked_ForwardToCallback& operator=(const PageHandler_OnDriveUploadClicked_ForwardToCallback&) = delete;

  bool Accept(mojo::Message* message) override;
 private:
  PageHandler::OnDriveUploadClickedCallback callback_;
};

class PageHandler_StartScreenshare_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_StartScreenshare_ForwardToCallback(
      PageHandler::StartScreenshareCallback callback
      ) : callback_(std::move(callback)) {
  }

  PageHandler_StartScreenshare_ForwardToCallback(const PageHandler_StartScreenshare_ForwardToCallback&) = delete;
  PageHandler_StartScreenshare_ForwardToCallback& operator=(const PageHandler_StartScreenshare_ForwardToCallback&) = delete;

  bool Accept(mojo::Message* message) override;
 private:
  PageHandler::StartScreenshareCallback callback_;
};

class PageHandler_CaptureRegionScreenshot_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_CaptureRegionScreenshot_ForwardToCallback(
      PageHandler::CaptureRegionScreenshotCallback callback
      ) : callback_(std::move(callback)) {
  }

  PageHandler_CaptureRegionScreenshot_ForwardToCallback(const PageHandler_CaptureRegionScreenshot_ForwardToCallback&) = delete;
  PageHandler_CaptureRegionScreenshot_ForwardToCallback& operator=(const PageHandler_CaptureRegionScreenshot_ForwardToCallback&) = delete;

  bool Accept(mojo::Message* message) override;
 private:
  PageHandler::CaptureRegionScreenshotCallback callback_;
};

class PageHandler_GetPageClassification_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_GetPageClassification_ForwardToCallback(
      PageHandler::GetPageClassificationCallback callback
      ) : callback_(std::move(callback)) {
  }

  PageHandler_GetPageClassification_ForwardToCallback(const PageHandler_GetPageClassification_ForwardToCallback&) = delete;
  PageHandler_GetPageClassification_ForwardToCallback& operator=(const PageHandler_GetPageClassification_ForwardToCallback&) = delete;

  bool Accept(mojo::Message* message) override;
 private:
  PageHandler::GetPageClassificationCallback callback_;
};

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

void PageHandlerProxy::OnFocusChanged(
    bool in_focused) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::OnFocusChanged", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("focused"), in_focused,
                        "<value of type bool>");
   });
#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::PageHandler::kOnFocusChanged), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_OnFocusChanged_Params_Data> params(
          message);
  params.Allocate();

  params->focused = in_focused;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("OnFocusChanged");
#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);
}

void PageHandlerProxy::QueryAutocomplete(
    int32_t in_query_id, std::optional<int32_t> in_tab_id, const ::std::u16string& in_input, bool in_prevent_inline_autocomplete, uint32_t in_cursor_position, ::omnibox::SuggestInventory in_suggest_inventory, bool in_is_on_focus, const std::string& in_keyword, InputMethod in_input_method) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::QueryAutocomplete", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("query_id"), in_query_id,
                        "<value of type int32_t>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("tab_id"), in_tab_id,
                        "<value of type std::optional<int32_t>>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("input"), in_input,
                        "<value of type const ::std::u16string&>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("prevent_inline_autocomplete"), in_prevent_inline_autocomplete,
                        "<value of type bool>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("cursor_position"), in_cursor_position,
                        "<value of type uint32_t>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("suggest_inventory"), in_suggest_inventory,
                        "<value of type ::omnibox::SuggestInventory>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("is_on_focus"), in_is_on_focus,
                        "<value of type bool>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("keyword"), in_keyword,
                        "<value of type const std::string&>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("input_method"), in_input_method,
                        "<value of type InputMethod>");
   });
#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::PageHandler::kQueryAutocomplete), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_QueryAutocomplete_Params_Data> params(
          message);
  params.Allocate();

  params->query_id = in_query_id;
  params->tab_id_$flag = in_tab_id.has_value();
  if (in_tab_id.has_value()) {
    params->tab_id_$value = in_tab_id.value();
  }
  mojo::internal::MessageFragment<
      typename decltype(params->input)::BaseType> input_fragment(
          params.message());
  
  mojo::internal::Serialize<::mojo_base::mojom::String16DataView>(
    in_input,
    input_fragment);

  params->input.Set(
      input_fragment.is_null() ? nullptr : input_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->input.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null input in PageHandler.QueryAutocomplete request");

  params->prevent_inline_autocomplete = in_prevent_inline_autocomplete;

  params->cursor_position = in_cursor_position;

  
  mojo::internal::Serialize<::fusebox_action::mojom::SuggestInventory>(
    in_suggest_inventory,
    &params->suggest_inventory);

  params->is_on_focus = in_is_on_focus;
  mojo::internal::MessageFragment<
      typename decltype(params->keyword)::BaseType> keyword_fragment(
          params.message());
  
  mojo::internal::Serialize<mojo::StringDataView>(
    in_keyword,
    keyword_fragment);

  params->keyword.Set(
      keyword_fragment.is_null() ? nullptr : keyword_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->keyword.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null keyword in PageHandler.QueryAutocomplete request");

  
  mojo::internal::Serialize<::searchbox::mojom::InputMethod>(
    in_input_method,
    &params->input_method);

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("QueryAutocomplete");
#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);
}

void PageHandlerProxy::StopAutocomplete(
    bool in_clear_result) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::StopAutocomplete", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("clear_result"), in_clear_result,
                        "<value of type bool>");
   });
#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::PageHandler::kStopAutocomplete), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_StopAutocomplete_Params_Data> params(
          message);
  params.Allocate();

  params->clear_result = in_clear_result;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("StopAutocomplete");
#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);
}

void PageHandlerProxy::OpenAutocompleteMatch(
    uint8_t in_line, const ::GURL& in_url, bool in_are_matches_showing, uint8_t in_mouse_button, ActionModifiersPtr in_modifiers, bool in_via_keyboard) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::OpenAutocompleteMatch", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("line"), in_line,
                        "<value of type uint8_t>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("url"), in_url,
                        "<value of type const ::GURL&>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("are_matches_showing"), in_are_matches_showing,
                        "<value of type bool>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("mouse_button"), in_mouse_button,
                        "<value of type uint8_t>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("modifiers"), in_modifiers,
                        "<value of type ActionModifiersPtr>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("via_keyboard"), in_via_keyboard,
                        "<value of type bool>");
   });
#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::PageHandler::kOpenAutocompleteMatch), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_OpenAutocompleteMatch_Params_Data> params(
          message);
  params.Allocate();

  params->line = in_line;
  mojo::internal::MessageFragment<
      typename decltype(params->url)::BaseType> url_fragment(
          params.message());
  
  mojo::internal::Serialize<::url::mojom::UrlDataView>(
    in_url,
    url_fragment);

  params->url.Set(
      url_fragment.is_null() ? nullptr : url_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->url.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null url in PageHandler.OpenAutocompleteMatch request");

  params->are_matches_showing = in_are_matches_showing;

  params->mouse_button = in_mouse_button;
  mojo::internal::MessageFragment<
      typename decltype(params->modifiers)::BaseType> modifiers_fragment(
          params.message());
  
  mojo::internal::Serialize<::searchbox::mojom::ActionModifiersDataView>(
    in_modifiers,
    modifiers_fragment);

  params->modifiers.Set(
      modifiers_fragment.is_null() ? nullptr : modifiers_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->modifiers.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null modifiers in PageHandler.OpenAutocompleteMatch request");

  params->via_keyboard = in_via_keyboard;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("OpenAutocompleteMatch");
#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);
}

void PageHandlerProxy::SetSmartComposeStats(
    SmartComposeStatsPtr in_smart_compose_stats) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::SetSmartComposeStats", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("smart_compose_stats"), in_smart_compose_stats,
                        "<value of type SmartComposeStatsPtr>");
   });
#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::PageHandler::kSetSmartComposeStats), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_SetSmartComposeStats_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->smart_compose_stats)::BaseType> smart_compose_stats_fragment(
          params.message());
  
  mojo::internal::Serialize<::searchbox::mojom::SmartComposeStatsDataView>(
    in_smart_compose_stats,
    smart_compose_stats_fragment);

  params->smart_compose_stats.Set(
      smart_compose_stats_fragment.is_null() ? nullptr : smart_compose_stats_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->smart_compose_stats.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null smart_compose_stats in PageHandler.SetSmartComposeStats request");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("SetSmartComposeStats");
#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);
}

void PageHandlerProxy::SetPopupSelection(
    OmniboxPopupSelectionPtr in_selection) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::SetPopupSelection", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("selection"), in_selection,
                        "<value of type OmniboxPopupSelectionPtr>");
   });
#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::PageHandler::kSetPopupSelection), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_SetPopupSelection_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->selection)::BaseType> selection_fragment(
          params.message());
  
  mojo::internal::Serialize<::searchbox::mojom::OmniboxPopupSelectionDataView>(
    in_selection,
    selection_fragment);

  params->selection.Set(
      selection_fragment.is_null() ? nullptr : selection_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->selection.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null selection in PageHandler.SetPopupSelection request");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("SetPopupSelection");
#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);
}

void PageHandlerProxy::OpenPopupSelection(
    uint32_t in_result_sequence_id, OmniboxPopupSelectionPtr in_selection, ::WindowOpenDisposition in_disposition) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::OpenPopupSelection", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("result_sequence_id"), in_result_sequence_id,
                        "<value of type uint32_t>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("selection"), in_selection,
                        "<value of type OmniboxPopupSelectionPtr>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("disposition"), in_disposition,
                        "<value of type ::WindowOpenDisposition>");
   });
#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::PageHandler::kOpenPopupSelection), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_OpenPopupSelection_Params_Data> params(
          message);
  params.Allocate();

  params->result_sequence_id = in_result_sequence_id;
  mojo::internal::MessageFragment<
      typename decltype(params->selection)::BaseType> selection_fragment(
          params.message());
  
  mojo::internal::Serialize<::searchbox::mojom::OmniboxPopupSelectionDataView>(
    in_selection,
    selection_fragment);

  params->selection.Set(
      selection_fragment.is_null() ? nullptr : selection_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->selection.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null selection in PageHandler.OpenPopupSelection request");

  
  mojo::internal::Serialize<::ui::mojom::WindowOpenDisposition>(
    in_disposition,
    &params->disposition);

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("OpenPopupSelection");
#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);
}

void PageHandlerProxy::OnNavigationLikely(
    uint8_t in_line, const ::GURL& in_url, ::omnibox::mojom::NavigationPredictor in_navigation_predictor) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::OnNavigationLikely", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("line"), in_line,
                        "<value of type uint8_t>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("url"), in_url,
                        "<value of type const ::GURL&>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("navigation_predictor"), in_navigation_predictor,
                        "<value of type ::omnibox::mojom::NavigationPredictor>");
   });
#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::PageHandler::kOnNavigationLikely), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_OnNavigationLikely_Params_Data> params(
          message);
  params.Allocate();

  params->line = in_line;
  mojo::internal::MessageFragment<
      typename decltype(params->url)::BaseType> url_fragment(
          params.message());
  
  mojo::internal::Serialize<::url::mojom::UrlDataView>(
    in_url,
    url_fragment);

  params->url.Set(
      url_fragment.is_null() ? nullptr : url_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->url.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null url in PageHandler.OnNavigationLikely request");

  
  mojo::internal::Serialize<::omnibox::mojom::NavigationPredictor>(
    in_navigation_predictor,
    &params->navigation_predictor);

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("OnNavigationLikely");
#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);
}

void PageHandlerProxy::DeleteAutocompleteMatch(
    uint8_t in_line, const ::GURL& in_url) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::DeleteAutocompleteMatch", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("line"), in_line,
                        "<value of type uint8_t>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("url"), in_url,
                        "<value of type const ::GURL&>");
   });
#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::PageHandler::kDeleteAutocompleteMatch), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_DeleteAutocompleteMatch_Params_Data> params(
          message);
  params.Allocate();

  params->line = in_line;
  mojo::internal::MessageFragment<
      typename decltype(params->url)::BaseType> url_fragment(
          params.message());
  
  mojo::internal::Serialize<::url::mojom::UrlDataView>(
    in_url,
    url_fragment);

  params->url.Set(
      url_fragment.is_null() ? nullptr : url_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->url.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null url in PageHandler.DeleteAutocompleteMatch request");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("DeleteAutocompleteMatch");
#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);
}

void PageHandlerProxy::ActivateKeyword(
    uint8_t in_line, const ::GURL& in_url, ::base::TimeTicks in_match_selection_timestamp, bool in_is_mouse_event) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::ActivateKeyword", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("line"), in_line,
                        "<value of type uint8_t>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("url"), in_url,
                        "<value of type const ::GURL&>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("match_selection_timestamp"), in_match_selection_timestamp,
                        "<value of type ::base::TimeTicks>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("is_mouse_event"), in_is_mouse_event,
                        "<value of type bool>");
   });
#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::PageHandler::kActivateKeyword), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_ActivateKeyword_Params_Data> params(
          message);
  params.Allocate();

  params->line = in_line;
  mojo::internal::MessageFragment<
      typename decltype(params->url)::BaseType> url_fragment(
          params.message());
  
  mojo::internal::Serialize<::url::mojom::UrlDataView>(
    in_url,
    url_fragment);

  params->url.Set(
      url_fragment.is_null() ? nullptr : url_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->url.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null url in PageHandler.ActivateKeyword request");
  mojo::internal::MessageFragment<
      typename decltype(params->match_selection_timestamp)::BaseType> match_selection_timestamp_fragment(
          params.message());
  
  mojo::internal::Serialize<::mojo_base::mojom::TimeTicksDataView>(
    in_match_selection_timestamp,
    match_selection_timestamp_fragment);

  params->match_selection_timestamp.Set(
      match_selection_timestamp_fragment.is_null() ? nullptr : match_selection_timestamp_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->match_selection_timestamp.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null match_selection_timestamp in PageHandler.ActivateKeyword request");

  params->is_mouse_event = in_is_mouse_event;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("ActivateKeyword");
#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);
}

void PageHandlerProxy::ExecuteAction(
    uint8_t in_line, uint8_t in_action_index, const ::GURL& in_url, ::base::TimeTicks in_match_selection_timestamp, uint8_t in_mouse_button, bool in_alt_key, bool in_ctrl_key, bool in_meta_key, bool in_shift_key) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::ExecuteAction", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("line"), in_line,
                        "<value of type uint8_t>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("action_index"), in_action_index,
                        "<value of type uint8_t>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("url"), in_url,
                        "<value of type const ::GURL&>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("match_selection_timestamp"), in_match_selection_timestamp,
                        "<value of type ::base::TimeTicks>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("mouse_button"), in_mouse_button,
                        "<value of type uint8_t>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("alt_key"), in_alt_key,
                        "<value of type bool>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("ctrl_key"), in_ctrl_key,
                        "<value of type bool>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("meta_key"), in_meta_key,
                        "<value of type bool>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("shift_key"), in_shift_key,
                        "<value of type bool>");
   });
#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::PageHandler::kExecuteAction), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_ExecuteAction_Params_Data> params(
          message);
  params.Allocate();

  params->line = in_line;

  params->action_index = in_action_index;
  mojo::internal::MessageFragment<
      typename decltype(params->url)::BaseType> url_fragment(
          params.message());
  
  mojo::internal::Serialize<::url::mojom::UrlDataView>(
    in_url,
    url_fragment);

  params->url.Set(
      url_fragment.is_null() ? nullptr : url_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->url.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null url in PageHandler.ExecuteAction request");
  mojo::internal::MessageFragment<
      typename decltype(params->match_selection_timestamp)::BaseType> match_selection_timestamp_fragment(
          params.message());
  
  mojo::internal::Serialize<::mojo_base::mojom::TimeTicksDataView>(
    in_match_selection_timestamp,
    match_selection_timestamp_fragment);

  params->match_selection_timestamp.Set(
      match_selection_timestamp_fragment.is_null() ? nullptr : match_selection_timestamp_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->match_selection_timestamp.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null match_selection_timestamp in PageHandler.ExecuteAction request");

  params->mouse_button = in_mouse_button;

  params->alt_key = in_alt_key;

  params->ctrl_key = in_ctrl_key;

  params->meta_key = in_meta_key;

  params->shift_key = in_shift_key;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("ExecuteAction");
#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);
}

void PageHandlerProxy::OnThumbnailRemoved(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send searchbox::mojom::PageHandler::OnThumbnailRemoved");
#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::PageHandler::kOnThumbnailRemoved), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_OnThumbnailRemoved_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("OnThumbnailRemoved");
#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);
}

void PageHandlerProxy::GetCyclingPlaceholderConfig(
    GetCyclingPlaceholderConfigCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send searchbox::mojom::PageHandler::GetCyclingPlaceholderConfig");
#endif

  const bool kExpectsResponse = true;
  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::PageHandler::kGetCyclingPlaceholderConfig), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_GetCyclingPlaceholderConfig_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetCyclingPlaceholderConfig");
#endif
  std::unique_ptr<mojo::MessageReceiver> responder(
      new PageHandler_GetCyclingPlaceholderConfig_ForwardToCallback(
          std::move(callback)));
  ::mojo::internal::SendMojoMessage(*receiver_, message, std::move(responder));
}

void PageHandlerProxy::GetRecentTabs(
    GetRecentTabsCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send searchbox::mojom::PageHandler::GetRecentTabs");
#endif

  const bool kExpectsResponse = true;
  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::PageHandler::kGetRecentTabs), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_GetRecentTabs_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetRecentTabs");
#endif
  std::unique_ptr<mojo::MessageReceiver> responder(
      new PageHandler_GetRecentTabs_ForwardToCallback(
          std::move(callback)));
  ::mojo::internal::SendMojoMessage(*receiver_, message, std::move(responder));
}

void PageHandlerProxy::GetTabPreview(
    int32_t in_tab_id, GetTabPreviewCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::GetTabPreview", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("tab_id"), in_tab_id,
                        "<value of type int32_t>");
   });
#endif

  const bool kExpectsResponse = true;
  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::PageHandler::kGetTabPreview), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_GetTabPreview_Params_Data> params(
          message);
  params.Allocate();

  params->tab_id = in_tab_id;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetTabPreview");
#endif
  std::unique_ptr<mojo::MessageReceiver> responder(
      new PageHandler_GetTabPreview_ForwardToCallback(
          std::move(callback)));
  ::mojo::internal::SendMojoMessage(*receiver_, message, std::move(responder));
}

void PageHandlerProxy::WaitForTabFaviconLoad(
    int32_t in_tab_id, WaitForTabFaviconLoadCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::WaitForTabFaviconLoad", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("tab_id"), in_tab_id,
                        "<value of type int32_t>");
   });
#endif

  const bool kExpectsResponse = true;
  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::PageHandler::kWaitForTabFaviconLoad), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_WaitForTabFaviconLoad_Params_Data> params(
          message);
  params.Allocate();

  params->tab_id = in_tab_id;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("WaitForTabFaviconLoad");
#endif
  std::unique_ptr<mojo::MessageReceiver> responder(
      new PageHandler_WaitForTabFaviconLoad_ForwardToCallback(
          std::move(callback)));
  ::mojo::internal::SendMojoMessage(*receiver_, message, std::move(responder));
}

void PageHandlerProxy::GetInputState(
    GetInputStateCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send searchbox::mojom::PageHandler::GetInputState");
#endif

  const bool kExpectsResponse = true;
  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::PageHandler::kGetInputState), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_GetInputState_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetInputState");
#endif
  std::unique_ptr<mojo::MessageReceiver> responder(
      new PageHandler_GetInputState_ForwardToCallback(
          std::move(callback)));
  ::mojo::internal::SendMojoMessage(*receiver_, message, std::move(responder));
}

void PageHandlerProxy::NotifySessionStarted(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send searchbox::mojom::PageHandler::NotifySessionStarted");
#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::PageHandler::kNotifySessionStarted), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_NotifySessionStarted_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("NotifySessionStarted");
#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);
}

void PageHandlerProxy::NotifySessionAbandoned(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send searchbox::mojom::PageHandler::NotifySessionAbandoned");
#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::PageHandler::kNotifySessionAbandoned), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_NotifySessionAbandoned_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("NotifySessionAbandoned");
#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);
}

void PageHandlerProxy::AddFileContext(
    SelectedFileInfoPtr in_file_info, ::mojo_base::BigBuffer in_file_bytes, AddFileContextCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::AddFileContext", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("file_info"), in_file_info,
                        "<value of type SelectedFileInfoPtr>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("file_bytes"), in_file_bytes,
                        "<value of type ::mojo_base::BigBuffer>");
   });
#endif

  const bool kExpectsResponse = true;
  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::PageHandler::kAddFileContext), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_AddFileContext_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->file_info)::BaseType> file_info_fragment(
          params.message());
  
  mojo::internal::Serialize<::searchbox::mojom::SelectedFileInfoDataView>(
    in_file_info,
    file_info_fragment);

  params->file_info.Set(
      file_info_fragment.is_null() ? nullptr : file_info_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->file_info.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null file_info in PageHandler.AddFileContext request");
  mojo::internal::MessageFragment<decltype(params->file_bytes)>
      file_bytes_fragment(params.message());
  file_bytes_fragment.Claim(&params->file_bytes);
  
  mojo::internal::Serialize<::mojo_base::mojom::BigBufferDataView>(
    in_file_bytes,
    file_bytes_fragment,
    true);

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->file_bytes.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null file_bytes in PageHandler.AddFileContext request");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("AddFileContext");
#endif
  std::unique_ptr<mojo::MessageReceiver> responder(
      new PageHandler_AddFileContext_ForwardToCallback(
          std::move(callback)));
  ::mojo::internal::SendMojoMessage(*receiver_, message, std::move(responder));
}

void PageHandlerProxy::AddTabContext(
    int32_t in_tab_id, bool in_delay_upload, TabAttachmentSource in_source, AddTabContextCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::AddTabContext", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("tab_id"), in_tab_id,
                        "<value of type int32_t>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("delay_upload"), in_delay_upload,
                        "<value of type bool>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("source"), in_source,
                        "<value of type TabAttachmentSource>");
   });
#endif

  const bool kExpectsResponse = true;
  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::PageHandler::kAddTabContext), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_AddTabContext_Params_Data> params(
          message);
  params.Allocate();

  params->tab_id = in_tab_id;

  params->delay_upload = in_delay_upload;

  
  mojo::internal::Serialize<::searchbox::mojom::TabAttachmentSource>(
    in_source,
    &params->source);

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("AddTabContext");
#endif
  std::unique_ptr<mojo::MessageReceiver> responder(
      new PageHandler_AddTabContext_ForwardToCallback(
          std::move(callback)));
  ::mojo::internal::SendMojoMessage(*receiver_, message, std::move(responder));
}

void PageHandlerProxy::DeleteContext(
    const ::base::UnguessableToken& in_token, bool in_from_automatic_chip) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::DeleteContext", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("token"), in_token,
                        "<value of type const ::base::UnguessableToken&>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("from_automatic_chip"), in_from_automatic_chip,
                        "<value of type bool>");
   });
#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::PageHandler::kDeleteContext), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_DeleteContext_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->token)::BaseType> token_fragment(
          params.message());
  
  mojo::internal::Serialize<::mojo_base::mojom::UnguessableTokenDataView>(
    in_token,
    token_fragment);

  params->token.Set(
      token_fragment.is_null() ? nullptr : token_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->token.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null token in PageHandler.DeleteContext request");

  params->from_automatic_chip = in_from_automatic_chip;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("DeleteContext");
#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);
}

void PageHandlerProxy::DeleteTabContext(
    int32_t in_tab_id) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::DeleteTabContext", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("tab_id"), in_tab_id,
                        "<value of type int32_t>");
   });
#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::PageHandler::kDeleteTabContext), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_DeleteTabContext_Params_Data> params(
          message);
  params.Allocate();

  params->tab_id = in_tab_id;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("DeleteTabContext");
#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);
}

void PageHandlerProxy::ClearFiles(
    bool in_should_block_auto_suggested_tabs) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::ClearFiles", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("should_block_auto_suggested_tabs"), in_should_block_auto_suggested_tabs,
                        "<value of type bool>");
   });
#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::PageHandler::kClearFiles), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_ClearFiles_Params_Data> params(
          message);
  params.Allocate();

  params->should_block_auto_suggested_tabs = in_should_block_auto_suggested_tabs;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("ClearFiles");
#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);
}

void PageHandlerProxy::SubmitQuery(
    const std::string& in_query_text, uint8_t in_mouse_button, bool in_alt_key, bool in_ctrl_key, bool in_meta_key, bool in_shift_key, bool in_is_voice_search) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::SubmitQuery", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("query_text"), in_query_text,
                        "<value of type const std::string&>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("mouse_button"), in_mouse_button,
                        "<value of type uint8_t>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("alt_key"), in_alt_key,
                        "<value of type bool>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("ctrl_key"), in_ctrl_key,
                        "<value of type bool>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("meta_key"), in_meta_key,
                        "<value of type bool>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("shift_key"), in_shift_key,
                        "<value of type bool>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("is_voice_search"), in_is_voice_search,
                        "<value of type bool>");
   });
#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::PageHandler::kSubmitQuery), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_SubmitQuery_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->query_text)::BaseType> query_text_fragment(
          params.message());
  
  mojo::internal::Serialize<mojo::StringDataView>(
    in_query_text,
    query_text_fragment);

  params->query_text.Set(
      query_text_fragment.is_null() ? nullptr : query_text_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->query_text.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null query_text in PageHandler.SubmitQuery request");

  params->mouse_button = in_mouse_button;

  params->alt_key = in_alt_key;

  params->ctrl_key = in_ctrl_key;

  params->meta_key = in_meta_key;

  params->shift_key = in_shift_key;

  params->is_voice_search = in_is_voice_search;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("SubmitQuery");
#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);
}

void PageHandlerProxy::OpenLensSearch(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send searchbox::mojom::PageHandler::OpenLensSearch");
#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::PageHandler::kOpenLensSearch), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_OpenLensSearch_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("OpenLensSearch");
#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);
}

void PageHandlerProxy::SetActiveToolMode(
    ::omnibox::ToolMode in_tool, bool in_is_set_by_aim) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::SetActiveToolMode", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("tool"), in_tool,
                        "<value of type ::omnibox::ToolMode>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("is_set_by_aim"), in_is_set_by_aim,
                        "<value of type bool>");
   });
#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::PageHandler::kSetActiveToolMode), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_SetActiveToolMode_Params_Data> params(
          message);
  params.Allocate();

  
  mojo::internal::Serialize<::composebox_query::mojom::ToolMode>(
    in_tool,
    &params->tool);

  params->is_set_by_aim = in_is_set_by_aim;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("SetActiveToolMode");
#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);
}

void PageHandlerProxy::SetActiveModelMode(
    ::omnibox::ModelMode in_model, bool in_is_set_by_aim) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::SetActiveModelMode", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("model"), in_model,
                        "<value of type ::omnibox::ModelMode>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("is_set_by_aim"), in_is_set_by_aim,
                        "<value of type bool>");
   });
#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::PageHandler::kSetActiveModelMode), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_SetActiveModelMode_Params_Data> params(
          message);
  params.Allocate();

  
  mojo::internal::Serialize<::composebox_query::mojom::ModelMode>(
    in_model,
    &params->model);

  params->is_set_by_aim = in_is_set_by_aim;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("SetActiveModelMode");
#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);
}

void PageHandlerProxy::ActivateMetricsFunnel(
    const std::string& in_funnel_name) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::ActivateMetricsFunnel", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("funnel_name"), in_funnel_name,
                        "<value of type const std::string&>");
   });
#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::PageHandler::kActivateMetricsFunnel), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_ActivateMetricsFunnel_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->funnel_name)::BaseType> funnel_name_fragment(
          params.message());
  
  mojo::internal::Serialize<mojo::StringDataView>(
    in_funnel_name,
    funnel_name_fragment);

  params->funnel_name.Set(
      funnel_name_fragment.is_null() ? nullptr : funnel_name_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->funnel_name.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null funnel_name in PageHandler.ActivateMetricsFunnel request");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("ActivateMetricsFunnel");
#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);
}

void PageHandlerProxy::RecordToolSelectionAction(
    ::omnibox::ToolMode in_tool) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::RecordToolSelectionAction", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("tool"), in_tool,
                        "<value of type ::omnibox::ToolMode>");
   });
#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::PageHandler::kRecordToolSelectionAction), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_RecordToolSelectionAction_Params_Data> params(
          message);
  params.Allocate();

  
  mojo::internal::Serialize<::composebox_query::mojom::ToolMode>(
    in_tool,
    &params->tool);

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("RecordToolSelectionAction");
#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);
}

void PageHandlerProxy::RecordModelSelectionAction(
    ::omnibox::ModelMode in_model) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::RecordModelSelectionAction", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("model"), in_model,
                        "<value of type ::omnibox::ModelMode>");
   });
#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::PageHandler::kRecordModelSelectionAction), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_RecordModelSelectionAction_Params_Data> params(
          message);
  params.Allocate();

  
  mojo::internal::Serialize<::composebox_query::mojom::ModelMode>(
    in_model,
    &params->model);

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("RecordModelSelectionAction");
#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);
}

void PageHandlerProxy::GetDriveDisclaimerStatus(
    GetDriveDisclaimerStatusCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send searchbox::mojom::PageHandler::GetDriveDisclaimerStatus");
#endif

  const bool kExpectsResponse = true;
  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::PageHandler::kGetDriveDisclaimerStatus), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_GetDriveDisclaimerStatus_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetDriveDisclaimerStatus");
#endif
  std::unique_ptr<mojo::MessageReceiver> responder(
      new PageHandler_GetDriveDisclaimerStatus_ForwardToCallback(
          std::move(callback)));
  ::mojo::internal::SendMojoMessage(*receiver_, message, std::move(responder));
}

void PageHandlerProxy::OnDriveDisclaimerAccepted(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send searchbox::mojom::PageHandler::OnDriveDisclaimerAccepted");
#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::PageHandler::kOnDriveDisclaimerAccepted), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_OnDriveDisclaimerAccepted_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("OnDriveDisclaimerAccepted");
#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);
}

void PageHandlerProxy::OnDriveUploadClicked(
    OnDriveUploadClickedCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send searchbox::mojom::PageHandler::OnDriveUploadClicked");
#endif

  const bool kExpectsResponse = true;
  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::PageHandler::kOnDriveUploadClicked), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_OnDriveUploadClicked_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("OnDriveUploadClicked");
#endif
  std::unique_ptr<mojo::MessageReceiver> responder(
      new PageHandler_OnDriveUploadClicked_ForwardToCallback(
          std::move(callback)));
  ::mojo::internal::SendMojoMessage(*receiver_, message, std::move(responder));
}

void PageHandlerProxy::OpenProfilePicker(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send searchbox::mojom::PageHandler::OpenProfilePicker");
#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::PageHandler::kOpenProfilePicker), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_OpenProfilePicker_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("OpenProfilePicker");
#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);
}

void PageHandlerProxy::ShowScreenshotMenu(
    const ::gfx::Rect& in_anchor_rect) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::ShowScreenshotMenu", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("anchor_rect"), in_anchor_rect,
                        "<value of type const ::gfx::Rect&>");
   });
#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::PageHandler::kShowScreenshotMenu), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_ShowScreenshotMenu_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->anchor_rect)::BaseType> anchor_rect_fragment(
          params.message());
  
  mojo::internal::Serialize<::gfx::mojom::RectDataView>(
    in_anchor_rect,
    anchor_rect_fragment);

  params->anchor_rect.Set(
      anchor_rect_fragment.is_null() ? nullptr : anchor_rect_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->anchor_rect.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null anchor_rect in PageHandler.ShowScreenshotMenu request");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("ShowScreenshotMenu");
#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);
}

void PageHandlerProxy::StartScreenshare(
    bool in_prefer_entire_screen, StartScreenshareCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::PageHandler::StartScreenshare", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("prefer_entire_screen"), in_prefer_entire_screen,
                        "<value of type bool>");
   });
#endif

  const bool kExpectsResponse = true;
  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::PageHandler::kStartScreenshare), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_StartScreenshare_Params_Data> params(
          message);
  params.Allocate();

  params->prefer_entire_screen = in_prefer_entire_screen;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("StartScreenshare");
#endif
  std::unique_ptr<mojo::MessageReceiver> responder(
      new PageHandler_StartScreenshare_ForwardToCallback(
          std::move(callback)));
  ::mojo::internal::SendMojoMessage(*receiver_, message, std::move(responder));
}

void PageHandlerProxy::CaptureRegionScreenshot(
    CaptureRegionScreenshotCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send searchbox::mojom::PageHandler::CaptureRegionScreenshot");
#endif

  const bool kExpectsResponse = true;
  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::PageHandler::kCaptureRegionScreenshot), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_CaptureRegionScreenshot_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("CaptureRegionScreenshot");
#endif
  std::unique_ptr<mojo::MessageReceiver> responder(
      new PageHandler_CaptureRegionScreenshot_ForwardToCallback(
          std::move(callback)));
  ::mojo::internal::SendMojoMessage(*receiver_, message, std::move(responder));
}

void PageHandlerProxy::GetPageClassification(
    GetPageClassificationCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send searchbox::mojom::PageHandler::GetPageClassification");
#endif

  const bool kExpectsResponse = true;
  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::PageHandler::kGetPageClassification), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_GetPageClassification_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetPageClassification");
#endif
  std::unique_ptr<mojo::MessageReceiver> responder(
      new PageHandler_GetPageClassification_ForwardToCallback(
          std::move(callback)));
  ::mojo::internal::SendMojoMessage(*receiver_, message, std::move(responder));
}
class PageHandler_GetCyclingPlaceholderConfig_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::GetCyclingPlaceholderConfigCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_GetCyclingPlaceholderConfig_ProxyToResponder> proxy(
        new PageHandler_GetCyclingPlaceholderConfig_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_GetCyclingPlaceholderConfig_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_GetCyclingPlaceholderConfig_ProxyToResponder() {
#if DCHECK_IS_ON()
    if (responder_) {
      // If we're being destroyed without being run, we want to ensure the
      // binding endpoint has been closed. This checks for that asynchronously.
      // We pass a bound generated callback to handle the response so that any
      // resulting DCHECK stack will have useful interface type information.
      // Instantiate a ScopedFizzleBlockShutdownTasks to allow this request to
      // fizzle if this happens after shutdown and the endpoint is bound to a
      // BLOCK_SHUTDOWN sequence.
      base::ThreadPoolInstance::ScopedFizzleBlockShutdownTasks fizzler;
      responder_->IsConnectedAsync(base::BindOnce(&OnIsConnectedComplete));
    }
#endif
  }

 private:
  PageHandler_GetCyclingPlaceholderConfig_ProxyToResponder(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder)
      : ::mojo::internal::ProxyToResponder(message, std::move(responder)) {
  }

#if DCHECK_IS_ON()
  static void OnIsConnectedComplete(bool connected) {
    DCHECK(!connected)
        << "PageHandler::GetCyclingPlaceholderConfigCallback was destroyed without "
        << "first either being run or its corresponding binding being closed. "
        << "It is an error to drop response callbacks which still correspond "
        << "to an open interface pipe.";
  }
#endif

  void Run(
      PlaceholderConfigPtr in_config);
};

bool PageHandler_GetCyclingPlaceholderConfig_ForwardToCallback::Accept(
    mojo::Message* message) {
  DCHECK(message->is_serialized());
  internal::PageHandler_GetCyclingPlaceholderConfig_ResponseParams_Data* params =
      reinterpret_cast<
          internal::PageHandler_GetCyclingPlaceholderConfig_ResponseParams_Data*>(
              message->mutable_payload());
  

  // Validation for PageHandler.12
  bool success = true;
  PlaceholderConfigPtr p_config{};
  PageHandler_GetCyclingPlaceholderConfig_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadConfig(&p_config))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 12, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_config));
  }
  return true;
}

void PageHandler_GetCyclingPlaceholderConfig_ProxyToResponder::Run(
    PlaceholderConfigPtr in_config) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply searchbox::mojom::PageHandler::GetCyclingPlaceholderConfig", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("config"), in_config,
                        "<value of type PlaceholderConfigPtr>");
   });
#endif

  const uint32_t kFlags = mojo::Message::kFlagIsResponse |
      ((is_sync_) ? mojo::Message::kFlagIsSync : 0) |
      ((true) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((false) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kGetCyclingPlaceholderConfig), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_GetCyclingPlaceholderConfig_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->config)::BaseType> config_fragment(
          params.message());
  
  mojo::internal::Serialize<::searchbox::mojom::PlaceholderConfigDataView>(
    in_config,
    config_fragment);

  params->config.Set(
      config_fragment.is_null() ? nullptr : config_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->config.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null config in ");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetCyclingPlaceholderConfig");
#endif

  message.set_request_id(request_id_);
  message.set_trace_nonce(trace_nonce_);
  ::mojo::internal::SendMojoMessage(*responder_, message);
  // SendMojoMessage() fails silently if the responder connection is closed,
  // or if the message is malformed.
  //
  // TODO(darin): If Accept() returns false due to a malformed message, that
  // may be good reason to close the connection. However, we don't have a
  // way to do that from here. We should add a way.
  responder_ = nullptr;
}
class PageHandler_GetRecentTabs_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::GetRecentTabsCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_GetRecentTabs_ProxyToResponder> proxy(
        new PageHandler_GetRecentTabs_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_GetRecentTabs_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_GetRecentTabs_ProxyToResponder() {
#if DCHECK_IS_ON()
    if (responder_) {
      // If we're being destroyed without being run, we want to ensure the
      // binding endpoint has been closed. This checks for that asynchronously.
      // We pass a bound generated callback to handle the response so that any
      // resulting DCHECK stack will have useful interface type information.
      // Instantiate a ScopedFizzleBlockShutdownTasks to allow this request to
      // fizzle if this happens after shutdown and the endpoint is bound to a
      // BLOCK_SHUTDOWN sequence.
      base::ThreadPoolInstance::ScopedFizzleBlockShutdownTasks fizzler;
      responder_->IsConnectedAsync(base::BindOnce(&OnIsConnectedComplete));
    }
#endif
  }

 private:
  PageHandler_GetRecentTabs_ProxyToResponder(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder)
      : ::mojo::internal::ProxyToResponder(message, std::move(responder)) {
  }

#if DCHECK_IS_ON()
  static void OnIsConnectedComplete(bool connected) {
    DCHECK(!connected)
        << "PageHandler::GetRecentTabsCallback was destroyed without "
        << "first either being run or its corresponding binding being closed. "
        << "It is an error to drop response callbacks which still correspond "
        << "to an open interface pipe.";
  }
#endif

  void Run(
      std::vector<TabInfoPtr> in_tabs);
};

bool PageHandler_GetRecentTabs_ForwardToCallback::Accept(
    mojo::Message* message) {
  DCHECK(message->is_serialized());
  internal::PageHandler_GetRecentTabs_ResponseParams_Data* params =
      reinterpret_cast<
          internal::PageHandler_GetRecentTabs_ResponseParams_Data*>(
              message->mutable_payload());
  

  // Validation for PageHandler.13
  bool success = true;
  std::vector<TabInfoPtr> p_tabs{};
  PageHandler_GetRecentTabs_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadTabs(&p_tabs))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 13, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_tabs));
  }
  return true;
}

void PageHandler_GetRecentTabs_ProxyToResponder::Run(
    std::vector<TabInfoPtr> in_tabs) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply searchbox::mojom::PageHandler::GetRecentTabs", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("tabs"), in_tabs,
                        "<value of type std::vector<TabInfoPtr>>");
   });
#endif

  const uint32_t kFlags = mojo::Message::kFlagIsResponse |
      ((is_sync_) ? mojo::Message::kFlagIsSync : 0) |
      ((true) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((false) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kGetRecentTabs), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_GetRecentTabs_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->tabs)::BaseType>
      tabs_fragment(params.message());
  constexpr const mojo::internal::ContainerValidateParams& tabs_validate_params =
      mojo::internal::GetArrayValidator<0, false, nullptr>();
  
  mojo::internal::Serialize<mojo::ArrayDataView<::searchbox::mojom::TabInfoDataView>>(
    in_tabs,
    tabs_fragment,
    &tabs_validate_params);

  params->tabs.Set(
      tabs_fragment.is_null() ? nullptr : tabs_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->tabs.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null tabs in ");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetRecentTabs");
#endif

  message.set_request_id(request_id_);
  message.set_trace_nonce(trace_nonce_);
  ::mojo::internal::SendMojoMessage(*responder_, message);
  // SendMojoMessage() fails silently if the responder connection is closed,
  // or if the message is malformed.
  //
  // TODO(darin): If Accept() returns false due to a malformed message, that
  // may be good reason to close the connection. However, we don't have a
  // way to do that from here. We should add a way.
  responder_ = nullptr;
}
class PageHandler_GetTabPreview_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::GetTabPreviewCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_GetTabPreview_ProxyToResponder> proxy(
        new PageHandler_GetTabPreview_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_GetTabPreview_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_GetTabPreview_ProxyToResponder() {
#if DCHECK_IS_ON()
    if (responder_) {
      // If we're being destroyed without being run, we want to ensure the
      // binding endpoint has been closed. This checks for that asynchronously.
      // We pass a bound generated callback to handle the response so that any
      // resulting DCHECK stack will have useful interface type information.
      // Instantiate a ScopedFizzleBlockShutdownTasks to allow this request to
      // fizzle if this happens after shutdown and the endpoint is bound to a
      // BLOCK_SHUTDOWN sequence.
      base::ThreadPoolInstance::ScopedFizzleBlockShutdownTasks fizzler;
      responder_->IsConnectedAsync(base::BindOnce(&OnIsConnectedComplete));
    }
#endif
  }

 private:
  PageHandler_GetTabPreview_ProxyToResponder(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder)
      : ::mojo::internal::ProxyToResponder(message, std::move(responder)) {
  }

#if DCHECK_IS_ON()
  static void OnIsConnectedComplete(bool connected) {
    DCHECK(!connected)
        << "PageHandler::GetTabPreviewCallback was destroyed without "
        << "first either being run or its corresponding binding being closed. "
        << "It is an error to drop response callbacks which still correspond "
        << "to an open interface pipe.";
  }
#endif

  void Run(
      const std::optional<std::string>& in_preview_data_url);
};

bool PageHandler_GetTabPreview_ForwardToCallback::Accept(
    mojo::Message* message) {
  DCHECK(message->is_serialized());
  internal::PageHandler_GetTabPreview_ResponseParams_Data* params =
      reinterpret_cast<
          internal::PageHandler_GetTabPreview_ResponseParams_Data*>(
              message->mutable_payload());
  

  // Validation for PageHandler.14
  bool success = true;
  std::optional<std::string> p_preview_data_url{};
  PageHandler_GetTabPreview_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadPreviewDataUrl(&p_preview_data_url))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 14, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_preview_data_url));
  }
  return true;
}

void PageHandler_GetTabPreview_ProxyToResponder::Run(
    const std::optional<std::string>& in_preview_data_url) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply searchbox::mojom::PageHandler::GetTabPreview", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("preview_data_url"), in_preview_data_url,
                        "<value of type const std::optional<std::string>&>");
   });
#endif

  const uint32_t kFlags = mojo::Message::kFlagIsResponse |
      ((is_sync_) ? mojo::Message::kFlagIsSync : 0) |
      ((true) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((false) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kGetTabPreview), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_GetTabPreview_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->preview_data_url)::BaseType> preview_data_url_fragment(
          params.message());
  
  mojo::internal::Serialize<mojo::StringDataView>(
    in_preview_data_url,
    preview_data_url_fragment);

  params->preview_data_url.Set(
      preview_data_url_fragment.is_null() ? nullptr : preview_data_url_fragment.data());

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetTabPreview");
#endif

  message.set_request_id(request_id_);
  message.set_trace_nonce(trace_nonce_);
  ::mojo::internal::SendMojoMessage(*responder_, message);
  // SendMojoMessage() fails silently if the responder connection is closed,
  // or if the message is malformed.
  //
  // TODO(darin): If Accept() returns false due to a malformed message, that
  // may be good reason to close the connection. However, we don't have a
  // way to do that from here. We should add a way.
  responder_ = nullptr;
}
class PageHandler_WaitForTabFaviconLoad_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::WaitForTabFaviconLoadCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_WaitForTabFaviconLoad_ProxyToResponder> proxy(
        new PageHandler_WaitForTabFaviconLoad_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_WaitForTabFaviconLoad_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_WaitForTabFaviconLoad_ProxyToResponder() {
#if DCHECK_IS_ON()
    if (responder_) {
      // If we're being destroyed without being run, we want to ensure the
      // binding endpoint has been closed. This checks for that asynchronously.
      // We pass a bound generated callback to handle the response so that any
      // resulting DCHECK stack will have useful interface type information.
      // Instantiate a ScopedFizzleBlockShutdownTasks to allow this request to
      // fizzle if this happens after shutdown and the endpoint is bound to a
      // BLOCK_SHUTDOWN sequence.
      base::ThreadPoolInstance::ScopedFizzleBlockShutdownTasks fizzler;
      responder_->IsConnectedAsync(base::BindOnce(&OnIsConnectedComplete));
    }
#endif
  }

 private:
  PageHandler_WaitForTabFaviconLoad_ProxyToResponder(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder)
      : ::mojo::internal::ProxyToResponder(message, std::move(responder)) {
  }

#if DCHECK_IS_ON()
  static void OnIsConnectedComplete(bool connected) {
    DCHECK(!connected)
        << "PageHandler::WaitForTabFaviconLoadCallback was destroyed without "
        << "first either being run or its corresponding binding being closed. "
        << "It is an error to drop response callbacks which still correspond "
        << "to an open interface pipe.";
  }
#endif

  void Run(
      const std::optional<::GURL>& in_favicon_data_url);
};

bool PageHandler_WaitForTabFaviconLoad_ForwardToCallback::Accept(
    mojo::Message* message) {
  DCHECK(message->is_serialized());
  internal::PageHandler_WaitForTabFaviconLoad_ResponseParams_Data* params =
      reinterpret_cast<
          internal::PageHandler_WaitForTabFaviconLoad_ResponseParams_Data*>(
              message->mutable_payload());
  

  // Validation for PageHandler.15
  bool success = true;
  std::optional<::GURL> p_favicon_data_url{};
  PageHandler_WaitForTabFaviconLoad_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadFaviconDataUrl(&p_favicon_data_url))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 15, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_favicon_data_url));
  }
  return true;
}

void PageHandler_WaitForTabFaviconLoad_ProxyToResponder::Run(
    const std::optional<::GURL>& in_favicon_data_url) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply searchbox::mojom::PageHandler::WaitForTabFaviconLoad", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("favicon_data_url"), in_favicon_data_url,
                        "<value of type const std::optional<::GURL>&>");
   });
#endif

  const uint32_t kFlags = mojo::Message::kFlagIsResponse |
      ((is_sync_) ? mojo::Message::kFlagIsSync : 0) |
      ((true) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((false) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kWaitForTabFaviconLoad), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_WaitForTabFaviconLoad_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->favicon_data_url)::BaseType> favicon_data_url_fragment(
          params.message());
  
  mojo::internal::Serialize<::url::mojom::UrlDataView>(
    in_favicon_data_url,
    favicon_data_url_fragment);

  params->favicon_data_url.Set(
      favicon_data_url_fragment.is_null() ? nullptr : favicon_data_url_fragment.data());

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("WaitForTabFaviconLoad");
#endif

  message.set_request_id(request_id_);
  message.set_trace_nonce(trace_nonce_);
  ::mojo::internal::SendMojoMessage(*responder_, message);
  // SendMojoMessage() fails silently if the responder connection is closed,
  // or if the message is malformed.
  //
  // TODO(darin): If Accept() returns false due to a malformed message, that
  // may be good reason to close the connection. However, we don't have a
  // way to do that from here. We should add a way.
  responder_ = nullptr;
}
class PageHandler_GetInputState_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::GetInputStateCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_GetInputState_ProxyToResponder> proxy(
        new PageHandler_GetInputState_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_GetInputState_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_GetInputState_ProxyToResponder() {
#if DCHECK_IS_ON()
    if (responder_) {
      // If we're being destroyed without being run, we want to ensure the
      // binding endpoint has been closed. This checks for that asynchronously.
      // We pass a bound generated callback to handle the response so that any
      // resulting DCHECK stack will have useful interface type information.
      // Instantiate a ScopedFizzleBlockShutdownTasks to allow this request to
      // fizzle if this happens after shutdown and the endpoint is bound to a
      // BLOCK_SHUTDOWN sequence.
      base::ThreadPoolInstance::ScopedFizzleBlockShutdownTasks fizzler;
      responder_->IsConnectedAsync(base::BindOnce(&OnIsConnectedComplete));
    }
#endif
  }

 private:
  PageHandler_GetInputState_ProxyToResponder(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder)
      : ::mojo::internal::ProxyToResponder(message, std::move(responder)) {
  }

#if DCHECK_IS_ON()
  static void OnIsConnectedComplete(bool connected) {
    DCHECK(!connected)
        << "PageHandler::GetInputStateCallback was destroyed without "
        << "first either being run or its corresponding binding being closed. "
        << "It is an error to drop response callbacks which still correspond "
        << "to an open interface pipe.";
  }
#endif

  void Run(
      const std::optional<::omnibox::InputState>& in_state);
};

bool PageHandler_GetInputState_ForwardToCallback::Accept(
    mojo::Message* message) {
  DCHECK(message->is_serialized());
  internal::PageHandler_GetInputState_ResponseParams_Data* params =
      reinterpret_cast<
          internal::PageHandler_GetInputState_ResponseParams_Data*>(
              message->mutable_payload());
  

  // Validation for PageHandler.16
  bool success = true;
  std::optional<::omnibox::InputState> p_state{};
  PageHandler_GetInputState_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadState(&p_state))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 16, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_state));
  }
  return true;
}

void PageHandler_GetInputState_ProxyToResponder::Run(
    const std::optional<::omnibox::InputState>& in_state) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply searchbox::mojom::PageHandler::GetInputState", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("state"), in_state,
                        "<value of type const std::optional<::omnibox::InputState>&>");
   });
#endif

  const uint32_t kFlags = mojo::Message::kFlagIsResponse |
      ((is_sync_) ? mojo::Message::kFlagIsSync : 0) |
      ((true) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((false) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kGetInputState), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_GetInputState_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->state)::BaseType> state_fragment(
          params.message());
  
  mojo::internal::Serialize<::composebox_query::mojom::InputStateDataView>(
    in_state,
    state_fragment);

  params->state.Set(
      state_fragment.is_null() ? nullptr : state_fragment.data());

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetInputState");
#endif

  message.set_request_id(request_id_);
  message.set_trace_nonce(trace_nonce_);
  ::mojo::internal::SendMojoMessage(*responder_, message);
  // SendMojoMessage() fails silently if the responder connection is closed,
  // or if the message is malformed.
  //
  // TODO(darin): If Accept() returns false due to a malformed message, that
  // may be good reason to close the connection. However, we don't have a
  // way to do that from here. We should add a way.
  responder_ = nullptr;
}
class PageHandler_AddFileContext_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::AddFileContextCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_AddFileContext_ProxyToResponder> proxy(
        new PageHandler_AddFileContext_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&Transform)
      .Then(base::BindOnce(&PageHandler_AddFileContext_ProxyToResponder::Run,
                          std::move(proxy)));
  }

  static PageHandler_AddFileContext_ResponseParam_ResultPtr Transform(base::expected<
  ::base::UnguessableToken,
  ::contextual_search::ContextUploadErrorType> in) {
    return in.has_value() ? ::searchbox::mojom::PageHandler_AddFileContext_ResponseParam_Result::NewSuccess(std::move(in.value())) :
                            ::searchbox::mojom::PageHandler_AddFileContext_ResponseParam_Result::NewFailure(std::move(in.error()));
  }



  ~PageHandler_AddFileContext_ProxyToResponder() {
#if DCHECK_IS_ON()
    if (responder_) {
      // If we're being destroyed without being run, we want to ensure the
      // binding endpoint has been closed. This checks for that asynchronously.
      // We pass a bound generated callback to handle the response so that any
      // resulting DCHECK stack will have useful interface type information.
      // Instantiate a ScopedFizzleBlockShutdownTasks to allow this request to
      // fizzle if this happens after shutdown and the endpoint is bound to a
      // BLOCK_SHUTDOWN sequence.
      base::ThreadPoolInstance::ScopedFizzleBlockShutdownTasks fizzler;
      responder_->IsConnectedAsync(base::BindOnce(&OnIsConnectedComplete));
    }
#endif
  }

 private:
  PageHandler_AddFileContext_ProxyToResponder(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder)
      : ::mojo::internal::ProxyToResponder(message, std::move(responder)) {
  }

#if DCHECK_IS_ON()
  static void OnIsConnectedComplete(bool connected) {
    DCHECK(!connected)
        << "PageHandler::AddFileContextCallback was destroyed without "
        << "first either being run or its corresponding binding being closed. "
        << "It is an error to drop response callbacks which still correspond "
        << "to an open interface pipe.";
  }
#endif

  void Run(
      PageHandler_AddFileContext_ResponseParam_ResultPtr in_result);
};

bool PageHandler_AddFileContext_ForwardToCallback::Accept(
    mojo::Message* message) {
  DCHECK(message->is_serialized());
  internal::PageHandler_AddFileContext_ResponseParams_Data* params =
      reinterpret_cast<
          internal::PageHandler_AddFileContext_ResponseParams_Data*>(
              message->mutable_payload());
  

  // Validation for PageHandler.19
  bool success = true;
  PageHandler_AddFileContext_ResponseParam_ResultPtr p_result{};
  PageHandler_AddFileContext_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadResult(&p_result))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 19, true);
    return false;
  }
  if (!callback_.is_null()) {
    if (p_result->is_success()) {
      std::move(callback_).Run(base::ok(std::move(p_result->get_success())));
    } else {
      std::move(callback_).Run(base::unexpected(std::move(p_result->get_failure())));
    }
  }
  return true;
}

void PageHandler_AddFileContext_ProxyToResponder::Run(
    PageHandler_AddFileContext_ResponseParam_ResultPtr in_result) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply searchbox::mojom::PageHandler::AddFileContext", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("result"), in_result,
                        "<value of type PageHandler_AddFileContext_ResponseParam_ResultPtr>");
   });
#endif

  const uint32_t kFlags = mojo::Message::kFlagIsResponse |
      ((is_sync_) ? mojo::Message::kFlagIsSync : 0) |
      ((true) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((false) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kAddFileContext), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_AddFileContext_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<decltype(params->result)>
      result_fragment(params.message());
  result_fragment.Claim(&params->result);
  
  mojo::internal::Serialize<::searchbox::mojom::PageHandler_AddFileContext_ResponseParam_ResultDataView>(
    in_result,
    result_fragment,
    true);

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->result.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null result in ");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("AddFileContext");
#endif

  message.set_request_id(request_id_);
  message.set_trace_nonce(trace_nonce_);
  ::mojo::internal::SendMojoMessage(*responder_, message);
  // SendMojoMessage() fails silently if the responder connection is closed,
  // or if the message is malformed.
  //
  // TODO(darin): If Accept() returns false due to a malformed message, that
  // may be good reason to close the connection. However, we don't have a
  // way to do that from here. We should add a way.
  responder_ = nullptr;
}
class PageHandler_AddTabContext_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::AddTabContextCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_AddTabContext_ProxyToResponder> proxy(
        new PageHandler_AddTabContext_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&Transform)
      .Then(base::BindOnce(&PageHandler_AddTabContext_ProxyToResponder::Run,
                          std::move(proxy)));
  }

  static PageHandler_AddTabContext_ResponseParam_ResultPtr Transform(base::expected<
  ::base::UnguessableToken,
  ::contextual_search::ContextUploadErrorType> in) {
    return in.has_value() ? ::searchbox::mojom::PageHandler_AddTabContext_ResponseParam_Result::NewSuccess(std::move(in.value())) :
                            ::searchbox::mojom::PageHandler_AddTabContext_ResponseParam_Result::NewFailure(std::move(in.error()));
  }



  ~PageHandler_AddTabContext_ProxyToResponder() {
#if DCHECK_IS_ON()
    if (responder_) {
      // If we're being destroyed without being run, we want to ensure the
      // binding endpoint has been closed. This checks for that asynchronously.
      // We pass a bound generated callback to handle the response so that any
      // resulting DCHECK stack will have useful interface type information.
      // Instantiate a ScopedFizzleBlockShutdownTasks to allow this request to
      // fizzle if this happens after shutdown and the endpoint is bound to a
      // BLOCK_SHUTDOWN sequence.
      base::ThreadPoolInstance::ScopedFizzleBlockShutdownTasks fizzler;
      responder_->IsConnectedAsync(base::BindOnce(&OnIsConnectedComplete));
    }
#endif
  }

 private:
  PageHandler_AddTabContext_ProxyToResponder(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder)
      : ::mojo::internal::ProxyToResponder(message, std::move(responder)) {
  }

#if DCHECK_IS_ON()
  static void OnIsConnectedComplete(bool connected) {
    DCHECK(!connected)
        << "PageHandler::AddTabContextCallback was destroyed without "
        << "first either being run or its corresponding binding being closed. "
        << "It is an error to drop response callbacks which still correspond "
        << "to an open interface pipe.";
  }
#endif

  void Run(
      PageHandler_AddTabContext_ResponseParam_ResultPtr in_result);
};

bool PageHandler_AddTabContext_ForwardToCallback::Accept(
    mojo::Message* message) {
  DCHECK(message->is_serialized());
  internal::PageHandler_AddTabContext_ResponseParams_Data* params =
      reinterpret_cast<
          internal::PageHandler_AddTabContext_ResponseParams_Data*>(
              message->mutable_payload());
  

  // Validation for PageHandler.20
  bool success = true;
  PageHandler_AddTabContext_ResponseParam_ResultPtr p_result{};
  PageHandler_AddTabContext_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadResult(&p_result))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 20, true);
    return false;
  }
  if (!callback_.is_null()) {
    if (p_result->is_success()) {
      std::move(callback_).Run(base::ok(std::move(p_result->get_success())));
    } else {
      std::move(callback_).Run(base::unexpected(std::move(p_result->get_failure())));
    }
  }
  return true;
}

void PageHandler_AddTabContext_ProxyToResponder::Run(
    PageHandler_AddTabContext_ResponseParam_ResultPtr in_result) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply searchbox::mojom::PageHandler::AddTabContext", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("result"), in_result,
                        "<value of type PageHandler_AddTabContext_ResponseParam_ResultPtr>");
   });
#endif

  const uint32_t kFlags = mojo::Message::kFlagIsResponse |
      ((is_sync_) ? mojo::Message::kFlagIsSync : 0) |
      ((true) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((false) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kAddTabContext), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_AddTabContext_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<decltype(params->result)>
      result_fragment(params.message());
  result_fragment.Claim(&params->result);
  
  mojo::internal::Serialize<::searchbox::mojom::PageHandler_AddTabContext_ResponseParam_ResultDataView>(
    in_result,
    result_fragment,
    true);

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->result.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null result in ");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("AddTabContext");
#endif

  message.set_request_id(request_id_);
  message.set_trace_nonce(trace_nonce_);
  ::mojo::internal::SendMojoMessage(*responder_, message);
  // SendMojoMessage() fails silently if the responder connection is closed,
  // or if the message is malformed.
  //
  // TODO(darin): If Accept() returns false due to a malformed message, that
  // may be good reason to close the connection. However, we don't have a
  // way to do that from here. We should add a way.
  responder_ = nullptr;
}
class PageHandler_GetDriveDisclaimerStatus_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::GetDriveDisclaimerStatusCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_GetDriveDisclaimerStatus_ProxyToResponder> proxy(
        new PageHandler_GetDriveDisclaimerStatus_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_GetDriveDisclaimerStatus_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_GetDriveDisclaimerStatus_ProxyToResponder() {
#if DCHECK_IS_ON()
    if (responder_) {
      // If we're being destroyed without being run, we want to ensure the
      // binding endpoint has been closed. This checks for that asynchronously.
      // We pass a bound generated callback to handle the response so that any
      // resulting DCHECK stack will have useful interface type information.
      // Instantiate a ScopedFizzleBlockShutdownTasks to allow this request to
      // fizzle if this happens after shutdown and the endpoint is bound to a
      // BLOCK_SHUTDOWN sequence.
      base::ThreadPoolInstance::ScopedFizzleBlockShutdownTasks fizzler;
      responder_->IsConnectedAsync(base::BindOnce(&OnIsConnectedComplete));
    }
#endif
  }

 private:
  PageHandler_GetDriveDisclaimerStatus_ProxyToResponder(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder)
      : ::mojo::internal::ProxyToResponder(message, std::move(responder)) {
  }

#if DCHECK_IS_ON()
  static void OnIsConnectedComplete(bool connected) {
    DCHECK(!connected)
        << "PageHandler::GetDriveDisclaimerStatusCallback was destroyed without "
        << "first either being run or its corresponding binding being closed. "
        << "It is an error to drop response callbacks which still correspond "
        << "to an open interface pipe.";
  }
#endif

  void Run(
      DriveDisclaimerStatus in_status);
};

bool PageHandler_GetDriveDisclaimerStatus_ForwardToCallback::Accept(
    mojo::Message* message) {
  DCHECK(message->is_serialized());
  internal::PageHandler_GetDriveDisclaimerStatus_ResponseParams_Data* params =
      reinterpret_cast<
          internal::PageHandler_GetDriveDisclaimerStatus_ResponseParams_Data*>(
              message->mutable_payload());
  

  // Validation for PageHandler.31
  bool success = true;
  DriveDisclaimerStatus p_status{};
  PageHandler_GetDriveDisclaimerStatus_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadStatus(&p_status))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 31, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_status));
  }
  return true;
}

void PageHandler_GetDriveDisclaimerStatus_ProxyToResponder::Run(
    DriveDisclaimerStatus in_status) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply searchbox::mojom::PageHandler::GetDriveDisclaimerStatus", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("status"), in_status,
                        "<value of type DriveDisclaimerStatus>");
   });
#endif

  const uint32_t kFlags = mojo::Message::kFlagIsResponse |
      ((is_sync_) ? mojo::Message::kFlagIsSync : 0) |
      ((true) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((false) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kGetDriveDisclaimerStatus), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_GetDriveDisclaimerStatus_ResponseParams_Data> params(
          message);
  params.Allocate();

  
  mojo::internal::Serialize<::searchbox::mojom::DriveDisclaimerStatus>(
    in_status,
    &params->status);

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetDriveDisclaimerStatus");
#endif

  message.set_request_id(request_id_);
  message.set_trace_nonce(trace_nonce_);
  ::mojo::internal::SendMojoMessage(*responder_, message);
  // SendMojoMessage() fails silently if the responder connection is closed,
  // or if the message is malformed.
  //
  // TODO(darin): If Accept() returns false due to a malformed message, that
  // may be good reason to close the connection. However, we don't have a
  // way to do that from here. We should add a way.
  responder_ = nullptr;
}
class PageHandler_OnDriveUploadClicked_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::OnDriveUploadClickedCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_OnDriveUploadClicked_ProxyToResponder> proxy(
        new PageHandler_OnDriveUploadClicked_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_OnDriveUploadClicked_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_OnDriveUploadClicked_ProxyToResponder() {
#if DCHECK_IS_ON()
    if (responder_) {
      // If we're being destroyed without being run, we want to ensure the
      // binding endpoint has been closed. This checks for that asynchronously.
      // We pass a bound generated callback to handle the response so that any
      // resulting DCHECK stack will have useful interface type information.
      // Instantiate a ScopedFizzleBlockShutdownTasks to allow this request to
      // fizzle if this happens after shutdown and the endpoint is bound to a
      // BLOCK_SHUTDOWN sequence.
      base::ThreadPoolInstance::ScopedFizzleBlockShutdownTasks fizzler;
      responder_->IsConnectedAsync(base::BindOnce(&OnIsConnectedComplete));
    }
#endif
  }

 private:
  PageHandler_OnDriveUploadClicked_ProxyToResponder(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder)
      : ::mojo::internal::ProxyToResponder(message, std::move(responder)) {
  }

#if DCHECK_IS_ON()
  static void OnIsConnectedComplete(bool connected) {
    DCHECK(!connected)
        << "PageHandler::OnDriveUploadClickedCallback was destroyed without "
        << "first either being run or its corresponding binding being closed. "
        << "It is an error to drop response callbacks which still correspond "
        << "to an open interface pipe.";
  }
#endif

  void Run(
      DriveUploadResponsePtr in_response);
};

bool PageHandler_OnDriveUploadClicked_ForwardToCallback::Accept(
    mojo::Message* message) {
  DCHECK(message->is_serialized());
  internal::PageHandler_OnDriveUploadClicked_ResponseParams_Data* params =
      reinterpret_cast<
          internal::PageHandler_OnDriveUploadClicked_ResponseParams_Data*>(
              message->mutable_payload());
  

  // Validation for PageHandler.33
  bool success = true;
  DriveUploadResponsePtr p_response{};
  PageHandler_OnDriveUploadClicked_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadResponse(&p_response))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 33, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_response));
  }
  return true;
}

void PageHandler_OnDriveUploadClicked_ProxyToResponder::Run(
    DriveUploadResponsePtr in_response) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply searchbox::mojom::PageHandler::OnDriveUploadClicked", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("response"), in_response,
                        "<value of type DriveUploadResponsePtr>");
   });
#endif

  const uint32_t kFlags = mojo::Message::kFlagIsResponse |
      ((is_sync_) ? mojo::Message::kFlagIsSync : 0) |
      ((true) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((false) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kOnDriveUploadClicked), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_OnDriveUploadClicked_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->response)::BaseType> response_fragment(
          params.message());
  
  mojo::internal::Serialize<::searchbox::mojom::DriveUploadResponseDataView>(
    in_response,
    response_fragment);

  params->response.Set(
      response_fragment.is_null() ? nullptr : response_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->response.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null response in ");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("OnDriveUploadClicked");
#endif

  message.set_request_id(request_id_);
  message.set_trace_nonce(trace_nonce_);
  ::mojo::internal::SendMojoMessage(*responder_, message);
  // SendMojoMessage() fails silently if the responder connection is closed,
  // or if the message is malformed.
  //
  // TODO(darin): If Accept() returns false due to a malformed message, that
  // may be good reason to close the connection. However, we don't have a
  // way to do that from here. We should add a way.
  responder_ = nullptr;
}
class PageHandler_StartScreenshare_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::StartScreenshareCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_StartScreenshare_ProxyToResponder> proxy(
        new PageHandler_StartScreenshare_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_StartScreenshare_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_StartScreenshare_ProxyToResponder() {
#if DCHECK_IS_ON()
    if (responder_) {
      // If we're being destroyed without being run, we want to ensure the
      // binding endpoint has been closed. This checks for that asynchronously.
      // We pass a bound generated callback to handle the response so that any
      // resulting DCHECK stack will have useful interface type information.
      // Instantiate a ScopedFizzleBlockShutdownTasks to allow this request to
      // fizzle if this happens after shutdown and the endpoint is bound to a
      // BLOCK_SHUTDOWN sequence.
      base::ThreadPoolInstance::ScopedFizzleBlockShutdownTasks fizzler;
      responder_->IsConnectedAsync(base::BindOnce(&OnIsConnectedComplete));
    }
#endif
  }

 private:
  PageHandler_StartScreenshare_ProxyToResponder(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder)
      : ::mojo::internal::ProxyToResponder(message, std::move(responder)) {
  }

#if DCHECK_IS_ON()
  static void OnIsConnectedComplete(bool connected) {
    DCHECK(!connected)
        << "PageHandler::StartScreenshareCallback was destroyed without "
        << "first either being run or its corresponding binding being closed. "
        << "It is an error to drop response callbacks which still correspond "
        << "to an open interface pipe.";
  }
#endif

  void Run(
      const std::optional<::base::UnguessableToken>& in_token);
};

bool PageHandler_StartScreenshare_ForwardToCallback::Accept(
    mojo::Message* message) {
  DCHECK(message->is_serialized());
  internal::PageHandler_StartScreenshare_ResponseParams_Data* params =
      reinterpret_cast<
          internal::PageHandler_StartScreenshare_ResponseParams_Data*>(
              message->mutable_payload());
  

  // Validation for PageHandler.36
  bool success = true;
  std::optional<::base::UnguessableToken> p_token{};
  PageHandler_StartScreenshare_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadToken(&p_token))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 36, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_token));
  }
  return true;
}

void PageHandler_StartScreenshare_ProxyToResponder::Run(
    const std::optional<::base::UnguessableToken>& in_token) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply searchbox::mojom::PageHandler::StartScreenshare", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("token"), in_token,
                        "<value of type const std::optional<::base::UnguessableToken>&>");
   });
#endif

  const uint32_t kFlags = mojo::Message::kFlagIsResponse |
      ((is_sync_) ? mojo::Message::kFlagIsSync : 0) |
      ((true) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((false) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kStartScreenshare), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_StartScreenshare_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->token)::BaseType> token_fragment(
          params.message());
  
  mojo::internal::Serialize<::mojo_base::mojom::UnguessableTokenDataView>(
    in_token,
    token_fragment);

  params->token.Set(
      token_fragment.is_null() ? nullptr : token_fragment.data());

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("StartScreenshare");
#endif

  message.set_request_id(request_id_);
  message.set_trace_nonce(trace_nonce_);
  ::mojo::internal::SendMojoMessage(*responder_, message);
  // SendMojoMessage() fails silently if the responder connection is closed,
  // or if the message is malformed.
  //
  // TODO(darin): If Accept() returns false due to a malformed message, that
  // may be good reason to close the connection. However, we don't have a
  // way to do that from here. We should add a way.
  responder_ = nullptr;
}
class PageHandler_CaptureRegionScreenshot_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::CaptureRegionScreenshotCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_CaptureRegionScreenshot_ProxyToResponder> proxy(
        new PageHandler_CaptureRegionScreenshot_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_CaptureRegionScreenshot_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_CaptureRegionScreenshot_ProxyToResponder() {
#if DCHECK_IS_ON()
    if (responder_) {
      // If we're being destroyed without being run, we want to ensure the
      // binding endpoint has been closed. This checks for that asynchronously.
      // We pass a bound generated callback to handle the response so that any
      // resulting DCHECK stack will have useful interface type information.
      // Instantiate a ScopedFizzleBlockShutdownTasks to allow this request to
      // fizzle if this happens after shutdown and the endpoint is bound to a
      // BLOCK_SHUTDOWN sequence.
      base::ThreadPoolInstance::ScopedFizzleBlockShutdownTasks fizzler;
      responder_->IsConnectedAsync(base::BindOnce(&OnIsConnectedComplete));
    }
#endif
  }

 private:
  PageHandler_CaptureRegionScreenshot_ProxyToResponder(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder)
      : ::mojo::internal::ProxyToResponder(message, std::move(responder)) {
  }

#if DCHECK_IS_ON()
  static void OnIsConnectedComplete(bool connected) {
    DCHECK(!connected)
        << "PageHandler::CaptureRegionScreenshotCallback was destroyed without "
        << "first either being run or its corresponding binding being closed. "
        << "It is an error to drop response callbacks which still correspond "
        << "to an open interface pipe.";
  }
#endif

  void Run(
      const std::optional<::base::UnguessableToken>& in_token);
};

bool PageHandler_CaptureRegionScreenshot_ForwardToCallback::Accept(
    mojo::Message* message) {
  DCHECK(message->is_serialized());
  internal::PageHandler_CaptureRegionScreenshot_ResponseParams_Data* params =
      reinterpret_cast<
          internal::PageHandler_CaptureRegionScreenshot_ResponseParams_Data*>(
              message->mutable_payload());
  

  // Validation for PageHandler.37
  bool success = true;
  std::optional<::base::UnguessableToken> p_token{};
  PageHandler_CaptureRegionScreenshot_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadToken(&p_token))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 37, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_token));
  }
  return true;
}

void PageHandler_CaptureRegionScreenshot_ProxyToResponder::Run(
    const std::optional<::base::UnguessableToken>& in_token) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply searchbox::mojom::PageHandler::CaptureRegionScreenshot", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("token"), in_token,
                        "<value of type const std::optional<::base::UnguessableToken>&>");
   });
#endif

  const uint32_t kFlags = mojo::Message::kFlagIsResponse |
      ((is_sync_) ? mojo::Message::kFlagIsSync : 0) |
      ((true) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((false) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kCaptureRegionScreenshot), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_CaptureRegionScreenshot_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->token)::BaseType> token_fragment(
          params.message());
  
  mojo::internal::Serialize<::mojo_base::mojom::UnguessableTokenDataView>(
    in_token,
    token_fragment);

  params->token.Set(
      token_fragment.is_null() ? nullptr : token_fragment.data());

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("CaptureRegionScreenshot");
#endif

  message.set_request_id(request_id_);
  message.set_trace_nonce(trace_nonce_);
  ::mojo::internal::SendMojoMessage(*responder_, message);
  // SendMojoMessage() fails silently if the responder connection is closed,
  // or if the message is malformed.
  //
  // TODO(darin): If Accept() returns false due to a malformed message, that
  // may be good reason to close the connection. However, we don't have a
  // way to do that from here. We should add a way.
  responder_ = nullptr;
}
class PageHandler_GetPageClassification_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::GetPageClassificationCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_GetPageClassification_ProxyToResponder> proxy(
        new PageHandler_GetPageClassification_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_GetPageClassification_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_GetPageClassification_ProxyToResponder() {
#if DCHECK_IS_ON()
    if (responder_) {
      // If we're being destroyed without being run, we want to ensure the
      // binding endpoint has been closed. This checks for that asynchronously.
      // We pass a bound generated callback to handle the response so that any
      // resulting DCHECK stack will have useful interface type information.
      // Instantiate a ScopedFizzleBlockShutdownTasks to allow this request to
      // fizzle if this happens after shutdown and the endpoint is bound to a
      // BLOCK_SHUTDOWN sequence.
      base::ThreadPoolInstance::ScopedFizzleBlockShutdownTasks fizzler;
      responder_->IsConnectedAsync(base::BindOnce(&OnIsConnectedComplete));
    }
#endif
  }

 private:
  PageHandler_GetPageClassification_ProxyToResponder(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder)
      : ::mojo::internal::ProxyToResponder(message, std::move(responder)) {
  }

#if DCHECK_IS_ON()
  static void OnIsConnectedComplete(bool connected) {
    DCHECK(!connected)
        << "PageHandler::GetPageClassificationCallback was destroyed without "
        << "first either being run or its corresponding binding being closed. "
        << "It is an error to drop response callbacks which still correspond "
        << "to an open interface pipe.";
  }
#endif

  void Run(
      const std::string& in_metricSource);
};

bool PageHandler_GetPageClassification_ForwardToCallback::Accept(
    mojo::Message* message) {
  DCHECK(message->is_serialized());
  internal::PageHandler_GetPageClassification_ResponseParams_Data* params =
      reinterpret_cast<
          internal::PageHandler_GetPageClassification_ResponseParams_Data*>(
              message->mutable_payload());
  

  // Validation for PageHandler.38
  bool success = true;
  std::string p_metricSource{};
  PageHandler_GetPageClassification_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadMetricSource(&p_metricSource))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 38, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_metricSource));
  }
  return true;
}

void PageHandler_GetPageClassification_ProxyToResponder::Run(
    const std::string& in_metricSource) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply searchbox::mojom::PageHandler::GetPageClassification", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("metricSource"), in_metricSource,
                        "<value of type const std::string&>");
   });
#endif

  const uint32_t kFlags = mojo::Message::kFlagIsResponse |
      ((is_sync_) ? mojo::Message::kFlagIsSync : 0) |
      ((true) ? 0 : mojo::Message::kFlagNoInterrupt) |
      ((false) ? mojo::Message::kFlagIsUrgent : 0);

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kGetPageClassification), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::PageHandler_GetPageClassification_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->metricSource)::BaseType> metricSource_fragment(
          params.message());
  
  mojo::internal::Serialize<mojo::StringDataView>(
    in_metricSource,
    metricSource_fragment);

  params->metricSource.Set(
      metricSource_fragment.is_null() ? nullptr : metricSource_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->metricSource.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null metricSource in ");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetPageClassification");
#endif

  message.set_request_id(request_id_);
  message.set_trace_nonce(trace_nonce_);
  ::mojo::internal::SendMojoMessage(*responder_, message);
  // SendMojoMessage() fails silently if the responder connection is closed,
  // or if the message is malformed.
  //
  // TODO(darin): If Accept() returns false due to a malformed message, that
  // may be good reason to close the connection. However, we don't have a
  // way to do that from here. We should add a way.
  responder_ = nullptr;
}

// static
bool PageHandlerStubDispatch::Accept(
    PageHandler* impl,
    mojo::Message* message) {
  switch (static_cast<messages::PageHandler>(message->header()->name)) {
    case messages::PageHandler::kOnFocusChanged: {
      DCHECK(message->is_serialized());
      internal::PageHandler_OnFocusChanged_Params_Data* params =
          reinterpret_cast<internal::PageHandler_OnFocusChanged_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.0
      bool success = true;
      bool p_focused{};
      PageHandler_OnFocusChanged_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_focused = input_data_view.focused();
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 0, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OnFocusChanged(        
        std::move(p_focused));
      return true;
    }
    case messages::PageHandler::kQueryAutocomplete: {
      DCHECK(message->is_serialized());
      internal::PageHandler_QueryAutocomplete_Params_Data* params =
          reinterpret_cast<internal::PageHandler_QueryAutocomplete_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.1
      bool success = true;
      int32_t p_query_id{};
      std::optional<int32_t> p_tab_id{};
      ::std::u16string p_input{};
      bool p_prevent_inline_autocomplete{};
      uint32_t p_cursor_position{};
      ::omnibox::SuggestInventory p_suggest_inventory{};
      bool p_is_on_focus{};
      std::string p_keyword{};
      InputMethod p_input_method{};
      PageHandler_QueryAutocomplete_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_query_id = input_data_view.query_id();
      if (success) {
        p_tab_id = input_data_view.tab_id();
      }
      if (success && !input_data_view.ReadInput(&p_input))
        success = false;
      if (success)
        p_prevent_inline_autocomplete = input_data_view.prevent_inline_autocomplete();
      if (success)
        p_cursor_position = input_data_view.cursor_position();
      if (success && !input_data_view.ReadSuggestInventory(&p_suggest_inventory))
        success = false;
      if (success)
        p_is_on_focus = input_data_view.is_on_focus();
      if (success && !input_data_view.ReadKeyword(&p_keyword))
        success = false;
      if (success && !input_data_view.ReadInputMethod(&p_input_method))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 1, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->QueryAutocomplete(        
        std::move(p_query_id), 
        std::move(p_tab_id), 
        std::move(p_input), 
        std::move(p_prevent_inline_autocomplete), 
        std::move(p_cursor_position), 
        std::move(p_suggest_inventory), 
        std::move(p_is_on_focus), 
        std::move(p_keyword), 
        std::move(p_input_method));
      return true;
    }
    case messages::PageHandler::kStopAutocomplete: {
      DCHECK(message->is_serialized());
      internal::PageHandler_StopAutocomplete_Params_Data* params =
          reinterpret_cast<internal::PageHandler_StopAutocomplete_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.2
      bool success = true;
      bool p_clear_result{};
      PageHandler_StopAutocomplete_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_clear_result = input_data_view.clear_result();
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 2, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->StopAutocomplete(        
        std::move(p_clear_result));
      return true;
    }
    case messages::PageHandler::kOpenAutocompleteMatch: {
      DCHECK(message->is_serialized());
      internal::PageHandler_OpenAutocompleteMatch_Params_Data* params =
          reinterpret_cast<internal::PageHandler_OpenAutocompleteMatch_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.3
      bool success = true;
      uint8_t p_line{};
      ::GURL p_url{};
      bool p_are_matches_showing{};
      uint8_t p_mouse_button{};
      ActionModifiersPtr p_modifiers{};
      bool p_via_keyboard{};
      PageHandler_OpenAutocompleteMatch_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_line = input_data_view.line();
      if (success && !input_data_view.ReadUrl(&p_url))
        success = false;
      if (success)
        p_are_matches_showing = input_data_view.are_matches_showing();
      if (success)
        p_mouse_button = input_data_view.mouse_button();
      if (success && !input_data_view.ReadModifiers(&p_modifiers))
        success = false;
      if (success)
        p_via_keyboard = input_data_view.via_keyboard();
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 3, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OpenAutocompleteMatch(        
        std::move(p_line), 
        std::move(p_url), 
        std::move(p_are_matches_showing), 
        std::move(p_mouse_button), 
        std::move(p_modifiers), 
        std::move(p_via_keyboard));
      return true;
    }
    case messages::PageHandler::kSetSmartComposeStats: {
      DCHECK(message->is_serialized());
      internal::PageHandler_SetSmartComposeStats_Params_Data* params =
          reinterpret_cast<internal::PageHandler_SetSmartComposeStats_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.4
      bool success = true;
      SmartComposeStatsPtr p_smart_compose_stats{};
      PageHandler_SetSmartComposeStats_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadSmartComposeStats(&p_smart_compose_stats))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 4, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->SetSmartComposeStats(        
        std::move(p_smart_compose_stats));
      return true;
    }
    case messages::PageHandler::kSetPopupSelection: {
      DCHECK(message->is_serialized());
      internal::PageHandler_SetPopupSelection_Params_Data* params =
          reinterpret_cast<internal::PageHandler_SetPopupSelection_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.5
      bool success = true;
      OmniboxPopupSelectionPtr p_selection{};
      PageHandler_SetPopupSelection_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadSelection(&p_selection))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 5, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->SetPopupSelection(        
        std::move(p_selection));
      return true;
    }
    case messages::PageHandler::kOpenPopupSelection: {
      DCHECK(message->is_serialized());
      internal::PageHandler_OpenPopupSelection_Params_Data* params =
          reinterpret_cast<internal::PageHandler_OpenPopupSelection_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.6
      bool success = true;
      uint32_t p_result_sequence_id{};
      OmniboxPopupSelectionPtr p_selection{};
      ::WindowOpenDisposition p_disposition{};
      PageHandler_OpenPopupSelection_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_result_sequence_id = input_data_view.result_sequence_id();
      if (success && !input_data_view.ReadSelection(&p_selection))
        success = false;
      if (success && !input_data_view.ReadDisposition(&p_disposition))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 6, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OpenPopupSelection(        
        std::move(p_result_sequence_id), 
        std::move(p_selection), 
        std::move(p_disposition));
      return true;
    }
    case messages::PageHandler::kOnNavigationLikely: {
      DCHECK(message->is_serialized());
      internal::PageHandler_OnNavigationLikely_Params_Data* params =
          reinterpret_cast<internal::PageHandler_OnNavigationLikely_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.7
      bool success = true;
      uint8_t p_line{};
      ::GURL p_url{};
      ::omnibox::mojom::NavigationPredictor p_navigation_predictor{};
      PageHandler_OnNavigationLikely_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_line = input_data_view.line();
      if (success && !input_data_view.ReadUrl(&p_url))
        success = false;
      if (success && !input_data_view.ReadNavigationPredictor(&p_navigation_predictor))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 7, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OnNavigationLikely(        
        std::move(p_line), 
        std::move(p_url), 
        std::move(p_navigation_predictor));
      return true;
    }
    case messages::PageHandler::kDeleteAutocompleteMatch: {
      DCHECK(message->is_serialized());
      internal::PageHandler_DeleteAutocompleteMatch_Params_Data* params =
          reinterpret_cast<internal::PageHandler_DeleteAutocompleteMatch_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.8
      bool success = true;
      uint8_t p_line{};
      ::GURL p_url{};
      PageHandler_DeleteAutocompleteMatch_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_line = input_data_view.line();
      if (success && !input_data_view.ReadUrl(&p_url))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 8, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->DeleteAutocompleteMatch(        
        std::move(p_line), 
        std::move(p_url));
      return true;
    }
    case messages::PageHandler::kActivateKeyword: {
      DCHECK(message->is_serialized());
      internal::PageHandler_ActivateKeyword_Params_Data* params =
          reinterpret_cast<internal::PageHandler_ActivateKeyword_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.9
      bool success = true;
      uint8_t p_line{};
      ::GURL p_url{};
      ::base::TimeTicks p_match_selection_timestamp{};
      bool p_is_mouse_event{};
      PageHandler_ActivateKeyword_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_line = input_data_view.line();
      if (success && !input_data_view.ReadUrl(&p_url))
        success = false;
      if (success && !input_data_view.ReadMatchSelectionTimestamp(&p_match_selection_timestamp))
        success = false;
      if (success)
        p_is_mouse_event = input_data_view.is_mouse_event();
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 9, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->ActivateKeyword(        
        std::move(p_line), 
        std::move(p_url), 
        std::move(p_match_selection_timestamp), 
        std::move(p_is_mouse_event));
      return true;
    }
    case messages::PageHandler::kExecuteAction: {
      DCHECK(message->is_serialized());
      internal::PageHandler_ExecuteAction_Params_Data* params =
          reinterpret_cast<internal::PageHandler_ExecuteAction_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.10
      bool success = true;
      uint8_t p_line{};
      uint8_t p_action_index{};
      ::GURL p_url{};
      ::base::TimeTicks p_match_selection_timestamp{};
      uint8_t p_mouse_button{};
      bool p_alt_key{};
      bool p_ctrl_key{};
      bool p_meta_key{};
      bool p_shift_key{};
      PageHandler_ExecuteAction_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_line = input_data_view.line();
      if (success)
        p_action_index = input_data_view.action_index();
      if (success && !input_data_view.ReadUrl(&p_url))
        success = false;
      if (success && !input_data_view.ReadMatchSelectionTimestamp(&p_match_selection_timestamp))
        success = false;
      if (success)
        p_mouse_button = input_data_view.mouse_button();
      if (success)
        p_alt_key = input_data_view.alt_key();
      if (success)
        p_ctrl_key = input_data_view.ctrl_key();
      if (success)
        p_meta_key = input_data_view.meta_key();
      if (success)
        p_shift_key = input_data_view.shift_key();
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 10, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->ExecuteAction(        
        std::move(p_line), 
        std::move(p_action_index), 
        std::move(p_url), 
        std::move(p_match_selection_timestamp), 
        std::move(p_mouse_button), 
        std::move(p_alt_key), 
        std::move(p_ctrl_key), 
        std::move(p_meta_key), 
        std::move(p_shift_key));
      return true;
    }
    case messages::PageHandler::kOnThumbnailRemoved: {
      DCHECK(message->is_serialized());
      internal::PageHandler_OnThumbnailRemoved_Params_Data* params =
          reinterpret_cast<internal::PageHandler_OnThumbnailRemoved_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.11
      bool success = true;
      PageHandler_OnThumbnailRemoved_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 11, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OnThumbnailRemoved(        );
      return true;
    }
    case messages::PageHandler::kGetCyclingPlaceholderConfig: {
      break;
    }
    case messages::PageHandler::kGetRecentTabs: {
      break;
    }
    case messages::PageHandler::kGetTabPreview: {
      break;
    }
    case messages::PageHandler::kWaitForTabFaviconLoad: {
      break;
    }
    case messages::PageHandler::kGetInputState: {
      break;
    }
    case messages::PageHandler::kNotifySessionStarted: {
      DCHECK(message->is_serialized());
      internal::PageHandler_NotifySessionStarted_Params_Data* params =
          reinterpret_cast<internal::PageHandler_NotifySessionStarted_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.17
      bool success = true;
      PageHandler_NotifySessionStarted_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 17, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->NotifySessionStarted(        );
      return true;
    }
    case messages::PageHandler::kNotifySessionAbandoned: {
      DCHECK(message->is_serialized());
      internal::PageHandler_NotifySessionAbandoned_Params_Data* params =
          reinterpret_cast<internal::PageHandler_NotifySessionAbandoned_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.18
      bool success = true;
      PageHandler_NotifySessionAbandoned_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 18, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->NotifySessionAbandoned(        );
      return true;
    }
    case messages::PageHandler::kAddFileContext: {
      break;
    }
    case messages::PageHandler::kAddTabContext: {
      break;
    }
    case messages::PageHandler::kDeleteContext: {
      DCHECK(message->is_serialized());
      internal::PageHandler_DeleteContext_Params_Data* params =
          reinterpret_cast<internal::PageHandler_DeleteContext_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.21
      bool success = true;
      ::base::UnguessableToken p_token{};
      bool p_from_automatic_chip{};
      PageHandler_DeleteContext_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadToken(&p_token))
        success = false;
      if (success)
        p_from_automatic_chip = input_data_view.from_automatic_chip();
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 21, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->DeleteContext(        
        std::move(p_token), 
        std::move(p_from_automatic_chip));
      return true;
    }
    case messages::PageHandler::kDeleteTabContext: {
      DCHECK(message->is_serialized());
      internal::PageHandler_DeleteTabContext_Params_Data* params =
          reinterpret_cast<internal::PageHandler_DeleteTabContext_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.22
      bool success = true;
      int32_t p_tab_id{};
      PageHandler_DeleteTabContext_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_tab_id = input_data_view.tab_id();
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 22, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->DeleteTabContext(        
        std::move(p_tab_id));
      return true;
    }
    case messages::PageHandler::kClearFiles: {
      DCHECK(message->is_serialized());
      internal::PageHandler_ClearFiles_Params_Data* params =
          reinterpret_cast<internal::PageHandler_ClearFiles_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.23
      bool success = true;
      bool p_should_block_auto_suggested_tabs{};
      PageHandler_ClearFiles_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_should_block_auto_suggested_tabs = input_data_view.should_block_auto_suggested_tabs();
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 23, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->ClearFiles(        
        std::move(p_should_block_auto_suggested_tabs));
      return true;
    }
    case messages::PageHandler::kSubmitQuery: {
      DCHECK(message->is_serialized());
      internal::PageHandler_SubmitQuery_Params_Data* params =
          reinterpret_cast<internal::PageHandler_SubmitQuery_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.24
      bool success = true;
      std::string p_query_text{};
      uint8_t p_mouse_button{};
      bool p_alt_key{};
      bool p_ctrl_key{};
      bool p_meta_key{};
      bool p_shift_key{};
      bool p_is_voice_search{};
      PageHandler_SubmitQuery_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadQueryText(&p_query_text))
        success = false;
      if (success)
        p_mouse_button = input_data_view.mouse_button();
      if (success)
        p_alt_key = input_data_view.alt_key();
      if (success)
        p_ctrl_key = input_data_view.ctrl_key();
      if (success)
        p_meta_key = input_data_view.meta_key();
      if (success)
        p_shift_key = input_data_view.shift_key();
      if (success)
        p_is_voice_search = input_data_view.is_voice_search();
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 24, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->SubmitQuery(        
        std::move(p_query_text), 
        std::move(p_mouse_button), 
        std::move(p_alt_key), 
        std::move(p_ctrl_key), 
        std::move(p_meta_key), 
        std::move(p_shift_key), 
        std::move(p_is_voice_search));
      return true;
    }
    case messages::PageHandler::kOpenLensSearch: {
      DCHECK(message->is_serialized());
      internal::PageHandler_OpenLensSearch_Params_Data* params =
          reinterpret_cast<internal::PageHandler_OpenLensSearch_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.25
      bool success = true;
      PageHandler_OpenLensSearch_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 25, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OpenLensSearch(        );
      return true;
    }
    case messages::PageHandler::kSetActiveToolMode: {
      DCHECK(message->is_serialized());
      internal::PageHandler_SetActiveToolMode_Params_Data* params =
          reinterpret_cast<internal::PageHandler_SetActiveToolMode_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.26
      bool success = true;
      ::omnibox::ToolMode p_tool{};
      bool p_is_set_by_aim{};
      PageHandler_SetActiveToolMode_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadTool(&p_tool))
        success = false;
      if (success)
        p_is_set_by_aim = input_data_view.is_set_by_aim();
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 26, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->SetActiveToolMode(        
        std::move(p_tool), 
        std::move(p_is_set_by_aim));
      return true;
    }
    case messages::PageHandler::kSetActiveModelMode: {
      DCHECK(message->is_serialized());
      internal::PageHandler_SetActiveModelMode_Params_Data* params =
          reinterpret_cast<internal::PageHandler_SetActiveModelMode_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.27
      bool success = true;
      ::omnibox::ModelMode p_model{};
      bool p_is_set_by_aim{};
      PageHandler_SetActiveModelMode_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadModel(&p_model))
        success = false;
      if (success)
        p_is_set_by_aim = input_data_view.is_set_by_aim();
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 27, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->SetActiveModelMode(        
        std::move(p_model), 
        std::move(p_is_set_by_aim));
      return true;
    }
    case messages::PageHandler::kActivateMetricsFunnel: {
      DCHECK(message->is_serialized());
      internal::PageHandler_ActivateMetricsFunnel_Params_Data* params =
          reinterpret_cast<internal::PageHandler_ActivateMetricsFunnel_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.28
      bool success = true;
      std::string p_funnel_name{};
      PageHandler_ActivateMetricsFunnel_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadFunnelName(&p_funnel_name))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 28, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->ActivateMetricsFunnel(        
        std::move(p_funnel_name));
      return true;
    }
    case messages::PageHandler::kRecordToolSelectionAction: {
      DCHECK(message->is_serialized());
      internal::PageHandler_RecordToolSelectionAction_Params_Data* params =
          reinterpret_cast<internal::PageHandler_RecordToolSelectionAction_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.29
      bool success = true;
      ::omnibox::ToolMode p_tool{};
      PageHandler_RecordToolSelectionAction_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadTool(&p_tool))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 29, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->RecordToolSelectionAction(        
        std::move(p_tool));
      return true;
    }
    case messages::PageHandler::kRecordModelSelectionAction: {
      DCHECK(message->is_serialized());
      internal::PageHandler_RecordModelSelectionAction_Params_Data* params =
          reinterpret_cast<internal::PageHandler_RecordModelSelectionAction_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.30
      bool success = true;
      ::omnibox::ModelMode p_model{};
      PageHandler_RecordModelSelectionAction_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadModel(&p_model))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 30, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->RecordModelSelectionAction(        
        std::move(p_model));
      return true;
    }
    case messages::PageHandler::kGetDriveDisclaimerStatus: {
      break;
    }
    case messages::PageHandler::kOnDriveDisclaimerAccepted: {
      DCHECK(message->is_serialized());
      internal::PageHandler_OnDriveDisclaimerAccepted_Params_Data* params =
          reinterpret_cast<internal::PageHandler_OnDriveDisclaimerAccepted_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.32
      bool success = true;
      PageHandler_OnDriveDisclaimerAccepted_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 32, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OnDriveDisclaimerAccepted(        );
      return true;
    }
    case messages::PageHandler::kOnDriveUploadClicked: {
      break;
    }
    case messages::PageHandler::kOpenProfilePicker: {
      DCHECK(message->is_serialized());
      internal::PageHandler_OpenProfilePicker_Params_Data* params =
          reinterpret_cast<internal::PageHandler_OpenProfilePicker_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.34
      bool success = true;
      PageHandler_OpenProfilePicker_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 34, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OpenProfilePicker(        );
      return true;
    }
    case messages::PageHandler::kShowScreenshotMenu: {
      DCHECK(message->is_serialized());
      internal::PageHandler_ShowScreenshotMenu_Params_Data* params =
          reinterpret_cast<internal::PageHandler_ShowScreenshotMenu_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.35
      bool success = true;
      ::gfx::Rect p_anchor_rect{};
      PageHandler_ShowScreenshotMenu_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadAnchorRect(&p_anchor_rect))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 35, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->ShowScreenshotMenu(        
        std::move(p_anchor_rect));
      return true;
    }
    case messages::PageHandler::kStartScreenshare: {
      break;
    }
    case messages::PageHandler::kCaptureRegionScreenshot: {
      break;
    }
    case messages::PageHandler::kGetPageClassification: {
      break;
    }
  }
  return false;
}

// static
bool PageHandlerStubDispatch::AcceptWithResponder(
    PageHandler* 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::PageHandler>(message->header()->name)) {
    case messages::PageHandler::kOnFocusChanged: {
      break;
    }
    case messages::PageHandler::kQueryAutocomplete: {
      break;
    }
    case messages::PageHandler::kStopAutocomplete: {
      break;
    }
    case messages::PageHandler::kOpenAutocompleteMatch: {
      break;
    }
    case messages::PageHandler::kSetSmartComposeStats: {
      break;
    }
    case messages::PageHandler::kSetPopupSelection: {
      break;
    }
    case messages::PageHandler::kOpenPopupSelection: {
      break;
    }
    case messages::PageHandler::kOnNavigationLikely: {
      break;
    }
    case messages::PageHandler::kDeleteAutocompleteMatch: {
      break;
    }
    case messages::PageHandler::kActivateKeyword: {
      break;
    }
    case messages::PageHandler::kExecuteAction: {
      break;
    }
    case messages::PageHandler::kOnThumbnailRemoved: {
      break;
    }
    case messages::PageHandler::kGetCyclingPlaceholderConfig: {
      internal::PageHandler_GetCyclingPlaceholderConfig_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_GetCyclingPlaceholderConfig_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.12
      bool success = true;
      PageHandler_GetCyclingPlaceholderConfig_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 12, false);
        return false;
      }
      auto callback =
          PageHandler_GetCyclingPlaceholderConfig_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->GetCyclingPlaceholderConfig(std::move(callback));
      return true;
    }
    case messages::PageHandler::kGetRecentTabs: {
      internal::PageHandler_GetRecentTabs_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_GetRecentTabs_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.13
      bool success = true;
      PageHandler_GetRecentTabs_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 13, false);
        return false;
      }
      auto callback =
          PageHandler_GetRecentTabs_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->GetRecentTabs(std::move(callback));
      return true;
    }
    case messages::PageHandler::kGetTabPreview: {
      internal::PageHandler_GetTabPreview_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_GetTabPreview_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.14
      bool success = true;
      int32_t p_tab_id{};
      PageHandler_GetTabPreview_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_tab_id = input_data_view.tab_id();
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 14, false);
        return false;
      }
      auto callback =
          PageHandler_GetTabPreview_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->GetTabPreview(        
        std::move(p_tab_id), std::move(callback));
      return true;
    }
    case messages::PageHandler::kWaitForTabFaviconLoad: {
      internal::PageHandler_WaitForTabFaviconLoad_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_WaitForTabFaviconLoad_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.15
      bool success = true;
      int32_t p_tab_id{};
      PageHandler_WaitForTabFaviconLoad_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_tab_id = input_data_view.tab_id();
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 15, false);
        return false;
      }
      auto callback =
          PageHandler_WaitForTabFaviconLoad_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->WaitForTabFaviconLoad(        
        std::move(p_tab_id), std::move(callback));
      return true;
    }
    case messages::PageHandler::kGetInputState: {
      internal::PageHandler_GetInputState_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_GetInputState_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.16
      bool success = true;
      PageHandler_GetInputState_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 16, false);
        return false;
      }
      auto callback =
          PageHandler_GetInputState_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->GetInputState(std::move(callback));
      return true;
    }
    case messages::PageHandler::kNotifySessionStarted: {
      break;
    }
    case messages::PageHandler::kNotifySessionAbandoned: {
      break;
    }
    case messages::PageHandler::kAddFileContext: {
      internal::PageHandler_AddFileContext_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_AddFileContext_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.19
      bool success = true;
      SelectedFileInfoPtr p_file_info{};
      ::mojo_base::BigBuffer p_file_bytes{};
      PageHandler_AddFileContext_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadFileInfo(&p_file_info))
        success = false;
      if (success && !input_data_view.ReadFileBytes(&p_file_bytes))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 19, false);
        return false;
      }
      auto callback =
          PageHandler_AddFileContext_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->AddFileContext(        
        std::move(p_file_info), 
        std::move(p_file_bytes), std::move(callback));
      return true;
    }
    case messages::PageHandler::kAddTabContext: {
      internal::PageHandler_AddTabContext_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_AddTabContext_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.20
      bool success = true;
      int32_t p_tab_id{};
      bool p_delay_upload{};
      TabAttachmentSource p_source{};
      PageHandler_AddTabContext_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_tab_id = input_data_view.tab_id();
      if (success)
        p_delay_upload = input_data_view.delay_upload();
      if (success && !input_data_view.ReadSource(&p_source))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 20, false);
        return false;
      }
      auto callback =
          PageHandler_AddTabContext_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->AddTabContext(        
        std::move(p_tab_id), 
        std::move(p_delay_upload), 
        std::move(p_source), std::move(callback));
      return true;
    }
    case messages::PageHandler::kDeleteContext: {
      break;
    }
    case messages::PageHandler::kDeleteTabContext: {
      break;
    }
    case messages::PageHandler::kClearFiles: {
      break;
    }
    case messages::PageHandler::kSubmitQuery: {
      break;
    }
    case messages::PageHandler::kOpenLensSearch: {
      break;
    }
    case messages::PageHandler::kSetActiveToolMode: {
      break;
    }
    case messages::PageHandler::kSetActiveModelMode: {
      break;
    }
    case messages::PageHandler::kActivateMetricsFunnel: {
      break;
    }
    case messages::PageHandler::kRecordToolSelectionAction: {
      break;
    }
    case messages::PageHandler::kRecordModelSelectionAction: {
      break;
    }
    case messages::PageHandler::kGetDriveDisclaimerStatus: {
      internal::PageHandler_GetDriveDisclaimerStatus_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_GetDriveDisclaimerStatus_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.31
      bool success = true;
      PageHandler_GetDriveDisclaimerStatus_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 31, false);
        return false;
      }
      auto callback =
          PageHandler_GetDriveDisclaimerStatus_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->GetDriveDisclaimerStatus(std::move(callback));
      return true;
    }
    case messages::PageHandler::kOnDriveDisclaimerAccepted: {
      break;
    }
    case messages::PageHandler::kOnDriveUploadClicked: {
      internal::PageHandler_OnDriveUploadClicked_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_OnDriveUploadClicked_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.33
      bool success = true;
      PageHandler_OnDriveUploadClicked_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 33, false);
        return false;
      }
      auto callback =
          PageHandler_OnDriveUploadClicked_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OnDriveUploadClicked(std::move(callback));
      return true;
    }
    case messages::PageHandler::kOpenProfilePicker: {
      break;
    }
    case messages::PageHandler::kShowScreenshotMenu: {
      break;
    }
    case messages::PageHandler::kStartScreenshare: {
      internal::PageHandler_StartScreenshare_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_StartScreenshare_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.36
      bool success = true;
      bool p_prefer_entire_screen{};
      PageHandler_StartScreenshare_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_prefer_entire_screen = input_data_view.prefer_entire_screen();
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 36, false);
        return false;
      }
      auto callback =
          PageHandler_StartScreenshare_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->StartScreenshare(        
        std::move(p_prefer_entire_screen), std::move(callback));
      return true;
    }
    case messages::PageHandler::kCaptureRegionScreenshot: {
      internal::PageHandler_CaptureRegionScreenshot_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_CaptureRegionScreenshot_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.37
      bool success = true;
      PageHandler_CaptureRegionScreenshot_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 37, false);
        return false;
      }
      auto callback =
          PageHandler_CaptureRegionScreenshot_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->CaptureRegionScreenshot(std::move(callback));
      return true;
    }
    case messages::PageHandler::kGetPageClassification: {
      internal::PageHandler_GetPageClassification_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_GetPageClassification_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.38
      bool success = true;
      PageHandler_GetPageClassification_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 38, false);
        return false;
      }
      auto callback =
          PageHandler_GetPageClassification_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->GetPageClassification(std::move(callback));
      return true;
    }
  }
  return false;
}
namespace {
}  // namespace
static const mojo::internal::GenericValidationInfo kPageHandlerValidationInfo[] = {
    { &internal::PageHandler_OnFocusChanged_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_QueryAutocomplete_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_StopAutocomplete_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_OpenAutocompleteMatch_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_SetSmartComposeStats_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_SetPopupSelection_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_OpenPopupSelection_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_OnNavigationLikely_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_DeleteAutocompleteMatch_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_ActivateKeyword_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_ExecuteAction_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_OnThumbnailRemoved_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_GetCyclingPlaceholderConfig_Params_Data::Validate,
     &internal::PageHandler_GetCyclingPlaceholderConfig_ResponseParams_Data::Validate},
    { &internal::PageHandler_GetRecentTabs_Params_Data::Validate,
     &internal::PageHandler_GetRecentTabs_ResponseParams_Data::Validate},
    { &internal::PageHandler_GetTabPreview_Params_Data::Validate,
     &internal::PageHandler_GetTabPreview_ResponseParams_Data::Validate},
    { &internal::PageHandler_WaitForTabFaviconLoad_Params_Data::Validate,
     &internal::PageHandler_WaitForTabFaviconLoad_ResponseParams_Data::Validate},
    { &internal::PageHandler_GetInputState_Params_Data::Validate,
     &internal::PageHandler_GetInputState_ResponseParams_Data::Validate},
    { &internal::PageHandler_NotifySessionStarted_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_NotifySessionAbandoned_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_AddFileContext_Params_Data::Validate,
     &internal::PageHandler_AddFileContext_ResponseParams_Data::Validate},
    { &internal::PageHandler_AddTabContext_Params_Data::Validate,
     &internal::PageHandler_AddTabContext_ResponseParams_Data::Validate},
    { &internal::PageHandler_DeleteContext_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_DeleteTabContext_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_ClearFiles_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_SubmitQuery_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_OpenLensSearch_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_SetActiveToolMode_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_SetActiveModelMode_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_ActivateMetricsFunnel_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_RecordToolSelectionAction_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_RecordModelSelectionAction_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_GetDriveDisclaimerStatus_Params_Data::Validate,
     &internal::PageHandler_GetDriveDisclaimerStatus_ResponseParams_Data::Validate},
    { &internal::PageHandler_OnDriveDisclaimerAccepted_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_OnDriveUploadClicked_Params_Data::Validate,
     &internal::PageHandler_OnDriveUploadClicked_ResponseParams_Data::Validate},
    { &internal::PageHandler_OpenProfilePicker_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_ShowScreenshotMenu_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_StartScreenshare_Params_Data::Validate,
     &internal::PageHandler_StartScreenshare_ResponseParams_Data::Validate},
    { &internal::PageHandler_CaptureRegionScreenshot_Params_Data::Validate,
     &internal::PageHandler_CaptureRegionScreenshot_ResponseParams_Data::Validate},
    { &internal::PageHandler_GetPageClassification_Params_Data::Validate,
     &internal::PageHandler_GetPageClassification_ResponseParams_Data::Validate},
};

bool PageHandlerRequestValidator::Accept(mojo::Message* message) {
  return mojo::internal::ValidateRequestGenericPacked(
    message,
    ::searchbox::mojom::PageHandler::Name_,
    kPageHandlerValidationInfo);
}

bool PageHandlerResponseValidator::Accept(mojo::Message* message) {
  return mojo::internal::ValidateResponseGenericPacked(
    message,
    ::searchbox::mojom::PageHandler::Name_,
    kPageHandlerValidationInfo);
}
// The declaration includes the definition on other builds.

Page::IPCStableHashFunction Page::MessageToMethodInfo_(mojo::Message& message) {
#if !BUILDFLAG(IS_FUCHSIA)
  switch (static_cast<messages::Page>(message.name())) {
    case messages::Page::kAutocompleteResultChanged: {
      return &Page::AutocompleteResultChanged_Sym::IPCStableHash;
    }
    case messages::Page::kUpdateSelection: {
      return &Page::UpdateSelection_Sym::IPCStableHash;
    }
    case messages::Page::kStepSelection: {
      return &Page::StepSelection_Sym::IPCStableHash;
    }
    case messages::Page::kOpenCurrentSelection: {
      return &Page::OpenCurrentSelection_Sym::IPCStableHash;
    }
    case messages::Page::kSetAimButtonVisible: {
      return &Page::SetAimButtonVisible_Sym::IPCStableHash;
    }
    case messages::Page::kSetAimButtonConfig: {
      return &Page::SetAimButtonConfig_Sym::IPCStableHash;
    }
    case messages::Page::kSetInputText: {
      return &Page::SetInputText_Sym::IPCStableHash;
    }
    case messages::Page::kSetThumbnail: {
      return &Page::SetThumbnail_Sym::IPCStableHash;
    }
    case messages::Page::kOnContextualInputStatusChanged: {
      return &Page::OnContextualInputStatusChanged_Sym::IPCStableHash;
    }
    case messages::Page::kOnTabStripChanged: {
      return &Page::OnTabStripChanged_Sym::IPCStableHash;
    }
    case messages::Page::kOnInputStateChanged: {
      return &Page::OnInputStateChanged_Sym::IPCStableHash;
    }
    case messages::Page::kAddFileContext: {
      return &Page::AddFileContext_Sym::IPCStableHash;
    }
    case messages::Page::kUpdateAutoSuggestedTabContext: {
      return &Page::UpdateAutoSuggestedTabContext_Sym::IPCStableHash;
    }
    case messages::Page::kUpdateLensSearchEligibility: {
      return &Page::UpdateLensSearchEligibility_Sym::IPCStableHash;
    }
    case messages::Page::kUpdateContentSharingPolicy: {
      return &Page::UpdateContentSharingPolicy_Sym::IPCStableHash;
    }
    case messages::Page::kUpdateAimPopupEligibility: {
      return &Page::UpdateAimPopupEligibility_Sym::IPCStableHash;
    }
    case messages::Page::kOnPermissionPromptChanged: {
      return &Page::OnPermissionPromptChanged_Sym::IPCStableHash;
    }
    case messages::Page::kSetRestoredTabIds: {
      return &Page::SetRestoredTabIds_Sym::IPCStableHash;
    }
    case messages::Page::kSetAimThreadRestoredTabs: {
      return &Page::SetAimThreadRestoredTabs_Sym::IPCStableHash;
    }
    case messages::Page::kOnScreenshotMenuClosed: {
      return &Page::OnScreenshotMenuClosed_Sym::IPCStableHash;
    }
  }
#endif  // !BUILDFLAG(IS_FUCHSIA)
  return nullptr;
}


const char* Page::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::Page>(message.name())) {
      case messages::Page::kAutocompleteResultChanged:
            return "Receive searchbox::mojom::Page::AutocompleteResultChanged";
      case messages::Page::kUpdateSelection:
            return "Receive searchbox::mojom::Page::UpdateSelection";
      case messages::Page::kStepSelection:
            return "Receive searchbox::mojom::Page::StepSelection";
      case messages::Page::kOpenCurrentSelection:
            return "Receive searchbox::mojom::Page::OpenCurrentSelection";
      case messages::Page::kSetAimButtonVisible:
            return "Receive searchbox::mojom::Page::SetAimButtonVisible";
      case messages::Page::kSetAimButtonConfig:
            return "Receive searchbox::mojom::Page::SetAimButtonConfig";
      case messages::Page::kSetInputText:
            return "Receive searchbox::mojom::Page::SetInputText";
      case messages::Page::kSetThumbnail:
            return "Receive searchbox::mojom::Page::SetThumbnail";
      case messages::Page::kOnContextualInputStatusChanged:
            return "Receive searchbox::mojom::Page::OnContextualInputStatusChanged";
      case messages::Page::kOnTabStripChanged:
            return "Receive searchbox::mojom::Page::OnTabStripChanged";
      case messages::Page::kOnInputStateChanged:
            return "Receive searchbox::mojom::Page::OnInputStateChanged";
      case messages::Page::kAddFileContext:
            return "Receive searchbox::mojom::Page::AddFileContext";
      case messages::Page::kUpdateAutoSuggestedTabContext:
            return "Receive searchbox::mojom::Page::UpdateAutoSuggestedTabContext";
      case messages::Page::kUpdateLensSearchEligibility:
            return "Receive searchbox::mojom::Page::UpdateLensSearchEligibility";
      case messages::Page::kUpdateContentSharingPolicy:
            return "Receive searchbox::mojom::Page::UpdateContentSharingPolicy";
      case messages::Page::kUpdateAimPopupEligibility:
            return "Receive searchbox::mojom::Page::UpdateAimPopupEligibility";
      case messages::Page::kOnPermissionPromptChanged:
            return "Receive searchbox::mojom::Page::OnPermissionPromptChanged";
      case messages::Page::kSetRestoredTabIds:
            return "Receive searchbox::mojom::Page::SetRestoredTabIds";
      case messages::Page::kSetAimThreadRestoredTabs:
            return "Receive searchbox::mojom::Page::SetAimThreadRestoredTabs";
      case messages::Page::kOnScreenshotMenuClosed:
            return "Receive searchbox::mojom::Page::OnScreenshotMenuClosed";
    }
  } else {
    switch (static_cast<messages::Page>(message.name())) {
      case messages::Page::kAutocompleteResultChanged:
            return "Receive reply searchbox::mojom::Page::AutocompleteResultChanged";
      case messages::Page::kUpdateSelection:
            return "Receive reply searchbox::mojom::Page::UpdateSelection";
      case messages::Page::kStepSelection:
            return "Receive reply searchbox::mojom::Page::StepSelection";
      case messages::Page::kOpenCurrentSelection:
            return "Receive reply searchbox::mojom::Page::OpenCurrentSelection";
      case messages::Page::kSetAimButtonVisible:
            return "Receive reply searchbox::mojom::Page::SetAimButtonVisible";
      case messages::Page::kSetAimButtonConfig:
            return "Receive reply searchbox::mojom::Page::SetAimButtonConfig";
      case messages::Page::kSetInputText:
            return "Receive reply searchbox::mojom::Page::SetInputText";
      case messages::Page::kSetThumbnail:
            return "Receive reply searchbox::mojom::Page::SetThumbnail";
      case messages::Page::kOnContextualInputStatusChanged:
            return "Receive reply searchbox::mojom::Page::OnContextualInputStatusChanged";
      case messages::Page::kOnTabStripChanged:
            return "Receive reply searchbox::mojom::Page::OnTabStripChanged";
      case messages::Page::kOnInputStateChanged:
            return "Receive reply searchbox::mojom::Page::OnInputStateChanged";
      case messages::Page::kAddFileContext:
            return "Receive reply searchbox::mojom::Page::AddFileContext";
      case messages::Page::kUpdateAutoSuggestedTabContext:
            return "Receive reply searchbox::mojom::Page::UpdateAutoSuggestedTabContext";
      case messages::Page::kUpdateLensSearchEligibility:
            return "Receive reply searchbox::mojom::Page::UpdateLensSearchEligibility";
      case messages::Page::kUpdateContentSharingPolicy:
            return "Receive reply searchbox::mojom::Page::UpdateContentSharingPolicy";
      case messages::Page::kUpdateAimPopupEligibility:
            return "Receive reply searchbox::mojom::Page::UpdateAimPopupEligibility";
      case messages::Page::kOnPermissionPromptChanged:
            return "Receive reply searchbox::mojom::Page::OnPermissionPromptChanged";
      case messages::Page::kSetRestoredTabIds:
            return "Receive reply searchbox::mojom::Page::SetRestoredTabIds";
      case messages::Page::kSetAimThreadRestoredTabs:
            return "Receive reply searchbox::mojom::Page::SetAimThreadRestoredTabs";
      case messages::Page::kOnScreenshotMenuClosed:
            return "Receive reply searchbox::mojom::Page::OnScreenshotMenuClosed";
    }
  }
  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 Page::AutocompleteResultChanged_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 = 0x6b5727d3;  // IPCStableHash for searchbox::mojom::Page::AutocompleteResultChanged
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::UpdateSelection_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 = 0x5c7adb12;  // IPCStableHash for searchbox::mojom::Page::UpdateSelection
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::StepSelection_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 = 0x9b6091bb;  // IPCStableHash for searchbox::mojom::Page::StepSelection
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::OpenCurrentSelection_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 = 0x8cae64e9;  // IPCStableHash for searchbox::mojom::Page::OpenCurrentSelection
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::SetAimButtonVisible_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 = 0x4ed2d195;  // IPCStableHash for searchbox::mojom::Page::SetAimButtonVisible
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::SetAimButtonConfig_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 = 0xd4ccebd2;  // IPCStableHash for searchbox::mojom::Page::SetAimButtonConfig
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::SetInputText_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 = 0x4c13d576;  // IPCStableHash for searchbox::mojom::Page::SetInputText
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::SetThumbnail_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 = 0xfe735810;  // IPCStableHash for searchbox::mojom::Page::SetThumbnail
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::OnContextualInputStatusChanged_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 = 0x0e45290a;  // IPCStableHash for searchbox::mojom::Page::OnContextualInputStatusChanged
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::OnTabStripChanged_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 = 0xbb733355;  // IPCStableHash for searchbox::mojom::Page::OnTabStripChanged
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::OnInputStateChanged_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 = 0x722d992c;  // IPCStableHash for searchbox::mojom::Page::OnInputStateChanged
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::AddFileContext_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 = 0x5212bef8;  // IPCStableHash for searchbox::mojom::Page::AddFileContext
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::UpdateAutoSuggestedTabContext_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 = 0xc626d1e9;  // IPCStableHash for searchbox::mojom::Page::UpdateAutoSuggestedTabContext
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::UpdateLensSearchEligibility_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 = 0x8dc555ae;  // IPCStableHash for searchbox::mojom::Page::UpdateLensSearchEligibility
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::UpdateContentSharingPolicy_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 = 0xefeecd7f;  // IPCStableHash for searchbox::mojom::Page::UpdateContentSharingPolicy
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::UpdateAimPopupEligibility_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 = 0xd5e40709;  // IPCStableHash for searchbox::mojom::Page::UpdateAimPopupEligibility
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::OnPermissionPromptChanged_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 = 0xd56a23b8;  // IPCStableHash for searchbox::mojom::Page::OnPermissionPromptChanged
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::SetRestoredTabIds_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 = 0x0af8d0a1;  // IPCStableHash for searchbox::mojom::Page::SetRestoredTabIds
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::SetAimThreadRestoredTabs_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 = 0xabc4c9cd;  // IPCStableHash for searchbox::mojom::Page::SetAimThreadRestoredTabs
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::OnScreenshotMenuClosed_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 = 0x1c1d38e9;  // IPCStableHash for searchbox::mojom::Page::OnScreenshotMenuClosed
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
# endif // !BUILDFLAG(IS_FUCHSIA)

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

void PageProxy::AutocompleteResultChanged(
    AutocompleteResultPtr in_result) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::Page::AutocompleteResultChanged", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("result"), in_result,
                        "<value of type AutocompleteResultPtr>");
   });
#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::Page::kAutocompleteResultChanged), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::Page_AutocompleteResultChanged_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->result)::BaseType> result_fragment(
          params.message());
  
  mojo::internal::Serialize<::searchbox::mojom::AutocompleteResultDataView>(
    in_result,
    result_fragment);

  params->result.Set(
      result_fragment.is_null() ? nullptr : result_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->result.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null result in Page.AutocompleteResultChanged request");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("AutocompleteResultChanged");
#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);
}

void PageProxy::UpdateSelection(
    OmniboxPopupSelectionPtr in_old_selection, OmniboxPopupSelectionPtr in_selection) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::Page::UpdateSelection", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("old_selection"), in_old_selection,
                        "<value of type OmniboxPopupSelectionPtr>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("selection"), in_selection,
                        "<value of type OmniboxPopupSelectionPtr>");
   });
#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::Page::kUpdateSelection), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::Page_UpdateSelection_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->old_selection)::BaseType> old_selection_fragment(
          params.message());
  
  mojo::internal::Serialize<::searchbox::mojom::OmniboxPopupSelectionDataView>(
    in_old_selection,
    old_selection_fragment);

  params->old_selection.Set(
      old_selection_fragment.is_null() ? nullptr : old_selection_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->old_selection.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null old_selection in Page.UpdateSelection request");
  mojo::internal::MessageFragment<
      typename decltype(params->selection)::BaseType> selection_fragment(
          params.message());
  
  mojo::internal::Serialize<::searchbox::mojom::OmniboxPopupSelectionDataView>(
    in_selection,
    selection_fragment);

  params->selection.Set(
      selection_fragment.is_null() ? nullptr : selection_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->selection.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null selection in Page.UpdateSelection request");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("UpdateSelection");
#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);
}

void PageProxy::StepSelection(
    SelectionDirection in_direction, SelectionStep in_step) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::Page::StepSelection", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("direction"), in_direction,
                        "<value of type SelectionDirection>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("step"), in_step,
                        "<value of type SelectionStep>");
   });
#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::Page::kStepSelection), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::Page_StepSelection_Params_Data> params(
          message);
  params.Allocate();

  
  mojo::internal::Serialize<::searchbox::mojom::SelectionDirection>(
    in_direction,
    &params->direction);

  
  mojo::internal::Serialize<::searchbox::mojom::SelectionStep>(
    in_step,
    &params->step);

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("StepSelection");
#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);
}

void PageProxy::OpenCurrentSelection(
    ::WindowOpenDisposition in_disposition) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::Page::OpenCurrentSelection", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("disposition"), in_disposition,
                        "<value of type ::WindowOpenDisposition>");
   });
#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::Page::kOpenCurrentSelection), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::Page_OpenCurrentSelection_Params_Data> params(
          message);
  params.Allocate();

  
  mojo::internal::Serialize<::ui::mojom::WindowOpenDisposition>(
    in_disposition,
    &params->disposition);

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("OpenCurrentSelection");
#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);
}

void PageProxy::SetAimButtonVisible(
    bool in_visible) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::Page::SetAimButtonVisible", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("visible"), in_visible,
                        "<value of type bool>");
   });
#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::Page::kSetAimButtonVisible), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::Page_SetAimButtonVisible_Params_Data> params(
          message);
  params.Allocate();

  params->visible = in_visible;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("SetAimButtonVisible");
#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);
}

void PageProxy::SetAimButtonConfig(
    const std::string& in_text, const std::string& in_tooltip, const std::string& in_a11y_label, const ::GURL& in_icon_url) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::Page::SetAimButtonConfig", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("text"), in_text,
                        "<value of type const std::string&>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("tooltip"), in_tooltip,
                        "<value of type const std::string&>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("a11y_label"), in_a11y_label,
                        "<value of type const std::string&>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("icon_url"), in_icon_url,
                        "<value of type const ::GURL&>");
   });
#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::Page::kSetAimButtonConfig), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::Page_SetAimButtonConfig_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->text)::BaseType> text_fragment(
          params.message());
  
  mojo::internal::Serialize<mojo::StringDataView>(
    in_text,
    text_fragment);

  params->text.Set(
      text_fragment.is_null() ? nullptr : text_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->text.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null text in Page.SetAimButtonConfig request");
  mojo::internal::MessageFragment<
      typename decltype(params->tooltip)::BaseType> tooltip_fragment(
          params.message());
  
  mojo::internal::Serialize<mojo::StringDataView>(
    in_tooltip,
    tooltip_fragment);

  params->tooltip.Set(
      tooltip_fragment.is_null() ? nullptr : tooltip_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->tooltip.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null tooltip in Page.SetAimButtonConfig request");
  mojo::internal::MessageFragment<
      typename decltype(params->a11y_label)::BaseType> a11y_label_fragment(
          params.message());
  
  mojo::internal::Serialize<mojo::StringDataView>(
    in_a11y_label,
    a11y_label_fragment);

  params->a11y_label.Set(
      a11y_label_fragment.is_null() ? nullptr : a11y_label_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->a11y_label.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null a11y_label in Page.SetAimButtonConfig request");
  mojo::internal::MessageFragment<
      typename decltype(params->icon_url)::BaseType> icon_url_fragment(
          params.message());
  
  mojo::internal::Serialize<::url::mojom::UrlDataView>(
    in_icon_url,
    icon_url_fragment);

  params->icon_url.Set(
      icon_url_fragment.is_null() ? nullptr : icon_url_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->icon_url.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null icon_url in Page.SetAimButtonConfig request");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("SetAimButtonConfig");
#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);
}

void PageProxy::SetInputText(
    const std::string& in_input) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::Page::SetInputText", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("input"), in_input,
                        "<value of type const std::string&>");
   });
#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::Page::kSetInputText), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::Page_SetInputText_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->input)::BaseType> input_fragment(
          params.message());
  
  mojo::internal::Serialize<mojo::StringDataView>(
    in_input,
    input_fragment);

  params->input.Set(
      input_fragment.is_null() ? nullptr : input_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->input.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null input in Page.SetInputText request");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("SetInputText");
#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);
}

void PageProxy::SetThumbnail(
    const std::string& in_thumbnail_url, bool in_is_deletable) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::Page::SetThumbnail", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("thumbnail_url"), in_thumbnail_url,
                        "<value of type const std::string&>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("is_deletable"), in_is_deletable,
                        "<value of type bool>");
   });
#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::Page::kSetThumbnail), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::Page_SetThumbnail_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->thumbnail_url)::BaseType> thumbnail_url_fragment(
          params.message());
  
  mojo::internal::Serialize<mojo::StringDataView>(
    in_thumbnail_url,
    thumbnail_url_fragment);

  params->thumbnail_url.Set(
      thumbnail_url_fragment.is_null() ? nullptr : thumbnail_url_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->thumbnail_url.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null thumbnail_url in Page.SetThumbnail request");

  params->is_deletable = in_is_deletable;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("SetThumbnail");
#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);
}

void PageProxy::OnContextualInputStatusChanged(
    const ::base::UnguessableToken& in_token, ::contextual_search::ContextUploadStatus in_status, std::optional<::contextual_search::ContextUploadErrorType> in_error_type) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::Page::OnContextualInputStatusChanged", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("token"), in_token,
                        "<value of type const ::base::UnguessableToken&>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("status"), in_status,
                        "<value of type ::contextual_search::ContextUploadStatus>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("error_type"), in_error_type,
                        "<value of type std::optional<::contextual_search::ContextUploadErrorType>>");
   });
#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::Page::kOnContextualInputStatusChanged), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::Page_OnContextualInputStatusChanged_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->token)::BaseType> token_fragment(
          params.message());
  
  mojo::internal::Serialize<::mojo_base::mojom::UnguessableTokenDataView>(
    in_token,
    token_fragment);

  params->token.Set(
      token_fragment.is_null() ? nullptr : token_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->token.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null token in Page.OnContextualInputStatusChanged request");

  
  mojo::internal::Serialize<::composebox_query::mojom::ContextUploadStatus>(
    in_status,
    &params->status);
  params->error_type_$flag = in_error_type.has_value();
  if (in_error_type.has_value()) {
    
    mojo::internal::Serialize<::composebox_query::mojom::ContextUploadErrorType>(
      in_error_type.value(),
      &params->error_type_$value);
  } else {
    params->error_type_$value =
        static_cast<int32_t>(::composebox_query::mojom::ContextUploadErrorType::kMinValue);
  }

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("OnContextualInputStatusChanged");
#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);
}

void PageProxy::OnTabStripChanged(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send searchbox::mojom::Page::OnTabStripChanged");
#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::Page::kOnTabStripChanged), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::Page_OnTabStripChanged_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("OnTabStripChanged");
#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);
}

void PageProxy::OnInputStateChanged(
    const ::omnibox::InputState& in_input_state) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::Page::OnInputStateChanged", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("input_state"), in_input_state,
                        "<value of type const ::omnibox::InputState&>");
   });
#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::Page::kOnInputStateChanged), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::Page_OnInputStateChanged_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->input_state)::BaseType> input_state_fragment(
          params.message());
  
  mojo::internal::Serialize<::composebox_query::mojom::InputStateDataView>(
    in_input_state,
    input_state_fragment);

  params->input_state.Set(
      input_state_fragment.is_null() ? nullptr : input_state_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->input_state.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null input_state in Page.OnInputStateChanged request");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("OnInputStateChanged");
#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);
}

void PageProxy::AddFileContext(
    const ::base::UnguessableToken& in_token, SelectedFileInfoPtr in_file_info) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::Page::AddFileContext", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("token"), in_token,
                        "<value of type const ::base::UnguessableToken&>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("file_info"), in_file_info,
                        "<value of type SelectedFileInfoPtr>");
   });
#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::Page::kAddFileContext), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::Page_AddFileContext_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->token)::BaseType> token_fragment(
          params.message());
  
  mojo::internal::Serialize<::mojo_base::mojom::UnguessableTokenDataView>(
    in_token,
    token_fragment);

  params->token.Set(
      token_fragment.is_null() ? nullptr : token_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->token.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null token in Page.AddFileContext request");
  mojo::internal::MessageFragment<
      typename decltype(params->file_info)::BaseType> file_info_fragment(
          params.message());
  
  mojo::internal::Serialize<::searchbox::mojom::SelectedFileInfoDataView>(
    in_file_info,
    file_info_fragment);

  params->file_info.Set(
      file_info_fragment.is_null() ? nullptr : file_info_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->file_info.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null file_info in Page.AddFileContext request");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("AddFileContext");
#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);
}

void PageProxy::UpdateAutoSuggestedTabContext(
    TabInfoPtr in_tab, const std::optional<std::string>& in_invocation_source) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::Page::UpdateAutoSuggestedTabContext", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("tab"), in_tab,
                        "<value of type TabInfoPtr>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("invocation_source"), in_invocation_source,
                        "<value of type const std::optional<std::string>&>");
   });
#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::Page::kUpdateAutoSuggestedTabContext), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::Page_UpdateAutoSuggestedTabContext_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->tab)::BaseType> tab_fragment(
          params.message());
  
  mojo::internal::Serialize<::searchbox::mojom::TabInfoDataView>(
    in_tab,
    tab_fragment);

  params->tab.Set(
      tab_fragment.is_null() ? nullptr : tab_fragment.data());
  mojo::internal::MessageFragment<
      typename decltype(params->invocation_source)::BaseType> invocation_source_fragment(
          params.message());
  
  mojo::internal::Serialize<mojo::StringDataView>(
    in_invocation_source,
    invocation_source_fragment);

  params->invocation_source.Set(
      invocation_source_fragment.is_null() ? nullptr : invocation_source_fragment.data());

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("UpdateAutoSuggestedTabContext");
#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);
}

void PageProxy::UpdateLensSearchEligibility(
    bool in_eligible) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::Page::UpdateLensSearchEligibility", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("eligible"), in_eligible,
                        "<value of type bool>");
   });
#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::Page::kUpdateLensSearchEligibility), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::Page_UpdateLensSearchEligibility_Params_Data> params(
          message);
  params.Allocate();

  params->eligible = in_eligible;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("UpdateLensSearchEligibility");
#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);
}

void PageProxy::UpdateContentSharingPolicy(
    bool in_enabled) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::Page::UpdateContentSharingPolicy", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("enabled"), in_enabled,
                        "<value of type bool>");
   });
#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::Page::kUpdateContentSharingPolicy), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::Page_UpdateContentSharingPolicy_Params_Data> params(
          message);
  params.Allocate();

  params->enabled = in_enabled;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("UpdateContentSharingPolicy");
#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);
}

void PageProxy::UpdateAimPopupEligibility(
    bool in_eligible) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::Page::UpdateAimPopupEligibility", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("eligible"), in_eligible,
                        "<value of type bool>");
   });
#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::Page::kUpdateAimPopupEligibility), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::Page_UpdateAimPopupEligibility_Params_Data> params(
          message);
  params.Allocate();

  params->eligible = in_eligible;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("UpdateAimPopupEligibility");
#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);
}

void PageProxy::OnPermissionPromptChanged(
    bool in_is_showing, const ::gfx::Size& in_prompt_size) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::Page::OnPermissionPromptChanged", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("is_showing"), in_is_showing,
                        "<value of type bool>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("prompt_size"), in_prompt_size,
                        "<value of type const ::gfx::Size&>");
   });
#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::Page::kOnPermissionPromptChanged), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::Page_OnPermissionPromptChanged_Params_Data> params(
          message);
  params.Allocate();

  params->is_showing = in_is_showing;
  mojo::internal::MessageFragment<
      typename decltype(params->prompt_size)::BaseType> prompt_size_fragment(
          params.message());
  
  mojo::internal::Serialize<::gfx::mojom::SizeDataView>(
    in_prompt_size,
    prompt_size_fragment);

  params->prompt_size.Set(
      prompt_size_fragment.is_null() ? nullptr : prompt_size_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->prompt_size.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null prompt_size in Page.OnPermissionPromptChanged request");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("OnPermissionPromptChanged");
#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);
}

void PageProxy::SetRestoredTabIds(
    const std::vector<int32_t>& in_ids) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::Page::SetRestoredTabIds", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("ids"), in_ids,
                        "<value of type const std::vector<int32_t>&>");
   });
#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::Page::kSetRestoredTabIds), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::Page_SetRestoredTabIds_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->ids)::BaseType>
      ids_fragment(params.message());
  constexpr const mojo::internal::ContainerValidateParams& ids_validate_params =
      mojo::internal::GetArrayValidator<0, false, nullptr>();
  
  mojo::internal::Serialize<mojo::ArrayDataView<int32_t>>(
    in_ids,
    ids_fragment,
    &ids_validate_params);

  params->ids.Set(
      ids_fragment.is_null() ? nullptr : ids_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->ids.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null ids in Page.SetRestoredTabIds request");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("SetRestoredTabIds");
#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);
}

void PageProxy::SetAimThreadRestoredTabs(
    std::vector<TabInfoPtr> in_tabs) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send searchbox::mojom::Page::SetAimThreadRestoredTabs", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("tabs"), in_tabs,
                        "<value of type std::vector<TabInfoPtr>>");
   });
#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::Page::kSetAimThreadRestoredTabs), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::Page_SetAimThreadRestoredTabs_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->tabs)::BaseType>
      tabs_fragment(params.message());
  constexpr const mojo::internal::ContainerValidateParams& tabs_validate_params =
      mojo::internal::GetArrayValidator<0, false, nullptr>();
  
  mojo::internal::Serialize<mojo::ArrayDataView<::searchbox::mojom::TabInfoDataView>>(
    in_tabs,
    tabs_fragment,
    &tabs_validate_params);

  params->tabs.Set(
      tabs_fragment.is_null() ? nullptr : tabs_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->tabs.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null tabs in Page.SetAimThreadRestoredTabs request");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("SetAimThreadRestoredTabs");
#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);
}

void PageProxy::OnScreenshotMenuClosed(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send searchbox::mojom::Page::OnScreenshotMenuClosed");
#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::Page::kOnScreenshotMenuClosed), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::searchbox::mojom::internal::Page_OnScreenshotMenuClosed_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("OnScreenshotMenuClosed");
#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 PageStubDispatch::Accept(
    Page* impl,
    mojo::Message* message) {
  switch (static_cast<messages::Page>(message->header()->name)) {
    case messages::Page::kAutocompleteResultChanged: {
      DCHECK(message->is_serialized());
      internal::Page_AutocompleteResultChanged_Params_Data* params =
          reinterpret_cast<internal::Page_AutocompleteResultChanged_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.0
      bool success = true;
      AutocompleteResultPtr p_result{};
      Page_AutocompleteResultChanged_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadResult(&p_result))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            Page::Name_, 0, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->AutocompleteResultChanged(        
        std::move(p_result));
      return true;
    }
    case messages::Page::kUpdateSelection: {
      DCHECK(message->is_serialized());
      internal::Page_UpdateSelection_Params_Data* params =
          reinterpret_cast<internal::Page_UpdateSelection_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.1
      bool success = true;
      OmniboxPopupSelectionPtr p_old_selection{};
      OmniboxPopupSelectionPtr p_selection{};
      Page_UpdateSelection_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadOldSelection(&p_old_selection))
        success = false;
      if (success && !input_data_view.ReadSelection(&p_selection))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            Page::Name_, 1, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->UpdateSelection(        
        std::move(p_old_selection), 
        std::move(p_selection));
      return true;
    }
    case messages::Page::kStepSelection: {
      DCHECK(message->is_serialized());
      internal::Page_StepSelection_Params_Data* params =
          reinterpret_cast<internal::Page_StepSelection_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.2
      bool success = true;
      SelectionDirection p_direction{};
      SelectionStep p_step{};
      Page_StepSelection_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadDirection(&p_direction))
        success = false;
      if (success && !input_data_view.ReadStep(&p_step))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            Page::Name_, 2, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->StepSelection(        
        std::move(p_direction), 
        std::move(p_step));
      return true;
    }
    case messages::Page::kOpenCurrentSelection: {
      DCHECK(message->is_serialized());
      internal::Page_OpenCurrentSelection_Params_Data* params =
          reinterpret_cast<internal::Page_OpenCurrentSelection_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.3
      bool success = true;
      ::WindowOpenDisposition p_disposition{};
      Page_OpenCurrentSelection_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadDisposition(&p_disposition))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            Page::Name_, 3, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OpenCurrentSelection(        
        std::move(p_disposition));
      return true;
    }
    case messages::Page::kSetAimButtonVisible: {
      DCHECK(message->is_serialized());
      internal::Page_SetAimButtonVisible_Params_Data* params =
          reinterpret_cast<internal::Page_SetAimButtonVisible_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.4
      bool success = true;
      bool p_visible{};
      Page_SetAimButtonVisible_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_visible = input_data_view.visible();
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            Page::Name_, 4, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->SetAimButtonVisible(        
        std::move(p_visible));
      return true;
    }
    case messages::Page::kSetAimButtonConfig: {
      DCHECK(message->is_serialized());
      internal::Page_SetAimButtonConfig_Params_Data* params =
          reinterpret_cast<internal::Page_SetAimButtonConfig_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.5
      bool success = true;
      std::string p_text{};
      std::string p_tooltip{};
      std::string p_a11y_label{};
      ::GURL p_icon_url{};
      Page_SetAimButtonConfig_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadText(&p_text))
        success = false;
      if (success && !input_data_view.ReadTooltip(&p_tooltip))
        success = false;
      if (success && !input_data_view.ReadA11yLabel(&p_a11y_label))
        success = false;
      if (success && !input_data_view.ReadIconUrl(&p_icon_url))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            Page::Name_, 5, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->SetAimButtonConfig(        
        std::move(p_text), 
        std::move(p_tooltip), 
        std::move(p_a11y_label), 
        std::move(p_icon_url));
      return true;
    }
    case messages::Page::kSetInputText: {
      DCHECK(message->is_serialized());
      internal::Page_SetInputText_Params_Data* params =
          reinterpret_cast<internal::Page_SetInputText_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.6
      bool success = true;
      std::string p_input{};
      Page_SetInputText_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadInput(&p_input))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            Page::Name_, 6, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->SetInputText(        
        std::move(p_input));
      return true;
    }
    case messages::Page::kSetThumbnail: {
      DCHECK(message->is_serialized());
      internal::Page_SetThumbnail_Params_Data* params =
          reinterpret_cast<internal::Page_SetThumbnail_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.7
      bool success = true;
      std::string p_thumbnail_url{};
      bool p_is_deletable{};
      Page_SetThumbnail_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadThumbnailUrl(&p_thumbnail_url))
        success = false;
      if (success)
        p_is_deletable = input_data_view.is_deletable();
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            Page::Name_, 7, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->SetThumbnail(        
        std::move(p_thumbnail_url), 
        std::move(p_is_deletable));
      return true;
    }
    case messages::Page::kOnContextualInputStatusChanged: {
      DCHECK(message->is_serialized());
      internal::Page_OnContextualInputStatusChanged_Params_Data* params =
          reinterpret_cast<internal::Page_OnContextualInputStatusChanged_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.8
      bool success = true;
      ::base::UnguessableToken p_token{};
      ::contextual_search::ContextUploadStatus p_status{};
      std::optional<::contextual_search::ContextUploadErrorType> p_error_type{};
      Page_OnContextualInputStatusChanged_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadToken(&p_token))
        success = false;
      if (success && !input_data_view.ReadStatus(&p_status))
        success = false;
      if (success && !input_data_view.ReadErrorType(&p_error_type)) {
        success = false;
      }
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            Page::Name_, 8, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OnContextualInputStatusChanged(        
        std::move(p_token), 
        std::move(p_status), 
        std::move(p_error_type));
      return true;
    }
    case messages::Page::kOnTabStripChanged: {
      DCHECK(message->is_serialized());
      internal::Page_OnTabStripChanged_Params_Data* params =
          reinterpret_cast<internal::Page_OnTabStripChanged_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.9
      bool success = true;
      Page_OnTabStripChanged_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            Page::Name_, 9, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OnTabStripChanged(        );
      return true;
    }
    case messages::Page::kOnInputStateChanged: {
      DCHECK(message->is_serialized());
      internal::Page_OnInputStateChanged_Params_Data* params =
          reinterpret_cast<internal::Page_OnInputStateChanged_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.10
      bool success = true;
      ::omnibox::InputState p_input_state{};
      Page_OnInputStateChanged_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadInputState(&p_input_state))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            Page::Name_, 10, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OnInputStateChanged(        
        std::move(p_input_state));
      return true;
    }
    case messages::Page::kAddFileContext: {
      DCHECK(message->is_serialized());
      internal::Page_AddFileContext_Params_Data* params =
          reinterpret_cast<internal::Page_AddFileContext_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.11
      bool success = true;
      ::base::UnguessableToken p_token{};
      SelectedFileInfoPtr p_file_info{};
      Page_AddFileContext_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadToken(&p_token))
        success = false;
      if (success && !input_data_view.ReadFileInfo(&p_file_info))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            Page::Name_, 11, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->AddFileContext(        
        std::move(p_token), 
        std::move(p_file_info));
      return true;
    }
    case messages::Page::kUpdateAutoSuggestedTabContext: {
      DCHECK(message->is_serialized());
      internal::Page_UpdateAutoSuggestedTabContext_Params_Data* params =
          reinterpret_cast<internal::Page_UpdateAutoSuggestedTabContext_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.12
      bool success = true;
      TabInfoPtr p_tab{};
      std::optional<std::string> p_invocation_source{};
      Page_UpdateAutoSuggestedTabContext_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadTab(&p_tab))
        success = false;
      if (success && !input_data_view.ReadInvocationSource(&p_invocation_source))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            Page::Name_, 12, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->UpdateAutoSuggestedTabContext(        
        std::move(p_tab), 
        std::move(p_invocation_source));
      return true;
    }
    case messages::Page::kUpdateLensSearchEligibility: {
      DCHECK(message->is_serialized());
      internal::Page_UpdateLensSearchEligibility_Params_Data* params =
          reinterpret_cast<internal::Page_UpdateLensSearchEligibility_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.13
      bool success = true;
      bool p_eligible{};
      Page_UpdateLensSearchEligibility_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_eligible = input_data_view.eligible();
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            Page::Name_, 13, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->UpdateLensSearchEligibility(        
        std::move(p_eligible));
      return true;
    }
    case messages::Page::kUpdateContentSharingPolicy: {
      DCHECK(message->is_serialized());
      internal::Page_UpdateContentSharingPolicy_Params_Data* params =
          reinterpret_cast<internal::Page_UpdateContentSharingPolicy_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.14
      bool success = true;
      bool p_enabled{};
      Page_UpdateContentSharingPolicy_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_enabled = input_data_view.enabled();
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            Page::Name_, 14, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->UpdateContentSharingPolicy(        
        std::move(p_enabled));
      return true;
    }
    case messages::Page::kUpdateAimPopupEligibility: {
      DCHECK(message->is_serialized());
      internal::Page_UpdateAimPopupEligibility_Params_Data* params =
          reinterpret_cast<internal::Page_UpdateAimPopupEligibility_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.15
      bool success = true;
      bool p_eligible{};
      Page_UpdateAimPopupEligibility_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_eligible = input_data_view.eligible();
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            Page::Name_, 15, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->UpdateAimPopupEligibility(        
        std::move(p_eligible));
      return true;
    }
    case messages::Page::kOnPermissionPromptChanged: {
      DCHECK(message->is_serialized());
      internal::Page_OnPermissionPromptChanged_Params_Data* params =
          reinterpret_cast<internal::Page_OnPermissionPromptChanged_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.16
      bool success = true;
      bool p_is_showing{};
      ::gfx::Size p_prompt_size{};
      Page_OnPermissionPromptChanged_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_is_showing = input_data_view.is_showing();
      if (success && !input_data_view.ReadPromptSize(&p_prompt_size))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            Page::Name_, 16, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OnPermissionPromptChanged(        
        std::move(p_is_showing), 
        std::move(p_prompt_size));
      return true;
    }
    case messages::Page::kSetRestoredTabIds: {
      DCHECK(message->is_serialized());
      internal::Page_SetRestoredTabIds_Params_Data* params =
          reinterpret_cast<internal::Page_SetRestoredTabIds_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.17
      bool success = true;
      std::vector<int32_t> p_ids{};
      Page_SetRestoredTabIds_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadIds(&p_ids))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            Page::Name_, 17, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->SetRestoredTabIds(        
        std::move(p_ids));
      return true;
    }
    case messages::Page::kSetAimThreadRestoredTabs: {
      DCHECK(message->is_serialized());
      internal::Page_SetAimThreadRestoredTabs_Params_Data* params =
          reinterpret_cast<internal::Page_SetAimThreadRestoredTabs_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.18
      bool success = true;
      std::vector<TabInfoPtr> p_tabs{};
      Page_SetAimThreadRestoredTabs_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadTabs(&p_tabs))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            Page::Name_, 18, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->SetAimThreadRestoredTabs(        
        std::move(p_tabs));
      return true;
    }
    case messages::Page::kOnScreenshotMenuClosed: {
      DCHECK(message->is_serialized());
      internal::Page_OnScreenshotMenuClosed_Params_Data* params =
          reinterpret_cast<internal::Page_OnScreenshotMenuClosed_Params_Data*>(
              message->mutable_payload());
      

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

// static
bool PageStubDispatch::AcceptWithResponder(
    Page* 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::Page>(message->header()->name)) {
    case messages::Page::kAutocompleteResultChanged: {
      break;
    }
    case messages::Page::kUpdateSelection: {
      break;
    }
    case messages::Page::kStepSelection: {
      break;
    }
    case messages::Page::kOpenCurrentSelection: {
      break;
    }
    case messages::Page::kSetAimButtonVisible: {
      break;
    }
    case messages::Page::kSetAimButtonConfig: {
      break;
    }
    case messages::Page::kSetInputText: {
      break;
    }
    case messages::Page::kSetThumbnail: {
      break;
    }
    case messages::Page::kOnContextualInputStatusChanged: {
      break;
    }
    case messages::Page::kOnTabStripChanged: {
      break;
    }
    case messages::Page::kOnInputStateChanged: {
      break;
    }
    case messages::Page::kAddFileContext: {
      break;
    }
    case messages::Page::kUpdateAutoSuggestedTabContext: {
      break;
    }
    case messages::Page::kUpdateLensSearchEligibility: {
      break;
    }
    case messages::Page::kUpdateContentSharingPolicy: {
      break;
    }
    case messages::Page::kUpdateAimPopupEligibility: {
      break;
    }
    case messages::Page::kOnPermissionPromptChanged: {
      break;
    }
    case messages::Page::kSetRestoredTabIds: {
      break;
    }
    case messages::Page::kSetAimThreadRestoredTabs: {
      break;
    }
    case messages::Page::kOnScreenshotMenuClosed: {
      break;
    }
  }
  return false;
}
namespace {
}  // namespace
static const mojo::internal::GenericValidationInfo kPageValidationInfo[] = {
    { &internal::Page_AutocompleteResultChanged_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::Page_UpdateSelection_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::Page_StepSelection_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::Page_OpenCurrentSelection_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::Page_SetAimButtonVisible_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::Page_SetAimButtonConfig_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::Page_SetInputText_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::Page_SetThumbnail_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::Page_OnContextualInputStatusChanged_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::Page_OnTabStripChanged_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::Page_OnInputStateChanged_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::Page_AddFileContext_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::Page_UpdateAutoSuggestedTabContext_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::Page_UpdateLensSearchEligibility_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::Page_UpdateContentSharingPolicy_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::Page_UpdateAimPopupEligibility_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::Page_OnPermissionPromptChanged_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::Page_SetRestoredTabIds_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::Page_SetAimThreadRestoredTabs_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::Page_OnScreenshotMenuClosed_Params_Data::Validate,
     nullptr /* no response */},
};

bool PageRequestValidator::Accept(mojo::Message* message) {
  return mojo::internal::ValidateRequestGenericPacked(
    message,
    ::searchbox::mojom::Page::Name_,
    kPageValidationInfo);
}



}  // searchbox::mojom


namespace mojo {


// static
bool StructTraits<::searchbox::mojom::ACMatchClassification::DataView, ::searchbox::mojom::ACMatchClassificationPtr>::Read(
    ::searchbox::mojom::ACMatchClassification::DataView input,
    ::searchbox::mojom::ACMatchClassificationPtr* output) {
  bool success = true;
  ::searchbox::mojom::ACMatchClassificationPtr result(::searchbox::mojom::ACMatchClassification::New());
  
      if (success)
        result->offset = input.offset();
      if (success)
        result->style = input.style();
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::searchbox::mojom::Action::DataView, ::searchbox::mojom::ActionPtr>::Read(
    ::searchbox::mojom::Action::DataView input,
    ::searchbox::mojom::ActionPtr* output) {
  bool success = true;
  ::searchbox::mojom::ActionPtr result(::searchbox::mojom::Action::New());
  
      if (success && !input.ReadHint(&result->hint))
        success = false;
      if (success && !input.ReadSuggestionContents(&result->suggestion_contents))
        success = false;
      if (success && !input.ReadIconPath(&result->icon_path))
        success = false;
      if (success && !input.ReadA11yLabel(&result->a11y_label))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::searchbox::mojom::SuggestionAnswer::DataView, ::searchbox::mojom::SuggestionAnswerPtr>::Read(
    ::searchbox::mojom::SuggestionAnswer::DataView input,
    ::searchbox::mojom::SuggestionAnswerPtr* output) {
  bool success = true;
  ::searchbox::mojom::SuggestionAnswerPtr result(::searchbox::mojom::SuggestionAnswer::New());
  
      if (success && !input.ReadFirstLine(&result->first_line))
        success = false;
      if (success && !input.ReadSecondLine(&result->second_line))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::searchbox::mojom::InputKeywordModel::DataView, ::searchbox::mojom::InputKeywordModelPtr>::Read(
    ::searchbox::mojom::InputKeywordModel::DataView input,
    ::searchbox::mojom::InputKeywordModelPtr* output) {
  bool success = true;
  ::searchbox::mojom::InputKeywordModelPtr result(::searchbox::mojom::InputKeywordModel::New());
  
      if (success && !input.ReadType(&result->type))
        success = false;
      if (success && !input.ReadKeyword(&result->keyword))
        success = false;
      if (success && !input.ReadDisplayText(&result->display_text))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::searchbox::mojom::MatchKeywordModel::DataView, ::searchbox::mojom::MatchKeywordModelPtr>::Read(
    ::searchbox::mojom::MatchKeywordModel::DataView input,
    ::searchbox::mojom::MatchKeywordModelPtr* output) {
  bool success = true;
  ::searchbox::mojom::MatchKeywordModelPtr result(::searchbox::mojom::MatchKeywordModel::New());
  
      if (success && !input.ReadType(&result->type))
        success = false;
      if (success && !input.ReadChipHint(&result->chip_hint))
        success = false;
      if (success && !input.ReadChipA11y(&result->chip_a11y))
        success = false;
      if (success && !input.ReadPlaceholder(&result->placeholder))
        success = false;
      if (success && !input.ReadKeyword(&result->keyword))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::searchbox::mojom::AutocompleteMatch::DataView, ::searchbox::mojom::AutocompleteMatchPtr>::Read(
    ::searchbox::mojom::AutocompleteMatch::DataView input,
    ::searchbox::mojom::AutocompleteMatchPtr* output) {
  bool success = true;
  ::searchbox::mojom::AutocompleteMatchPtr result(::searchbox::mojom::AutocompleteMatch::New());
  
      if (success)
        result->is_hidden = input.is_hidden();
      if (success && !input.ReadA11yLabel(&result->a11y_label))
        success = false;
      if (success)
        result->allowed_to_be_default_match = input.allowed_to_be_default_match();
      if (success && !input.ReadActions(&result->actions))
        success = false;
      if (success && !input.ReadAnswer(&result->answer))
        success = false;
      if (success && !input.ReadContents(&result->contents))
        success = false;
      if (success && !input.ReadContentsClass(&result->contents_class))
        success = false;
      if (success && !input.ReadDescription(&result->description))
        success = false;
      if (success && !input.ReadDescriptionClass(&result->description_class))
        success = false;
      if (success && !input.ReadDestinationUrl(&result->destination_url))
        success = false;
      if (success && !input.ReadInlineAutocompletion(&result->inline_autocompletion))
        success = false;
      if (success && !input.ReadFillIntoEdit(&result->fill_into_edit))
        success = false;
      if (success) {
        result->is_weather_answer_suggestion = input.is_weather_answer_suggestion();
      }
      if (success && !input.ReadIconPath(&result->icon_path))
        success = false;
      if (success && !input.ReadIconUrl(&result->icon_url))
        success = false;
      if (success && !input.ReadImageDominantColor(&result->image_dominant_color))
        success = false;
      if (success && !input.ReadImageUrl(&result->image_url))
        success = false;
      if (success)
        result->is_contextual_suggestion = input.is_contextual_suggestion();
      if (success)
        result->is_noncanned_aim_suggestion = input.is_noncanned_aim_suggestion();
      if (success)
        result->is_rich_suggestion = input.is_rich_suggestion();
      if (success)
        result->is_search_type = input.is_search_type();
      if (success)
        result->is_enterprise_search_aggregator_people_type = input.is_enterprise_search_aggregator_people_type();
      if (success && !input.ReadType(&result->type))
        success = false;
      if (success && !input.ReadRemoveButtonA11yLabel(&result->remove_button_a11y_label))
        success = false;
      if (success)
        result->swap_contents_and_description = input.swap_contents_and_description();
      if (success)
        result->show_contextual_description = input.show_contextual_description();
      if (success)
        result->suggestion_group_id = input.suggestion_group_id();
      if (success)
        result->supports_deletion = input.supports_deletion();
      if (success && !input.ReadTailSuggestCommonPrefix(&result->tail_suggest_common_prefix))
        success = false;
      if (success && !input.ReadKeywordModel(&result->keyword_model))
        success = false;
      if (success && !input.ReadFuseboxAction(&result->fusebox_action))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::searchbox::mojom::TabInfo::DataView, ::searchbox::mojom::TabInfoPtr>::Read(
    ::searchbox::mojom::TabInfo::DataView input,
    ::searchbox::mojom::TabInfoPtr* output) {
  bool success = true;
  ::searchbox::mojom::TabInfoPtr result(::searchbox::mojom::TabInfo::New());
  
      if (success)
        result->tab_id = input.tab_id();
      if (success && !input.ReadTitle(&result->title))
        success = false;
      if (success && !input.ReadUrl(&result->url))
        success = false;
      if (success)
        result->show_in_current_tab_chip = input.show_in_current_tab_chip();
      if (success)
        result->show_in_previous_tab_chip = input.show_in_previous_tab_chip();
      if (success && !input.ReadLastActive(&result->last_active))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::searchbox::mojom::FileAttachment::DataView, ::searchbox::mojom::FileAttachmentPtr>::Read(
    ::searchbox::mojom::FileAttachment::DataView input,
    ::searchbox::mojom::FileAttachmentPtr* output) {
  bool success = true;
  ::searchbox::mojom::FileAttachmentPtr result(::searchbox::mojom::FileAttachment::New());
  
      if (success && !input.ReadUuid(&result->uuid))
        success = false;
      if (success && !input.ReadName(&result->name))
        success = false;
      if (success && !input.ReadMimeType(&result->mime_type))
        success = false;
      if (success && !input.ReadImageDataUrl(&result->image_data_url))
        success = false;
      if (success && !input.ReadErrorType(&result->error_type)) {
        success = false;
      }
      if (success && !input.ReadIconUrl(&result->icon_url))
        success = false;
      if (success && !input.ReadThumbnailUrl(&result->thumbnail_url))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::searchbox::mojom::TabAttachment::DataView, ::searchbox::mojom::TabAttachmentPtr>::Read(
    ::searchbox::mojom::TabAttachment::DataView input,
    ::searchbox::mojom::TabAttachmentPtr* output) {
  bool success = true;
  ::searchbox::mojom::TabAttachmentPtr result(::searchbox::mojom::TabAttachment::New());
  
      if (success)
        result->tab_id = input.tab_id();
      if (success && !input.ReadTitle(&result->title))
        success = false;
      if (success && !input.ReadUrl(&result->url))
        success = false;
      if (success && !input.ReadSource(&result->source))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::searchbox::mojom::SearchContext::DataView, ::searchbox::mojom::SearchContextPtr>::Read(
    ::searchbox::mojom::SearchContext::DataView input,
    ::searchbox::mojom::SearchContextPtr* output) {
  bool success = true;
  ::searchbox::mojom::SearchContextPtr result(::searchbox::mojom::SearchContext::New());
  
      if (success && !input.ReadInput(&result->input))
        success = false;
      if (success && !input.ReadAttachments(&result->attachments))
        success = false;
      if (success && !input.ReadToolMode(&result->tool_mode))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::searchbox::mojom::SelectedFileInfo::DataView, ::searchbox::mojom::SelectedFileInfoPtr>::Read(
    ::searchbox::mojom::SelectedFileInfo::DataView input,
    ::searchbox::mojom::SelectedFileInfoPtr* output) {
  bool success = true;
  ::searchbox::mojom::SelectedFileInfoPtr result(::searchbox::mojom::SelectedFileInfo::New());
  
      if (success && !input.ReadFileName(&result->file_name))
        success = false;
      if (success && !input.ReadMimeType(&result->mime_type))
        success = false;
      if (success && !input.ReadImageDataUrl(&result->image_data_url))
        success = false;
      if (success)
        result->is_deletable = input.is_deletable();
      if (success && !input.ReadSelectionTime(&result->selection_time))
        success = false;
      if (success && !input.ReadThumbnailUrl(&result->thumbnail_url))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::searchbox::mojom::SuggestionGroup::DataView, ::searchbox::mojom::SuggestionGroupPtr>::Read(
    ::searchbox::mojom::SuggestionGroup::DataView input,
    ::searchbox::mojom::SuggestionGroupPtr* output) {
  bool success = true;
  ::searchbox::mojom::SuggestionGroupPtr result(::searchbox::mojom::SuggestionGroup::New());
  
      if (success && !input.ReadHeader(&result->header))
        success = false;
      if (success && !input.ReadRenderType(&result->render_type))
        success = false;
      if (success && !input.ReadSideType(&result->side_type))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::searchbox::mojom::SmartComposeStats::DataView, ::searchbox::mojom::SmartComposeStatsPtr>::Read(
    ::searchbox::mojom::SmartComposeStats::DataView input,
    ::searchbox::mojom::SmartComposeStatsPtr* output) {
  bool success = true;
  ::searchbox::mojom::SmartComposeStatsPtr result(::searchbox::mojom::SmartComposeStats::New());
  
      if (success)
        result->enabled = input.enabled();
      if (success)
        result->shown_count = input.shown_count();
      if (success)
        result->accepted_count = input.accepted_count();
      if (success)
        result->characters_accepted = input.characters_accepted();
      if (success)
        result->shown_length = input.shown_length();
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::searchbox::mojom::AutocompleteResult::DataView, ::searchbox::mojom::AutocompleteResultPtr>::Read(
    ::searchbox::mojom::AutocompleteResult::DataView input,
    ::searchbox::mojom::AutocompleteResultPtr* output) {
  bool success = true;
  ::searchbox::mojom::AutocompleteResultPtr result(::searchbox::mojom::AutocompleteResult::New());
  
      if (success)
        result->query_id = input.query_id();
      if (success)
        result->sequence_id = input.sequence_id();
      if (success && !input.ReadInput(&result->input))
        success = false;
      if (success && !input.ReadSuggestionGroupsMap(&result->suggestion_groups_map))
        success = false;
      if (success && !input.ReadMatches(&result->matches))
        success = false;
      if (success && !input.ReadSmartComposeInlineHint(&result->smart_compose_inline_hint))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::searchbox::mojom::OmniboxPopupSelection::DataView, ::searchbox::mojom::OmniboxPopupSelectionPtr>::Read(
    ::searchbox::mojom::OmniboxPopupSelection::DataView input,
    ::searchbox::mojom::OmniboxPopupSelectionPtr* output) {
  bool success = true;
  ::searchbox::mojom::OmniboxPopupSelectionPtr result(::searchbox::mojom::OmniboxPopupSelection::New());
  
      if (success)
        result->line = input.line();
      if (success && !input.ReadState(&result->state))
        success = false;
      if (success)
        result->action_index = input.action_index();
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::searchbox::mojom::ActionModifiers::DataView, ::searchbox::mojom::ActionModifiersPtr>::Read(
    ::searchbox::mojom::ActionModifiers::DataView input,
    ::searchbox::mojom::ActionModifiersPtr* output) {
  bool success = true;
  ::searchbox::mojom::ActionModifiersPtr result(::searchbox::mojom::ActionModifiers::New());
  
      if (success)
        result->alt_key = input.alt_key();
      if (success)
        result->ctrl_key = input.ctrl_key();
      if (success)
        result->meta_key = input.meta_key();
      if (success)
        result->shift_key = input.shift_key();
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::searchbox::mojom::PlaceholderConfig::DataView, ::searchbox::mojom::PlaceholderConfigPtr>::Read(
    ::searchbox::mojom::PlaceholderConfig::DataView input,
    ::searchbox::mojom::PlaceholderConfigPtr* output) {
  bool success = true;
  ::searchbox::mojom::PlaceholderConfigPtr result(::searchbox::mojom::PlaceholderConfig::New());
  
      if (success && !input.ReadTexts(&result->texts))
        success = false;
      if (success && !input.ReadChangeTextAnimationInterval(&result->change_text_animation_interval))
        success = false;
      if (success && !input.ReadFadeTextAnimationDuration(&result->fade_text_animation_duration))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::searchbox::mojom::DriveFile::DataView, ::searchbox::mojom::DriveFilePtr>::Read(
    ::searchbox::mojom::DriveFile::DataView input,
    ::searchbox::mojom::DriveFilePtr* output) {
  bool success = true;
  ::searchbox::mojom::DriveFilePtr result(::searchbox::mojom::DriveFile::New());
  
      if (success && !input.ReadToken(&result->token))
        success = false;
      if (success && !input.ReadMimeType(&result->mime_type))
        success = false;
      if (success && !input.ReadFileName(&result->file_name))
        success = false;
      if (success && !input.ReadThumbnailUrl(&result->thumbnail_url))
        success = false;
      if (success && !input.ReadIconUrl(&result->icon_url))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::searchbox::mojom::DriveUploadResponse::DataView, ::searchbox::mojom::DriveUploadResponsePtr>::Read(
    ::searchbox::mojom::DriveUploadResponse::DataView input,
    ::searchbox::mojom::DriveUploadResponsePtr* output) {
  bool success = true;
  ::searchbox::mojom::DriveUploadResponsePtr result(::searchbox::mojom::DriveUploadResponse::New());
  
      if (success && !input.ReadFiles(&result->files))
        success = false;
      if (success && !input.ReadError(&result->error)) {
        success = false;
      }
  *output = std::move(result);
  return success;
}

// static
bool UnionTraits<::searchbox::mojom::SearchContextAttachment::DataView, ::searchbox::mojom::SearchContextAttachmentPtr>::Read(
    ::searchbox::mojom::SearchContextAttachment::DataView input,
    ::searchbox::mojom::SearchContextAttachmentPtr* output) {
  using UnionType = ::searchbox::mojom::SearchContextAttachment;
  using Tag = UnionType::Tag;

  switch (input.tag()) {
    case Tag::kFileAttachment: {
      ::searchbox::mojom::FileAttachmentPtr result_file_attachment{};
      if (!input.ReadFileAttachment(&result_file_attachment))
        return false;

      *output = UnionType::NewFileAttachment(
          std::move(result_file_attachment));
      break;
    }
    case Tag::kTabAttachment: {
      ::searchbox::mojom::TabAttachmentPtr result_tab_attachment{};
      if (!input.ReadTabAttachment(&result_tab_attachment))
        return false;

      *output = UnionType::NewTabAttachment(
          std::move(result_tab_attachment));
      break;
    }
    default:

      return false;
  }
  return true;
}

// static
bool UnionTraits<::searchbox::mojom::PageHandler_AddFileContext_ResponseParam_Result::DataView, ::searchbox::mojom::PageHandler_AddFileContext_ResponseParam_ResultPtr>::Read(
    ::searchbox::mojom::PageHandler_AddFileContext_ResponseParam_Result::DataView input,
    ::searchbox::mojom::PageHandler_AddFileContext_ResponseParam_ResultPtr* output) {
  using UnionType = ::searchbox::mojom::PageHandler_AddFileContext_ResponseParam_Result;
  using Tag = UnionType::Tag;

  switch (input.tag()) {
    case Tag::kSuccess: {
      ::base::UnguessableToken result_success{};
      if (!input.ReadSuccess(&result_success))
        return false;

      *output = UnionType::NewSuccess(
          std::move(result_success));
      break;
    }
    case Tag::kFailure: {
      ::contextual_search::ContextUploadErrorType result_failure;
      if (!input.ReadFailure(&result_failure))
        return false;

      *output = UnionType::NewFailure(result_failure);
      break;
    }
    default:

      return false;
  }
  return true;
}

// static
bool UnionTraits<::searchbox::mojom::PageHandler_AddTabContext_ResponseParam_Result::DataView, ::searchbox::mojom::PageHandler_AddTabContext_ResponseParam_ResultPtr>::Read(
    ::searchbox::mojom::PageHandler_AddTabContext_ResponseParam_Result::DataView input,
    ::searchbox::mojom::PageHandler_AddTabContext_ResponseParam_ResultPtr* output) {
  using UnionType = ::searchbox::mojom::PageHandler_AddTabContext_ResponseParam_Result;
  using Tag = UnionType::Tag;

  switch (input.tag()) {
    case Tag::kSuccess: {
      ::base::UnguessableToken result_success{};
      if (!input.ReadSuccess(&result_success))
        return false;

      *output = UnionType::NewSuccess(
          std::move(result_success));
      break;
    }
    case Tag::kFailure: {
      ::contextual_search::ContextUploadErrorType result_failure;
      if (!input.ReadFailure(&result_failure))
        return false;

      *output = UnionType::NewFailure(result_failure);
      break;
    }
    default:

      return false;
  }
  return true;
}

}  // namespace mojo


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


namespace searchbox::mojom {


void PageHandlerFactoryInterceptorForTesting::CreatePageHandler(::mojo::PendingRemote<Page> page, ::mojo::PendingReceiver<PageHandler> handler) {
  GetForwardingInterface()->CreatePageHandler(
    std::move(page)
    , 
    std::move(handler)
    );
}
PageHandlerFactoryAsyncWaiter::PageHandlerFactoryAsyncWaiter(
    PageHandlerFactory* proxy) : proxy_(proxy) {}

PageHandlerFactoryAsyncWaiter::~PageHandlerFactoryAsyncWaiter() = default;





void PageHandlerInterceptorForTesting::OnFocusChanged(bool focused) {
  GetForwardingInterface()->OnFocusChanged(
    std::move(focused)
    );
}
void PageHandlerInterceptorForTesting::QueryAutocomplete(int32_t query_id, std::optional<int32_t> tab_id, const ::std::u16string& input, bool prevent_inline_autocomplete, uint32_t cursor_position, ::omnibox::SuggestInventory suggest_inventory, bool is_on_focus, const std::string& keyword, InputMethod input_method) {
  GetForwardingInterface()->QueryAutocomplete(
    std::move(query_id)
    , 
    std::move(tab_id)
    , 
    std::move(input)
    , 
    std::move(prevent_inline_autocomplete)
    , 
    std::move(cursor_position)
    , 
    std::move(suggest_inventory)
    , 
    std::move(is_on_focus)
    , 
    std::move(keyword)
    , 
    std::move(input_method)
    );
}
void PageHandlerInterceptorForTesting::StopAutocomplete(bool clear_result) {
  GetForwardingInterface()->StopAutocomplete(
    std::move(clear_result)
    );
}
void PageHandlerInterceptorForTesting::OpenAutocompleteMatch(uint8_t line, const ::GURL& url, bool are_matches_showing, uint8_t mouse_button, ActionModifiersPtr modifiers, bool via_keyboard) {
  GetForwardingInterface()->OpenAutocompleteMatch(
    std::move(line)
    , 
    std::move(url)
    , 
    std::move(are_matches_showing)
    , 
    std::move(mouse_button)
    , 
    std::move(modifiers)
    , 
    std::move(via_keyboard)
    );
}
void PageHandlerInterceptorForTesting::SetSmartComposeStats(SmartComposeStatsPtr smart_compose_stats) {
  GetForwardingInterface()->SetSmartComposeStats(
    std::move(smart_compose_stats)
    );
}
void PageHandlerInterceptorForTesting::SetPopupSelection(OmniboxPopupSelectionPtr selection) {
  GetForwardingInterface()->SetPopupSelection(
    std::move(selection)
    );
}
void PageHandlerInterceptorForTesting::OpenPopupSelection(uint32_t result_sequence_id, OmniboxPopupSelectionPtr selection, ::WindowOpenDisposition disposition) {
  GetForwardingInterface()->OpenPopupSelection(
    std::move(result_sequence_id)
    , 
    std::move(selection)
    , 
    std::move(disposition)
    );
}
void PageHandlerInterceptorForTesting::OnNavigationLikely(uint8_t line, const ::GURL& url, ::omnibox::mojom::NavigationPredictor navigation_predictor) {
  GetForwardingInterface()->OnNavigationLikely(
    std::move(line)
    , 
    std::move(url)
    , 
    std::move(navigation_predictor)
    );
}
void PageHandlerInterceptorForTesting::DeleteAutocompleteMatch(uint8_t line, const ::GURL& url) {
  GetForwardingInterface()->DeleteAutocompleteMatch(
    std::move(line)
    , 
    std::move(url)
    );
}
void PageHandlerInterceptorForTesting::ActivateKeyword(uint8_t line, const ::GURL& url, ::base::TimeTicks match_selection_timestamp, bool is_mouse_event) {
  GetForwardingInterface()->ActivateKeyword(
    std::move(line)
    , 
    std::move(url)
    , 
    std::move(match_selection_timestamp)
    , 
    std::move(is_mouse_event)
    );
}
void PageHandlerInterceptorForTesting::ExecuteAction(uint8_t line, uint8_t action_index, const ::GURL& url, ::base::TimeTicks match_selection_timestamp, uint8_t mouse_button, bool alt_key, bool ctrl_key, bool meta_key, bool shift_key) {
  GetForwardingInterface()->ExecuteAction(
    std::move(line)
    , 
    std::move(action_index)
    , 
    std::move(url)
    , 
    std::move(match_selection_timestamp)
    , 
    std::move(mouse_button)
    , 
    std::move(alt_key)
    , 
    std::move(ctrl_key)
    , 
    std::move(meta_key)
    , 
    std::move(shift_key)
    );
}
void PageHandlerInterceptorForTesting::OnThumbnailRemoved() {
  GetForwardingInterface()->OnThumbnailRemoved();
}
void PageHandlerInterceptorForTesting::GetCyclingPlaceholderConfig(GetCyclingPlaceholderConfigCallback callback) {
  GetForwardingInterface()->GetCyclingPlaceholderConfig(std::move(callback));
}
void PageHandlerInterceptorForTesting::GetRecentTabs(GetRecentTabsCallback callback) {
  GetForwardingInterface()->GetRecentTabs(std::move(callback));
}
void PageHandlerInterceptorForTesting::GetTabPreview(int32_t tab_id, GetTabPreviewCallback callback) {
  GetForwardingInterface()->GetTabPreview(
    std::move(tab_id)
    , std::move(callback));
}
void PageHandlerInterceptorForTesting::WaitForTabFaviconLoad(int32_t tab_id, WaitForTabFaviconLoadCallback callback) {
  GetForwardingInterface()->WaitForTabFaviconLoad(
    std::move(tab_id)
    , std::move(callback));
}
void PageHandlerInterceptorForTesting::GetInputState(GetInputStateCallback callback) {
  GetForwardingInterface()->GetInputState(std::move(callback));
}
void PageHandlerInterceptorForTesting::NotifySessionStarted() {
  GetForwardingInterface()->NotifySessionStarted();
}
void PageHandlerInterceptorForTesting::NotifySessionAbandoned() {
  GetForwardingInterface()->NotifySessionAbandoned();
}
void PageHandlerInterceptorForTesting::AddFileContext(SelectedFileInfoPtr file_info, ::mojo_base::BigBuffer file_bytes, AddFileContextCallback callback) {
  GetForwardingInterface()->AddFileContext(
    std::move(file_info)
    , 
    std::move(file_bytes)
    , std::move(callback));
}
void PageHandlerInterceptorForTesting::AddTabContext(int32_t tab_id, bool delay_upload, TabAttachmentSource source, AddTabContextCallback callback) {
  GetForwardingInterface()->AddTabContext(
    std::move(tab_id)
    , 
    std::move(delay_upload)
    , 
    std::move(source)
    , std::move(callback));
}
void PageHandlerInterceptorForTesting::DeleteContext(const ::base::UnguessableToken& token, bool from_automatic_chip) {
  GetForwardingInterface()->DeleteContext(
    std::move(token)
    , 
    std::move(from_automatic_chip)
    );
}
void PageHandlerInterceptorForTesting::DeleteTabContext(int32_t tab_id) {
  GetForwardingInterface()->DeleteTabContext(
    std::move(tab_id)
    );
}
void PageHandlerInterceptorForTesting::ClearFiles(bool should_block_auto_suggested_tabs) {
  GetForwardingInterface()->ClearFiles(
    std::move(should_block_auto_suggested_tabs)
    );
}
void PageHandlerInterceptorForTesting::SubmitQuery(const std::string& query_text, uint8_t mouse_button, bool alt_key, bool ctrl_key, bool meta_key, bool shift_key, bool is_voice_search) {
  GetForwardingInterface()->SubmitQuery(
    std::move(query_text)
    , 
    std::move(mouse_button)
    , 
    std::move(alt_key)
    , 
    std::move(ctrl_key)
    , 
    std::move(meta_key)
    , 
    std::move(shift_key)
    , 
    std::move(is_voice_search)
    );
}
void PageHandlerInterceptorForTesting::OpenLensSearch() {
  GetForwardingInterface()->OpenLensSearch();
}
void PageHandlerInterceptorForTesting::SetActiveToolMode(::omnibox::ToolMode tool, bool is_set_by_aim) {
  GetForwardingInterface()->SetActiveToolMode(
    std::move(tool)
    , 
    std::move(is_set_by_aim)
    );
}
void PageHandlerInterceptorForTesting::SetActiveModelMode(::omnibox::ModelMode model, bool is_set_by_aim) {
  GetForwardingInterface()->SetActiveModelMode(
    std::move(model)
    , 
    std::move(is_set_by_aim)
    );
}
void PageHandlerInterceptorForTesting::ActivateMetricsFunnel(const std::string& funnel_name) {
  GetForwardingInterface()->ActivateMetricsFunnel(
    std::move(funnel_name)
    );
}
void PageHandlerInterceptorForTesting::RecordToolSelectionAction(::omnibox::ToolMode tool) {
  GetForwardingInterface()->RecordToolSelectionAction(
    std::move(tool)
    );
}
void PageHandlerInterceptorForTesting::RecordModelSelectionAction(::omnibox::ModelMode model) {
  GetForwardingInterface()->RecordModelSelectionAction(
    std::move(model)
    );
}
void PageHandlerInterceptorForTesting::GetDriveDisclaimerStatus(GetDriveDisclaimerStatusCallback callback) {
  GetForwardingInterface()->GetDriveDisclaimerStatus(std::move(callback));
}
void PageHandlerInterceptorForTesting::OnDriveDisclaimerAccepted() {
  GetForwardingInterface()->OnDriveDisclaimerAccepted();
}
void PageHandlerInterceptorForTesting::OnDriveUploadClicked(OnDriveUploadClickedCallback callback) {
  GetForwardingInterface()->OnDriveUploadClicked(std::move(callback));
}
void PageHandlerInterceptorForTesting::OpenProfilePicker() {
  GetForwardingInterface()->OpenProfilePicker();
}
void PageHandlerInterceptorForTesting::ShowScreenshotMenu(const ::gfx::Rect& anchor_rect) {
  GetForwardingInterface()->ShowScreenshotMenu(
    std::move(anchor_rect)
    );
}
void PageHandlerInterceptorForTesting::StartScreenshare(bool prefer_entire_screen, StartScreenshareCallback callback) {
  GetForwardingInterface()->StartScreenshare(
    std::move(prefer_entire_screen)
    , std::move(callback));
}
void PageHandlerInterceptorForTesting::CaptureRegionScreenshot(CaptureRegionScreenshotCallback callback) {
  GetForwardingInterface()->CaptureRegionScreenshot(std::move(callback));
}
void PageHandlerInterceptorForTesting::GetPageClassification(GetPageClassificationCallback callback) {
  GetForwardingInterface()->GetPageClassification(std::move(callback));
}
PageHandlerAsyncWaiter::PageHandlerAsyncWaiter(
    PageHandler* proxy) : proxy_(proxy) {}

PageHandlerAsyncWaiter::~PageHandlerAsyncWaiter() = default;


void PageHandlerAsyncWaiter::GetCyclingPlaceholderConfig(
    PlaceholderConfigPtr* out_config) {
  base::RunLoop loop;
  proxy_->GetCyclingPlaceholderConfig(
      base::BindOnce(
          [](base::RunLoop* loop,
             PlaceholderConfigPtr* out_config
,
             PlaceholderConfigPtr config) {*out_config = std::move(config);
            loop->Quit();
          },
          &loop,
          out_config));
  loop.Run();
}

PlaceholderConfigPtr PageHandlerAsyncWaiter::GetCyclingPlaceholderConfig(
    ) {
  PlaceholderConfigPtr async_wait_result;
  GetCyclingPlaceholderConfig(&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::GetRecentTabs(
    std::vector<TabInfoPtr>* out_tabs) {
  base::RunLoop loop;
  proxy_->GetRecentTabs(
      base::BindOnce(
          [](base::RunLoop* loop,
             std::vector<TabInfoPtr>* out_tabs
,
             std::vector<TabInfoPtr> tabs) {*out_tabs = std::move(tabs);
            loop->Quit();
          },
          &loop,
          out_tabs));
  loop.Run();
}

std::vector<TabInfoPtr> PageHandlerAsyncWaiter::GetRecentTabs(
    ) {
  std::vector<TabInfoPtr> async_wait_result;
  GetRecentTabs(&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::GetTabPreview(
    int32_t tab_id, std::optional<std::string>* out_preview_data_url) {
  base::RunLoop loop;
  proxy_->GetTabPreview(
      std::move(tab_id),
      base::BindOnce(
          [](base::RunLoop* loop,
             std::optional<std::string>* out_preview_data_url
,
             const std::optional<std::string>& preview_data_url) {*out_preview_data_url = std::move(preview_data_url);
            loop->Quit();
          },
          &loop,
          out_preview_data_url));
  loop.Run();
}

std::optional<std::string> PageHandlerAsyncWaiter::GetTabPreview(
    int32_t tab_id) {
  std::optional<std::string> async_wait_result;
  GetTabPreview(std::move(tab_id),&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::WaitForTabFaviconLoad(
    int32_t tab_id, std::optional<::GURL>* out_favicon_data_url) {
  base::RunLoop loop;
  proxy_->WaitForTabFaviconLoad(
      std::move(tab_id),
      base::BindOnce(
          [](base::RunLoop* loop,
             std::optional<::GURL>* out_favicon_data_url
,
             const std::optional<::GURL>& favicon_data_url) {*out_favicon_data_url = std::move(favicon_data_url);
            loop->Quit();
          },
          &loop,
          out_favicon_data_url));
  loop.Run();
}

std::optional<::GURL> PageHandlerAsyncWaiter::WaitForTabFaviconLoad(
    int32_t tab_id) {
  std::optional<::GURL> async_wait_result;
  WaitForTabFaviconLoad(std::move(tab_id),&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::GetInputState(
    std::optional<::omnibox::InputState>* out_state) {
  base::RunLoop loop;
  proxy_->GetInputState(
      base::BindOnce(
          [](base::RunLoop* loop,
             std::optional<::omnibox::InputState>* out_state
,
             const std::optional<::omnibox::InputState>& state) {*out_state = std::move(state);
            loop->Quit();
          },
          &loop,
          out_state));
  loop.Run();
}

std::optional<::omnibox::InputState> PageHandlerAsyncWaiter::GetInputState(
    ) {
  std::optional<::omnibox::InputState> async_wait_result;
  GetInputState(&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::GetDriveDisclaimerStatus(
    DriveDisclaimerStatus* out_status) {
  base::RunLoop loop;
  proxy_->GetDriveDisclaimerStatus(
      base::BindOnce(
          [](base::RunLoop* loop,
             DriveDisclaimerStatus* out_status
,
             DriveDisclaimerStatus status) {*out_status = std::move(status);
            loop->Quit();
          },
          &loop,
          out_status));
  loop.Run();
}

DriveDisclaimerStatus PageHandlerAsyncWaiter::GetDriveDisclaimerStatus(
    ) {
  DriveDisclaimerStatus async_wait_result;
  GetDriveDisclaimerStatus(&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::OnDriveUploadClicked(
    DriveUploadResponsePtr* out_response) {
  base::RunLoop loop;
  proxy_->OnDriveUploadClicked(
      base::BindOnce(
          [](base::RunLoop* loop,
             DriveUploadResponsePtr* out_response
,
             DriveUploadResponsePtr response) {*out_response = std::move(response);
            loop->Quit();
          },
          &loop,
          out_response));
  loop.Run();
}

DriveUploadResponsePtr PageHandlerAsyncWaiter::OnDriveUploadClicked(
    ) {
  DriveUploadResponsePtr async_wait_result;
  OnDriveUploadClicked(&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::StartScreenshare(
    bool prefer_entire_screen, std::optional<::base::UnguessableToken>* out_token) {
  base::RunLoop loop;
  proxy_->StartScreenshare(
      std::move(prefer_entire_screen),
      base::BindOnce(
          [](base::RunLoop* loop,
             std::optional<::base::UnguessableToken>* out_token
,
             const std::optional<::base::UnguessableToken>& token) {*out_token = std::move(token);
            loop->Quit();
          },
          &loop,
          out_token));
  loop.Run();
}

std::optional<::base::UnguessableToken> PageHandlerAsyncWaiter::StartScreenshare(
    bool prefer_entire_screen) {
  std::optional<::base::UnguessableToken> async_wait_result;
  StartScreenshare(std::move(prefer_entire_screen),&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::CaptureRegionScreenshot(
    std::optional<::base::UnguessableToken>* out_token) {
  base::RunLoop loop;
  proxy_->CaptureRegionScreenshot(
      base::BindOnce(
          [](base::RunLoop* loop,
             std::optional<::base::UnguessableToken>* out_token
,
             const std::optional<::base::UnguessableToken>& token) {*out_token = std::move(token);
            loop->Quit();
          },
          &loop,
          out_token));
  loop.Run();
}

std::optional<::base::UnguessableToken> PageHandlerAsyncWaiter::CaptureRegionScreenshot(
    ) {
  std::optional<::base::UnguessableToken> async_wait_result;
  CaptureRegionScreenshot(&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::GetPageClassification(
    std::string* out_metricSource) {
  base::RunLoop loop;
  proxy_->GetPageClassification(
      base::BindOnce(
          [](base::RunLoop* loop,
             std::string* out_metricSource
,
             const std::string& metricSource) {*out_metricSource = std::move(metricSource);
            loop->Quit();
          },
          &loop,
          out_metricSource));
  loop.Run();
}

std::string PageHandlerAsyncWaiter::GetPageClassification(
    ) {
  std::string async_wait_result;
  GetPageClassification(&async_wait_result);
  return async_wait_result;
}




void PageInterceptorForTesting::AutocompleteResultChanged(AutocompleteResultPtr result) {
  GetForwardingInterface()->AutocompleteResultChanged(
    std::move(result)
    );
}
void PageInterceptorForTesting::UpdateSelection(OmniboxPopupSelectionPtr old_selection, OmniboxPopupSelectionPtr selection) {
  GetForwardingInterface()->UpdateSelection(
    std::move(old_selection)
    , 
    std::move(selection)
    );
}
void PageInterceptorForTesting::StepSelection(SelectionDirection direction, SelectionStep step) {
  GetForwardingInterface()->StepSelection(
    std::move(direction)
    , 
    std::move(step)
    );
}
void PageInterceptorForTesting::OpenCurrentSelection(::WindowOpenDisposition disposition) {
  GetForwardingInterface()->OpenCurrentSelection(
    std::move(disposition)
    );
}
void PageInterceptorForTesting::SetAimButtonVisible(bool visible) {
  GetForwardingInterface()->SetAimButtonVisible(
    std::move(visible)
    );
}
void PageInterceptorForTesting::SetAimButtonConfig(const std::string& text, const std::string& tooltip, const std::string& a11y_label, const ::GURL& icon_url) {
  GetForwardingInterface()->SetAimButtonConfig(
    std::move(text)
    , 
    std::move(tooltip)
    , 
    std::move(a11y_label)
    , 
    std::move(icon_url)
    );
}
void PageInterceptorForTesting::SetInputText(const std::string& input) {
  GetForwardingInterface()->SetInputText(
    std::move(input)
    );
}
void PageInterceptorForTesting::SetThumbnail(const std::string& thumbnail_url, bool is_deletable) {
  GetForwardingInterface()->SetThumbnail(
    std::move(thumbnail_url)
    , 
    std::move(is_deletable)
    );
}
void PageInterceptorForTesting::OnContextualInputStatusChanged(const ::base::UnguessableToken& token, ::contextual_search::ContextUploadStatus status, std::optional<::contextual_search::ContextUploadErrorType> error_type) {
  GetForwardingInterface()->OnContextualInputStatusChanged(
    std::move(token)
    , 
    std::move(status)
    , 
    std::move(error_type)
    );
}
void PageInterceptorForTesting::OnTabStripChanged() {
  GetForwardingInterface()->OnTabStripChanged();
}
void PageInterceptorForTesting::OnInputStateChanged(const ::omnibox::InputState& input_state) {
  GetForwardingInterface()->OnInputStateChanged(
    std::move(input_state)
    );
}
void PageInterceptorForTesting::AddFileContext(const ::base::UnguessableToken& token, SelectedFileInfoPtr file_info) {
  GetForwardingInterface()->AddFileContext(
    std::move(token)
    , 
    std::move(file_info)
    );
}
void PageInterceptorForTesting::UpdateAutoSuggestedTabContext(TabInfoPtr tab, const std::optional<std::string>& invocation_source) {
  GetForwardingInterface()->UpdateAutoSuggestedTabContext(
    std::move(tab)
    , 
    std::move(invocation_source)
    );
}
void PageInterceptorForTesting::UpdateLensSearchEligibility(bool eligible) {
  GetForwardingInterface()->UpdateLensSearchEligibility(
    std::move(eligible)
    );
}
void PageInterceptorForTesting::UpdateContentSharingPolicy(bool enabled) {
  GetForwardingInterface()->UpdateContentSharingPolicy(
    std::move(enabled)
    );
}
void PageInterceptorForTesting::UpdateAimPopupEligibility(bool eligible) {
  GetForwardingInterface()->UpdateAimPopupEligibility(
    std::move(eligible)
    );
}
void PageInterceptorForTesting::OnPermissionPromptChanged(bool is_showing, const ::gfx::Size& prompt_size) {
  GetForwardingInterface()->OnPermissionPromptChanged(
    std::move(is_showing)
    , 
    std::move(prompt_size)
    );
}
void PageInterceptorForTesting::SetRestoredTabIds(const std::vector<int32_t>& ids) {
  GetForwardingInterface()->SetRestoredTabIds(
    std::move(ids)
    );
}
void PageInterceptorForTesting::SetAimThreadRestoredTabs(std::vector<TabInfoPtr> tabs) {
  GetForwardingInterface()->SetAimThreadRestoredTabs(
    std::move(tabs)
    );
}
void PageInterceptorForTesting::OnScreenshotMenuClosed() {
  GetForwardingInterface()->OnScreenshotMenuClosed();
}
PageAsyncWaiter::PageAsyncWaiter(
    Page* proxy) : proxy_(proxy) {}

PageAsyncWaiter::~PageAsyncWaiter() = default;







}  // searchbox::mojom


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