// chrome/browser/ui/webui/context_hub/context_hub.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 "chrome/browser/ui/webui/context_hub/context_hub.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 "chrome/browser/ui/webui/context_hub/context_hub.mojom-params-data.h"
#include "chrome/browser/ui/webui/context_hub/context_hub.mojom-shared-message-ids.h"

#include "chrome/browser/ui/webui/context_hub/context_hub.mojom-import-headers.h"
#include "chrome/browser/ui/webui/context_hub/context_hub.mojom-test-utils.h"


namespace browser::context_hub::mojom {
GmailReference::GmailReference()
    : message_url(),
      subject() {}

GmailReference::GmailReference(
    const ::GURL& message_url_in,
    const std::string& subject_in)
    : message_url(std::move(message_url_in)),
      subject(std::move(subject_in)) {}

GmailReference::~GmailReference() = default;

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

bool GmailReference::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
PhotosReference::PhotosReference()
    : photos_url() {}

PhotosReference::PhotosReference(
    const ::GURL& photos_url_in)
    : photos_url(std::move(photos_url_in)) {}

PhotosReference::~PhotosReference() = default;

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

bool PhotosReference::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
FirstPartyData::FirstPartyData()
    : source_references(),
      actionable_url() {}

FirstPartyData::FirstPartyData(
    std::vector<::context_hub::SourceReference> source_references_in,
    const ::GURL& actionable_url_in)
    : source_references(std::move(source_references_in)),
      actionable_url(std::move(actionable_url_in)) {}

FirstPartyData::~FirstPartyData() = default;

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

bool FirstPartyData::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
ThirdPartyData::ThirdPartyData()
    : tab_id(),
      last_active_timestamp(),
      group_type() {}

ThirdPartyData::ThirdPartyData(
    int64_t tab_id_in,
    ::base::Time last_active_timestamp_in,
    ::context_hub::ThirdPartyData::GroupType group_type_in)
    : tab_id(std::move(tab_id_in)),
      last_active_timestamp(std::move(last_active_timestamp_in)),
      group_type(std::move(group_type_in)) {}

ThirdPartyData::~ThirdPartyData() = default;

void ThirdPartyData::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 int64_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "last_active_timestamp"), this->last_active_timestamp,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::base::Time>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "group_type"), this->group_type,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::context_hub::ThirdPartyData::GroupType>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool ThirdPartyData::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
AutoTodoItem::AutoTodoItem()
    : id(),
      title(),
      description(),
      status(),
      score(),
      data() {}

AutoTodoItem::AutoTodoItem(
    const std::string& id_in,
    const std::string& title_in,
    const std::string& description_in,
    ::context_hub::AutoTodoEntry::Status status_in,
    float score_in,
    const ::std::variant<::context_hub::FirstPartyData, ::context_hub::ThirdPartyData>& data_in)
    : id(std::move(id_in)),
      title(std::move(title_in)),
      description(std::move(description_in)),
      status(std::move(status_in)),
      score(std::move(score_in)),
      data(std::move(data_in)) {}

AutoTodoItem::~AutoTodoItem() = default;

void AutoTodoItem::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "id"), this->id,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#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(
      "description"), this->description,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "status"), this->status,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::context_hub::AutoTodoEntry::Status>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "score"), this->score,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type float>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "data"), this->data,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::std::variant<::context_hub::FirstPartyData, ::context_hub::ThirdPartyData>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool AutoTodoItem::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
MemoryBankEntry::MemoryBankEntry()
    : id(),
      type(),
      timestamp(),
      url(),
      tab_title(),
      selected_text(),
      tags(),
      note(),
      collection() {}

MemoryBankEntry::MemoryBankEntry(
    int64_t id_in,
    EntryType type_in,
    ::base::Time timestamp_in,
    const ::GURL& url_in,
    const std::string& tab_title_in,
    const std::optional<std::string>& selected_text_in,
    std::vector<std::string> tags_in,
    const std::optional<std::string>& note_in,
    const std::optional<std::string>& collection_in)
    : id(std::move(id_in)),
      type(std::move(type_in)),
      timestamp(std::move(timestamp_in)),
      url(std::move(url_in)),
      tab_title(std::move(tab_title_in)),
      selected_text(std::move(selected_text_in)),
      tags(std::move(tags_in)),
      note(std::move(note_in)),
      collection(std::move(collection_in)) {}

MemoryBankEntry::~MemoryBankEntry() = default;

void MemoryBankEntry::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "id"), this->id,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type int64_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "type"), this->type,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type EntryType>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "timestamp"), this->timestamp,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type ::base::Time>"
#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(
      "tab_title"), this->tab_title,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "selected_text"), this->selected_text,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<std::string>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "tags"), this->tags,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::vector<std::string>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "note"), this->note,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<std::string>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "collection"), this->collection,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<std::string>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool MemoryBankEntry::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
TabInfo::TabInfo()
    : id(),
      title(),
      url() {}

TabInfo::TabInfo(
    int64_t id_in,
    const std::string& title_in,
    const ::GURL& url_in)
    : id(std::move(id_in)),
      title(std::move(title_in)),
      url(std::move(url_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(
      "id"), this->id,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type int64_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)
    );
}

bool TabInfo::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
TabGroup::TabGroup()
    : label(),
      tabs(),
      saved_guid() {}

TabGroup::TabGroup(
    const std::string& label_in,
    std::vector<TabInfoPtr> tabs_in,
    const std::optional<::base::Uuid>& saved_guid_in)
    : label(std::move(label_in)),
      tabs(std::move(tabs_in)),
      saved_guid(std::move(saved_guid_in)) {}

TabGroup::~TabGroup() = default;

void TabGroup::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "label"), this->label,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "tabs"), this->tabs,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type std::vector<TabInfoPtr>>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "saved_guid"), this->saved_guid,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<::base::Uuid>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool TabGroup::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
ChatMessage::ChatMessage()
    : role(),
      content() {}

ChatMessage::ChatMessage(
    ChatRole role_in,
    const std::string& content_in)
    : role(std::move(role_in)),
      content(std::move(content_in)) {}

ChatMessage::~ChatMessage() = default;
size_t ChatMessage::Hash(size_t seed) const {
  seed = mojo::internal::Hash(seed, this->role);
  seed = mojo::internal::Hash(seed, this->content);
  return seed;
}

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

bool ChatMessage::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
SaveToMemoryBankContext::SaveToMemoryBankContext()
    : url(),
      tab_title(),
      selected_text(),
      is_text_selection() {}

SaveToMemoryBankContext::SaveToMemoryBankContext(
    const ::GURL& url_in,
    const std::string& tab_title_in,
    const std::optional<std::string>& selected_text_in,
    bool is_text_selection_in)
    : url(std::move(url_in)),
      tab_title(std::move(tab_title_in)),
      selected_text(std::move(selected_text_in)),
      is_text_selection(std::move(is_text_selection_in)) {}

SaveToMemoryBankContext::~SaveToMemoryBankContext() = default;

void SaveToMemoryBankContext::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "url"), this->url,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::GURL&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "tab_title"), this->tab_title,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "selected_text"), this->selected_text,
#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_text_selection"), this->is_text_selection,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool SaveToMemoryBankContext::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
MemoryBankEntryAnnotations::MemoryBankEntryAnnotations()
    : collection(),
      note(),
      tags() {}

MemoryBankEntryAnnotations::MemoryBankEntryAnnotations(
    const std::optional<std::string>& collection_in,
    const std::optional<std::string>& note_in,
    std::optional<std::vector<std::string>> tags_in)
    : collection(std::move(collection_in)),
      note(std::move(note_in)),
      tags(std::move(tags_in)) {}

MemoryBankEntryAnnotations::~MemoryBankEntryAnnotations() = default;

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

bool MemoryBankEntryAnnotations::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
AutoTodoItemFeedback::AutoTodoItemFeedback()
    : todo_id(),
      liked() {}

AutoTodoItemFeedback::AutoTodoItemFeedback(
    const std::string& todo_id_in,
    bool liked_in)
    : todo_id(std::move(todo_id_in)),
      liked(std::move(liked_in)) {}

AutoTodoItemFeedback::~AutoTodoItemFeedback() = default;
size_t AutoTodoItemFeedback::Hash(size_t seed) const {
  seed = mojo::internal::Hash(seed, this->todo_id);
  seed = mojo::internal::Hash(seed, this->liked);
  return seed;
}

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

bool AutoTodoItemFeedback::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
SourceReferencePtr
SourceReference::NewGmail(
    const ::context_hub::SourceReference& value) {
  return SourceReferencePtr(
      std::in_place,
      std::in_place_index<static_cast<size_t>(Tag::kGmail)>,
      std::move(value));
}

SourceReferencePtr
SourceReference::NewPhotos(
    PhotosReferencePtr value) {
  return SourceReferencePtr(
      std::in_place,
      std::in_place_index<static_cast<size_t>(Tag::kPhotos)>,
      std::move(value));
}

SourceReference::SourceReference(
    std::in_place_index_t<static_cast<size_t>(Tag::kGmail)>,
    const ::context_hub::SourceReference& value)
    : tag_(Tag::kGmail),
      data_(std::in_place_index<static_cast<size_t>(Tag::kGmail)>,
            std::move(value)) {}

SourceReference::SourceReference(
    std::in_place_index_t<static_cast<size_t>(Tag::kPhotos)>,
    PhotosReferencePtr value)
    : tag_(Tag::kPhotos),
      data_(std::in_place_index<static_cast<size_t>(Tag::kPhotos)>,
            std::move(value)) {}
SourceReference::~SourceReference() {
  DestroyActive();
}

void SourceReference::set_gmail(const ::context_hub::SourceReference& gmail) {
  if (tag_ == Tag::kGmail) {
    data_.gmail = std::move(gmail);
  } else {
    DestroyActive();
    tag_ = Tag::kGmail;
    new (&data_.gmail) ::context_hub::SourceReference(
        std::move(gmail));
  }
}

void SourceReference::set_photos(PhotosReferencePtr photos) {
  if (tag_ == Tag::kPhotos) {
    data_.photos = std::move(photos);
  } else {
    DestroyActive();
    tag_ = Tag::kPhotos;
    new (&data_.photos) PhotosReferencePtr(
        std::move(photos));
  }
}


SourceReference::Union_::Union_(
    std::in_place_index_t<static_cast<size_t>(Tag::kGmail)>,
    const ::context_hub::SourceReference& value)
    : gmail(std::move(value)) {}

SourceReference::Union_::Union_(
    std::in_place_index_t<static_cast<size_t>(Tag::kPhotos)>,
    PhotosReferencePtr value)
    : photos(std::move(value)) {}

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

    case Tag::kGmail:
      std::destroy_at(&data_.gmail);
      break;
    case Tag::kPhotos:
      std::destroy_at(&data_.photos);
      break;
  }
}

bool SourceReference::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context, false);
}
AutoTodoDataPtr
AutoTodoData::NewFirstParty(
    const ::context_hub::FirstPartyData& value) {
  return AutoTodoDataPtr(
      std::in_place,
      std::in_place_index<static_cast<size_t>(Tag::kFirstParty)>,
      std::move(value));
}

AutoTodoDataPtr
AutoTodoData::NewThirdParty(
    const ::context_hub::ThirdPartyData& value) {
  return AutoTodoDataPtr(
      std::in_place,
      std::in_place_index<static_cast<size_t>(Tag::kThirdParty)>,
      std::move(value));
}

AutoTodoData::AutoTodoData(
    std::in_place_index_t<static_cast<size_t>(Tag::kFirstParty)>,
    const ::context_hub::FirstPartyData& value)
    : tag_(Tag::kFirstParty),
      data_(std::in_place_index<static_cast<size_t>(Tag::kFirstParty)>,
            std::move(value)) {}

AutoTodoData::AutoTodoData(
    std::in_place_index_t<static_cast<size_t>(Tag::kThirdParty)>,
    const ::context_hub::ThirdPartyData& value)
    : tag_(Tag::kThirdParty),
      data_(std::in_place_index<static_cast<size_t>(Tag::kThirdParty)>,
            std::move(value)) {}
AutoTodoData::~AutoTodoData() {
  DestroyActive();
}

void AutoTodoData::set_first_party(const ::context_hub::FirstPartyData& first_party) {
  if (tag_ == Tag::kFirstParty) {
    data_.first_party = std::move(first_party);
  } else {
    DestroyActive();
    tag_ = Tag::kFirstParty;
    new (&data_.first_party) ::context_hub::FirstPartyData(
        std::move(first_party));
  }
}

void AutoTodoData::set_third_party(const ::context_hub::ThirdPartyData& third_party) {
  if (tag_ == Tag::kThirdParty) {
    data_.third_party = std::move(third_party);
  } else {
    DestroyActive();
    tag_ = Tag::kThirdParty;
    new (&data_.third_party) ::context_hub::ThirdPartyData(
        std::move(third_party));
  }
}


AutoTodoData::Union_::Union_(
    std::in_place_index_t<static_cast<size_t>(Tag::kFirstParty)>,
    const ::context_hub::FirstPartyData& value)
    : first_party(std::move(value)) {}

AutoTodoData::Union_::Union_(
    std::in_place_index_t<static_cast<size_t>(Tag::kThirdParty)>,
    const ::context_hub::ThirdPartyData& value)
    : third_party(std::move(value)) {}

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

    case Tag::kFirstParty:
      std::destroy_at(&data_.first_party);
      break;
    case Tag::kThirdParty:
      std::destroy_at(&data_.third_party);
      break;
  }
}

bool AutoTodoData::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context, false);
}
// 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::kOnAutoTodosChanged: {
      return &Page::OnAutoTodosChanged_Sym::IPCStableHash;
    }
    case messages::Page::kOnFirstPartyAutoTodosGenerationStateChanged: {
      return &Page::OnFirstPartyAutoTodosGenerationStateChanged_Sym::IPCStableHash;
    }
    case messages::Page::kOnThirdPartyAutoTodosGenerationStateChanged: {
      return &Page::OnThirdPartyAutoTodosGenerationStateChanged_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::kOnAutoTodosChanged:
            return "Receive browser::context_hub::mojom::Page::OnAutoTodosChanged";
      case messages::Page::kOnFirstPartyAutoTodosGenerationStateChanged:
            return "Receive browser::context_hub::mojom::Page::OnFirstPartyAutoTodosGenerationStateChanged";
      case messages::Page::kOnThirdPartyAutoTodosGenerationStateChanged:
            return "Receive browser::context_hub::mojom::Page::OnThirdPartyAutoTodosGenerationStateChanged";
    }
  } else {
    switch (static_cast<messages::Page>(message.name())) {
      case messages::Page::kOnAutoTodosChanged:
            return "Receive reply browser::context_hub::mojom::Page::OnAutoTodosChanged";
      case messages::Page::kOnFirstPartyAutoTodosGenerationStateChanged:
            return "Receive reply browser::context_hub::mojom::Page::OnFirstPartyAutoTodosGenerationStateChanged";
      case messages::Page::kOnThirdPartyAutoTodosGenerationStateChanged:
            return "Receive reply browser::context_hub::mojom::Page::OnThirdPartyAutoTodosGenerationStateChanged";
    }
  }
  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::OnAutoTodosChanged_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 = 0x6bfe6da4;  // IPCStableHash for browser::context_hub::mojom::Page::OnAutoTodosChanged
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::OnFirstPartyAutoTodosGenerationStateChanged_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 = 0xddddba1b;  // IPCStableHash for browser::context_hub::mojom::Page::OnFirstPartyAutoTodosGenerationStateChanged
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::OnThirdPartyAutoTodosGenerationStateChanged_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 = 0xe686e17b;  // IPCStableHash for browser::context_hub::mojom::Page::OnThirdPartyAutoTodosGenerationStateChanged
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
# endif // !BUILDFLAG(IS_FUCHSIA)

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

void PageProxy::OnAutoTodosChanged(
    const std::vector<::context_hub::AutoTodoEntry>& in_todos) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send browser::context_hub::mojom::Page::OnAutoTodosChanged", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("todos"), in_todos,
                        "<value of type const std::vector<::context_hub::AutoTodoEntry>&>");
   });
#endif

  CHECK(base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTodos));
  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::kOnAutoTodosChanged), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::Page_OnAutoTodosChanged_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->todos)::BaseType>
      todos_fragment(params.message());
  constexpr const mojo::internal::ContainerValidateParams& todos_validate_params =
      mojo::internal::GetArrayValidator<0, false, nullptr>();
  
  mojo::internal::Serialize<mojo::ArrayDataView<::browser::context_hub::mojom::AutoTodoItemDataView>>(
    in_todos,
    todos_fragment,
    &todos_validate_params);

  params->todos.Set(
      todos_fragment.is_null() ? nullptr : todos_fragment.data());

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

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("OnAutoTodosChanged");
#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::OnFirstPartyAutoTodosGenerationStateChanged(
    bool in_is_generating) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send browser::context_hub::mojom::Page::OnFirstPartyAutoTodosGenerationStateChanged", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("is_generating"), in_is_generating,
                        "<value of type bool>");
   });
#endif

  CHECK(base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTodos));
  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::kOnFirstPartyAutoTodosGenerationStateChanged), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::Page_OnFirstPartyAutoTodosGenerationStateChanged_Params_Data> params(
          message);
  params.Allocate();

  params->is_generating = in_is_generating;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("OnFirstPartyAutoTodosGenerationStateChanged");
#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::OnThirdPartyAutoTodosGenerationStateChanged(
    bool in_is_generating) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send browser::context_hub::mojom::Page::OnThirdPartyAutoTodosGenerationStateChanged", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("is_generating"), in_is_generating,
                        "<value of type bool>");
   });
#endif

  CHECK(base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTodos));
  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::kOnThirdPartyAutoTodosGenerationStateChanged), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::Page_OnThirdPartyAutoTodosGenerationStateChanged_Params_Data> params(
          message);
  params.Allocate();

  params->is_generating = in_is_generating;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("OnThirdPartyAutoTodosGenerationStateChanged");
#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::kOnAutoTodosChanged: {
      DCHECK(message->is_serialized());
      internal::Page_OnAutoTodosChanged_Params_Data* params =
          reinterpret_cast<internal::Page_OnAutoTodosChanged_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.0
      bool success = true;
      std::vector<::context_hub::AutoTodoEntry> p_todos{};
      Page_OnAutoTodosChanged_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadTodos(&p_todos))
        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->OnAutoTodosChanged(        
        std::move(p_todos));
      return true;
    }
    case messages::Page::kOnFirstPartyAutoTodosGenerationStateChanged: {
      DCHECK(message->is_serialized());
      internal::Page_OnFirstPartyAutoTodosGenerationStateChanged_Params_Data* params =
          reinterpret_cast<internal::Page_OnFirstPartyAutoTodosGenerationStateChanged_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.1
      bool success = true;
      bool p_is_generating{};
      Page_OnFirstPartyAutoTodosGenerationStateChanged_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_is_generating = input_data_view.is_generating();
      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->OnFirstPartyAutoTodosGenerationStateChanged(        
        std::move(p_is_generating));
      return true;
    }
    case messages::Page::kOnThirdPartyAutoTodosGenerationStateChanged: {
      DCHECK(message->is_serialized());
      internal::Page_OnThirdPartyAutoTodosGenerationStateChanged_Params_Data* params =
          reinterpret_cast<internal::Page_OnThirdPartyAutoTodosGenerationStateChanged_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.2
      bool success = true;
      bool p_is_generating{};
      Page_OnThirdPartyAutoTodosGenerationStateChanged_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_is_generating = input_data_view.is_generating();
      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->OnThirdPartyAutoTodosGenerationStateChanged(        
        std::move(p_is_generating));
      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::kOnAutoTodosChanged: {
      break;
    }
    case messages::Page::kOnFirstPartyAutoTodosGenerationStateChanged: {
      break;
    }
    case messages::Page::kOnThirdPartyAutoTodosGenerationStateChanged: {
      break;
    }
  }
  return false;
}
namespace {

bool ValidateWithRuntimeFeature_Page_OnAutoTodosChanged(
  const void* data, mojo::internal::ValidationContext* validation_context) {
  if (!base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTodos)) {
    return false;
  }
  return internal::Page_OnAutoTodosChanged_Params_Data::Validate(
    data, validation_context);
}

bool ValidateWithRuntimeFeature_Page_OnFirstPartyAutoTodosGenerationStateChanged(
  const void* data, mojo::internal::ValidationContext* validation_context) {
  if (!base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTodos)) {
    return false;
  }
  return internal::Page_OnFirstPartyAutoTodosGenerationStateChanged_Params_Data::Validate(
    data, validation_context);
}

bool ValidateWithRuntimeFeature_Page_OnThirdPartyAutoTodosGenerationStateChanged(
  const void* data, mojo::internal::ValidationContext* validation_context) {
  if (!base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTodos)) {
    return false;
  }
  return internal::Page_OnThirdPartyAutoTodosGenerationStateChanged_Params_Data::Validate(
    data, validation_context);
}
}  // namespace
static const mojo::internal::GenericValidationInfo kPageValidationInfo[] = {
    { &ValidateWithRuntimeFeature_Page_OnAutoTodosChanged,
     nullptr /* no response */},
    { &ValidateWithRuntimeFeature_Page_OnFirstPartyAutoTodosGenerationStateChanged,
     nullptr /* no response */},
    { &ValidateWithRuntimeFeature_Page_OnThirdPartyAutoTodosGenerationStateChanged,
     nullptr /* no response */},
};

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

// 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 browser::context_hub::mojom::PageHandlerFactory::CreatePageHandler";
    }
  } else {
    switch (static_cast<messages::PageHandlerFactory>(message.name())) {
      case messages::PageHandlerFactory::kCreatePageHandler:
            return "Receive reply browser::context_hub::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 = 0x6e1ec819;  // IPCStableHash for browser::context_hub::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 browser::context_hub::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<
      ::browser::context_hub::mojom::internal::PageHandlerFactory_CreatePageHandler_Params_Data> params(
          message);
  params.Allocate();

  
  mojo::internal::Serialize<mojo::InterfacePtrDataView<::browser::context_hub::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<::browser::context_hub::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,
    ::browser::context_hub::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::kGenerateFirstPartyAutoTodos: {
      return &PageHandler::GenerateFirstPartyAutoTodos_Sym::IPCStableHash;
    }
    case messages::PageHandler::kGetAutoTodos: {
      return &PageHandler::GetAutoTodos_Sym::IPCStableHash;
    }
    case messages::PageHandler::kUpdateAutoTodo: {
      return &PageHandler::UpdateAutoTodo_Sym::IPCStableHash;
    }
    case messages::PageHandler::kGenerateTabBasedTodos: {
      return &PageHandler::GenerateTabBasedTodos_Sym::IPCStableHash;
    }
    case messages::PageHandler::kSetTodoFeedback: {
      return &PageHandler::SetTodoFeedback_Sym::IPCStableHash;
    }
    case messages::PageHandler::kDeleteTodoFeedback: {
      return &PageHandler::DeleteTodoFeedback_Sym::IPCStableHash;
    }
    case messages::PageHandler::kClearTodoFeedbacks: {
      return &PageHandler::ClearTodoFeedbacks_Sym::IPCStableHash;
    }
    case messages::PageHandler::kGetTodoFeedbacks: {
      return &PageHandler::GetTodoFeedbacks_Sym::IPCStableHash;
    }
    case messages::PageHandler::kGetSaveToMemoryBankContext: {
      return &PageHandler::GetSaveToMemoryBankContext_Sym::IPCStableHash;
    }
    case messages::PageHandler::kGetAllMemoryBankEntries: {
      return &PageHandler::GetAllMemoryBankEntries_Sym::IPCStableHash;
    }
    case messages::PageHandler::kDeleteMemoryBankEntries: {
      return &PageHandler::DeleteMemoryBankEntries_Sym::IPCStableHash;
    }
    case messages::PageHandler::kSaveMemoryBankEntry: {
      return &PageHandler::SaveMemoryBankEntry_Sym::IPCStableHash;
    }
    case messages::PageHandler::kGetAllMemoryBankTags: {
      return &PageHandler::GetAllMemoryBankTags_Sym::IPCStableHash;
    }
    case messages::PageHandler::kGetAllMemoryBankCollections: {
      return &PageHandler::GetAllMemoryBankCollections_Sym::IPCStableHash;
    }
    case messages::PageHandler::kGetTabs: {
      return &PageHandler::GetTabs_Sym::IPCStableHash;
    }
    case messages::PageHandler::kRetrieveAndGroupTabs: {
      return &PageHandler::RetrieveAndGroupTabs_Sym::IPCStableHash;
    }
    case messages::PageHandler::kGetExistingTabGroupsAndChats: {
      return &PageHandler::GetExistingTabGroupsAndChats_Sym::IPCStableHash;
    }
    case messages::PageHandler::kSwitchToTab: {
      return &PageHandler::SwitchToTab_Sym::IPCStableHash;
    }
    case messages::PageHandler::kCloseTab: {
      return &PageHandler::CloseTab_Sym::IPCStableHash;
    }
    case messages::PageHandler::kClearTabGroups: {
      return &PageHandler::ClearTabGroups_Sym::IPCStableHash;
    }
    case messages::PageHandler::kClearTabGroupChatHistory: {
      return &PageHandler::ClearTabGroupChatHistory_Sym::IPCStableHash;
    }
    case messages::PageHandler::kAskGeminiWithContext: {
      return &PageHandler::AskGeminiWithContext_Sym::IPCStableHash;
    }
    case messages::PageHandler::kConfirmAllTabGroups: {
      return &PageHandler::ConfirmAllTabGroups_Sym::IPCStableHash;
    }
    case messages::PageHandler::kGetConfirmedTabGroups: {
      return &PageHandler::GetConfirmedTabGroups_Sym::IPCStableHash;
    }
    case messages::PageHandler::kRemoveConfirmedTabGroup: {
      return &PageHandler::RemoveConfirmedTabGroup_Sym::IPCStableHash;
    }
    case messages::PageHandler::kCloseConfirmedTabGroup: {
      return &PageHandler::CloseConfirmedTabGroup_Sym::IPCStableHash;
    }
    case messages::PageHandler::kRemoveAllConfirmedTabGroups: {
      return &PageHandler::RemoveAllConfirmedTabGroups_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::kGenerateFirstPartyAutoTodos:
            return "Receive browser::context_hub::mojom::PageHandler::GenerateFirstPartyAutoTodos";
      case messages::PageHandler::kGetAutoTodos:
            return "Receive browser::context_hub::mojom::PageHandler::GetAutoTodos";
      case messages::PageHandler::kUpdateAutoTodo:
            return "Receive browser::context_hub::mojom::PageHandler::UpdateAutoTodo";
      case messages::PageHandler::kGenerateTabBasedTodos:
            return "Receive browser::context_hub::mojom::PageHandler::GenerateTabBasedTodos";
      case messages::PageHandler::kSetTodoFeedback:
            return "Receive browser::context_hub::mojom::PageHandler::SetTodoFeedback";
      case messages::PageHandler::kDeleteTodoFeedback:
            return "Receive browser::context_hub::mojom::PageHandler::DeleteTodoFeedback";
      case messages::PageHandler::kClearTodoFeedbacks:
            return "Receive browser::context_hub::mojom::PageHandler::ClearTodoFeedbacks";
      case messages::PageHandler::kGetTodoFeedbacks:
            return "Receive browser::context_hub::mojom::PageHandler::GetTodoFeedbacks";
      case messages::PageHandler::kGetSaveToMemoryBankContext:
            return "Receive browser::context_hub::mojom::PageHandler::GetSaveToMemoryBankContext";
      case messages::PageHandler::kGetAllMemoryBankEntries:
            return "Receive browser::context_hub::mojom::PageHandler::GetAllMemoryBankEntries";
      case messages::PageHandler::kDeleteMemoryBankEntries:
            return "Receive browser::context_hub::mojom::PageHandler::DeleteMemoryBankEntries";
      case messages::PageHandler::kSaveMemoryBankEntry:
            return "Receive browser::context_hub::mojom::PageHandler::SaveMemoryBankEntry";
      case messages::PageHandler::kGetAllMemoryBankTags:
            return "Receive browser::context_hub::mojom::PageHandler::GetAllMemoryBankTags";
      case messages::PageHandler::kGetAllMemoryBankCollections:
            return "Receive browser::context_hub::mojom::PageHandler::GetAllMemoryBankCollections";
      case messages::PageHandler::kGetTabs:
            return "Receive browser::context_hub::mojom::PageHandler::GetTabs";
      case messages::PageHandler::kRetrieveAndGroupTabs:
            return "Receive browser::context_hub::mojom::PageHandler::RetrieveAndGroupTabs";
      case messages::PageHandler::kGetExistingTabGroupsAndChats:
            return "Receive browser::context_hub::mojom::PageHandler::GetExistingTabGroupsAndChats";
      case messages::PageHandler::kSwitchToTab:
            return "Receive browser::context_hub::mojom::PageHandler::SwitchToTab";
      case messages::PageHandler::kCloseTab:
            return "Receive browser::context_hub::mojom::PageHandler::CloseTab";
      case messages::PageHandler::kClearTabGroups:
            return "Receive browser::context_hub::mojom::PageHandler::ClearTabGroups";
      case messages::PageHandler::kClearTabGroupChatHistory:
            return "Receive browser::context_hub::mojom::PageHandler::ClearTabGroupChatHistory";
      case messages::PageHandler::kAskGeminiWithContext:
            return "Receive browser::context_hub::mojom::PageHandler::AskGeminiWithContext";
      case messages::PageHandler::kConfirmAllTabGroups:
            return "Receive browser::context_hub::mojom::PageHandler::ConfirmAllTabGroups";
      case messages::PageHandler::kGetConfirmedTabGroups:
            return "Receive browser::context_hub::mojom::PageHandler::GetConfirmedTabGroups";
      case messages::PageHandler::kRemoveConfirmedTabGroup:
            return "Receive browser::context_hub::mojom::PageHandler::RemoveConfirmedTabGroup";
      case messages::PageHandler::kCloseConfirmedTabGroup:
            return "Receive browser::context_hub::mojom::PageHandler::CloseConfirmedTabGroup";
      case messages::PageHandler::kRemoveAllConfirmedTabGroups:
            return "Receive browser::context_hub::mojom::PageHandler::RemoveAllConfirmedTabGroups";
    }
  } else {
    switch (static_cast<messages::PageHandler>(message.name())) {
      case messages::PageHandler::kGenerateFirstPartyAutoTodos:
            return "Receive reply browser::context_hub::mojom::PageHandler::GenerateFirstPartyAutoTodos";
      case messages::PageHandler::kGetAutoTodos:
            return "Receive reply browser::context_hub::mojom::PageHandler::GetAutoTodos";
      case messages::PageHandler::kUpdateAutoTodo:
            return "Receive reply browser::context_hub::mojom::PageHandler::UpdateAutoTodo";
      case messages::PageHandler::kGenerateTabBasedTodos:
            return "Receive reply browser::context_hub::mojom::PageHandler::GenerateTabBasedTodos";
      case messages::PageHandler::kSetTodoFeedback:
            return "Receive reply browser::context_hub::mojom::PageHandler::SetTodoFeedback";
      case messages::PageHandler::kDeleteTodoFeedback:
            return "Receive reply browser::context_hub::mojom::PageHandler::DeleteTodoFeedback";
      case messages::PageHandler::kClearTodoFeedbacks:
            return "Receive reply browser::context_hub::mojom::PageHandler::ClearTodoFeedbacks";
      case messages::PageHandler::kGetTodoFeedbacks:
            return "Receive reply browser::context_hub::mojom::PageHandler::GetTodoFeedbacks";
      case messages::PageHandler::kGetSaveToMemoryBankContext:
            return "Receive reply browser::context_hub::mojom::PageHandler::GetSaveToMemoryBankContext";
      case messages::PageHandler::kGetAllMemoryBankEntries:
            return "Receive reply browser::context_hub::mojom::PageHandler::GetAllMemoryBankEntries";
      case messages::PageHandler::kDeleteMemoryBankEntries:
            return "Receive reply browser::context_hub::mojom::PageHandler::DeleteMemoryBankEntries";
      case messages::PageHandler::kSaveMemoryBankEntry:
            return "Receive reply browser::context_hub::mojom::PageHandler::SaveMemoryBankEntry";
      case messages::PageHandler::kGetAllMemoryBankTags:
            return "Receive reply browser::context_hub::mojom::PageHandler::GetAllMemoryBankTags";
      case messages::PageHandler::kGetAllMemoryBankCollections:
            return "Receive reply browser::context_hub::mojom::PageHandler::GetAllMemoryBankCollections";
      case messages::PageHandler::kGetTabs:
            return "Receive reply browser::context_hub::mojom::PageHandler::GetTabs";
      case messages::PageHandler::kRetrieveAndGroupTabs:
            return "Receive reply browser::context_hub::mojom::PageHandler::RetrieveAndGroupTabs";
      case messages::PageHandler::kGetExistingTabGroupsAndChats:
            return "Receive reply browser::context_hub::mojom::PageHandler::GetExistingTabGroupsAndChats";
      case messages::PageHandler::kSwitchToTab:
            return "Receive reply browser::context_hub::mojom::PageHandler::SwitchToTab";
      case messages::PageHandler::kCloseTab:
            return "Receive reply browser::context_hub::mojom::PageHandler::CloseTab";
      case messages::PageHandler::kClearTabGroups:
            return "Receive reply browser::context_hub::mojom::PageHandler::ClearTabGroups";
      case messages::PageHandler::kClearTabGroupChatHistory:
            return "Receive reply browser::context_hub::mojom::PageHandler::ClearTabGroupChatHistory";
      case messages::PageHandler::kAskGeminiWithContext:
            return "Receive reply browser::context_hub::mojom::PageHandler::AskGeminiWithContext";
      case messages::PageHandler::kConfirmAllTabGroups:
            return "Receive reply browser::context_hub::mojom::PageHandler::ConfirmAllTabGroups";
      case messages::PageHandler::kGetConfirmedTabGroups:
            return "Receive reply browser::context_hub::mojom::PageHandler::GetConfirmedTabGroups";
      case messages::PageHandler::kRemoveConfirmedTabGroup:
            return "Receive reply browser::context_hub::mojom::PageHandler::RemoveConfirmedTabGroup";
      case messages::PageHandler::kCloseConfirmedTabGroup:
            return "Receive reply browser::context_hub::mojom::PageHandler::CloseConfirmedTabGroup";
      case messages::PageHandler::kRemoveAllConfirmedTabGroups:
            return "Receive reply browser::context_hub::mojom::PageHandler::RemoveAllConfirmedTabGroups";
    }
  }
  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::GenerateFirstPartyAutoTodos_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 = 0xf5087f7a;  // IPCStableHash for browser::context_hub::mojom::PageHandler::GenerateFirstPartyAutoTodos
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::GetAutoTodos_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 = 0x4ed4b705;  // IPCStableHash for browser::context_hub::mojom::PageHandler::GetAutoTodos
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::UpdateAutoTodo_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 = 0x09410ef9;  // IPCStableHash for browser::context_hub::mojom::PageHandler::UpdateAutoTodo
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::GenerateTabBasedTodos_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 = 0x5ac1eac5;  // IPCStableHash for browser::context_hub::mojom::PageHandler::GenerateTabBasedTodos
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::SetTodoFeedback_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 = 0x48699c9b;  // IPCStableHash for browser::context_hub::mojom::PageHandler::SetTodoFeedback
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::DeleteTodoFeedback_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 = 0x8ef65695;  // IPCStableHash for browser::context_hub::mojom::PageHandler::DeleteTodoFeedback
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::ClearTodoFeedbacks_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 = 0x4a8dd9fc;  // IPCStableHash for browser::context_hub::mojom::PageHandler::ClearTodoFeedbacks
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::GetTodoFeedbacks_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 = 0x399ef4c2;  // IPCStableHash for browser::context_hub::mojom::PageHandler::GetTodoFeedbacks
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::GetSaveToMemoryBankContext_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 = 0x9da2d07f;  // IPCStableHash for browser::context_hub::mojom::PageHandler::GetSaveToMemoryBankContext
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::GetAllMemoryBankEntries_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 = 0xca6022fa;  // IPCStableHash for browser::context_hub::mojom::PageHandler::GetAllMemoryBankEntries
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::DeleteMemoryBankEntries_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 = 0x7d1d2b56;  // IPCStableHash for browser::context_hub::mojom::PageHandler::DeleteMemoryBankEntries
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::SaveMemoryBankEntry_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 = 0xee4fd526;  // IPCStableHash for browser::context_hub::mojom::PageHandler::SaveMemoryBankEntry
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::GetAllMemoryBankTags_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 = 0x1ce7dfee;  // IPCStableHash for browser::context_hub::mojom::PageHandler::GetAllMemoryBankTags
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::GetAllMemoryBankCollections_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 = 0xb0739aad;  // IPCStableHash for browser::context_hub::mojom::PageHandler::GetAllMemoryBankCollections
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::GetTabs_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 = 0x6bd51346;  // IPCStableHash for browser::context_hub::mojom::PageHandler::GetTabs
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::RetrieveAndGroupTabs_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 = 0xfa85313c;  // IPCStableHash for browser::context_hub::mojom::PageHandler::RetrieveAndGroupTabs
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::GetExistingTabGroupsAndChats_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 = 0x28a70ace;  // IPCStableHash for browser::context_hub::mojom::PageHandler::GetExistingTabGroupsAndChats
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::SwitchToTab_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 = 0x597717e6;  // IPCStableHash for browser::context_hub::mojom::PageHandler::SwitchToTab
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::CloseTab_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 = 0x9eca28d5;  // IPCStableHash for browser::context_hub::mojom::PageHandler::CloseTab
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::ClearTabGroups_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 = 0xb0f9fe0c;  // IPCStableHash for browser::context_hub::mojom::PageHandler::ClearTabGroups
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::ClearTabGroupChatHistory_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 = 0xf7d70ae5;  // IPCStableHash for browser::context_hub::mojom::PageHandler::ClearTabGroupChatHistory
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::AskGeminiWithContext_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 = 0xb0c8d6bf;  // IPCStableHash for browser::context_hub::mojom::PageHandler::AskGeminiWithContext
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::ConfirmAllTabGroups_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 = 0x07c1a60f;  // IPCStableHash for browser::context_hub::mojom::PageHandler::ConfirmAllTabGroups
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::GetConfirmedTabGroups_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 = 0x7b00b41f;  // IPCStableHash for browser::context_hub::mojom::PageHandler::GetConfirmedTabGroups
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::RemoveConfirmedTabGroup_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 = 0xc286f425;  // IPCStableHash for browser::context_hub::mojom::PageHandler::RemoveConfirmedTabGroup
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::CloseConfirmedTabGroup_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 = 0x29734430;  // IPCStableHash for browser::context_hub::mojom::PageHandler::CloseConfirmedTabGroup
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::RemoveAllConfirmedTabGroups_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 = 0x60ef18be;  // IPCStableHash for browser::context_hub::mojom::PageHandler::RemoveAllConfirmedTabGroups
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
# endif // !BUILDFLAG(IS_FUCHSIA)

class PageHandler_GenerateFirstPartyAutoTodos_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_GenerateFirstPartyAutoTodos_ForwardToCallback(
      PageHandler::GenerateFirstPartyAutoTodosCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_GetAutoTodos_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_GetAutoTodos_ForwardToCallback(
      PageHandler::GetAutoTodosCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_UpdateAutoTodo_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_UpdateAutoTodo_ForwardToCallback(
      PageHandler::UpdateAutoTodoCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_GenerateTabBasedTodos_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_GenerateTabBasedTodos_ForwardToCallback(
      PageHandler::GenerateTabBasedTodosCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_SetTodoFeedback_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_SetTodoFeedback_ForwardToCallback(
      PageHandler::SetTodoFeedbackCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_DeleteTodoFeedback_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_DeleteTodoFeedback_ForwardToCallback(
      PageHandler::DeleteTodoFeedbackCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_ClearTodoFeedbacks_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_ClearTodoFeedbacks_ForwardToCallback(
      PageHandler::ClearTodoFeedbacksCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_GetTodoFeedbacks_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_GetTodoFeedbacks_ForwardToCallback(
      PageHandler::GetTodoFeedbacksCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_GetSaveToMemoryBankContext_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_GetSaveToMemoryBankContext_ForwardToCallback(
      PageHandler::GetSaveToMemoryBankContextCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_GetAllMemoryBankEntries_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_GetAllMemoryBankEntries_ForwardToCallback(
      PageHandler::GetAllMemoryBankEntriesCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_DeleteMemoryBankEntries_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_DeleteMemoryBankEntries_ForwardToCallback(
      PageHandler::DeleteMemoryBankEntriesCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_SaveMemoryBankEntry_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_SaveMemoryBankEntry_ForwardToCallback(
      PageHandler::SaveMemoryBankEntryCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_GetAllMemoryBankTags_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_GetAllMemoryBankTags_ForwardToCallback(
      PageHandler::GetAllMemoryBankTagsCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_GetAllMemoryBankCollections_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_GetAllMemoryBankCollections_ForwardToCallback(
      PageHandler::GetAllMemoryBankCollectionsCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_GetTabs_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_GetTabs_ForwardToCallback(
      PageHandler::GetTabsCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_RetrieveAndGroupTabs_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_RetrieveAndGroupTabs_ForwardToCallback(
      PageHandler::RetrieveAndGroupTabsCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_GetExistingTabGroupsAndChats_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_GetExistingTabGroupsAndChats_ForwardToCallback(
      PageHandler::GetExistingTabGroupsAndChatsCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_ClearTabGroups_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_ClearTabGroups_ForwardToCallback(
      PageHandler::ClearTabGroupsCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_ClearTabGroupChatHistory_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_ClearTabGroupChatHistory_ForwardToCallback(
      PageHandler::ClearTabGroupChatHistoryCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_AskGeminiWithContext_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_AskGeminiWithContext_ForwardToCallback(
      PageHandler::AskGeminiWithContextCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_ConfirmAllTabGroups_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_ConfirmAllTabGroups_ForwardToCallback(
      PageHandler::ConfirmAllTabGroupsCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_GetConfirmedTabGroups_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_GetConfirmedTabGroups_ForwardToCallback(
      PageHandler::GetConfirmedTabGroupsCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_RemoveConfirmedTabGroup_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_RemoveConfirmedTabGroup_ForwardToCallback(
      PageHandler::RemoveConfirmedTabGroupCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_CloseConfirmedTabGroup_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_CloseConfirmedTabGroup_ForwardToCallback(
      PageHandler::CloseConfirmedTabGroupCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_RemoveAllConfirmedTabGroups_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_RemoveAllConfirmedTabGroups_ForwardToCallback(
      PageHandler::RemoveAllConfirmedTabGroupsCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

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

void PageHandlerProxy::GenerateFirstPartyAutoTodos(
    GenerateFirstPartyAutoTodosCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send browser::context_hub::mojom::PageHandler::GenerateFirstPartyAutoTodos");
#endif

  CHECK(base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTodos));
  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::kGenerateFirstPartyAutoTodos), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_GenerateFirstPartyAutoTodos_Params_Data> params(
          message);
  params.Allocate();

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

void PageHandlerProxy::GetAutoTodos(
    GetAutoTodosCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send browser::context_hub::mojom::PageHandler::GetAutoTodos");
#endif

  CHECK(base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTodos));
  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::kGetAutoTodos), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_GetAutoTodos_Params_Data> params(
          message);
  params.Allocate();

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

void PageHandlerProxy::UpdateAutoTodo(
    const ::context_hub::AutoTodoEntry& in_todo, UpdateAutoTodoCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send browser::context_hub::mojom::PageHandler::UpdateAutoTodo", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("todo"), in_todo,
                        "<value of type const ::context_hub::AutoTodoEntry&>");
   });
#endif

  CHECK(base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTodos));
  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::kUpdateAutoTodo), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_UpdateAutoTodo_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->todo)::BaseType> todo_fragment(
          params.message());
  
  mojo::internal::Serialize<::browser::context_hub::mojom::AutoTodoItemDataView>(
    in_todo,
    todo_fragment);

  params->todo.Set(
      todo_fragment.is_null() ? nullptr : todo_fragment.data());

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

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

void PageHandlerProxy::GenerateTabBasedTodos(
    GenerateTabBasedTodosCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send browser::context_hub::mojom::PageHandler::GenerateTabBasedTodos");
#endif

  CHECK(base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTodos));
  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::kGenerateTabBasedTodos), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_GenerateTabBasedTodos_Params_Data> params(
          message);
  params.Allocate();

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

void PageHandlerProxy::SetTodoFeedback(
    AutoTodoItemFeedbackPtr in_feedback, SetTodoFeedbackCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send browser::context_hub::mojom::PageHandler::SetTodoFeedback", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("feedback"), in_feedback,
                        "<value of type AutoTodoItemFeedbackPtr>");
   });
#endif

  CHECK(base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTodos));
  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::kSetTodoFeedback), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_SetTodoFeedback_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->feedback)::BaseType> feedback_fragment(
          params.message());
  
  mojo::internal::Serialize<::browser::context_hub::mojom::AutoTodoItemFeedbackDataView>(
    in_feedback,
    feedback_fragment);

  params->feedback.Set(
      feedback_fragment.is_null() ? nullptr : feedback_fragment.data());

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

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

void PageHandlerProxy::DeleteTodoFeedback(
    const std::string& in_id, DeleteTodoFeedbackCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send browser::context_hub::mojom::PageHandler::DeleteTodoFeedback", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("id"), in_id,
                        "<value of type const std::string&>");
   });
#endif

  CHECK(base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTodos));
  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::kDeleteTodoFeedback), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_DeleteTodoFeedback_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->id)::BaseType> id_fragment(
          params.message());
  
  mojo::internal::Serialize<mojo::StringDataView>(
    in_id,
    id_fragment);

  params->id.Set(
      id_fragment.is_null() ? nullptr : id_fragment.data());

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

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

void PageHandlerProxy::ClearTodoFeedbacks(
    ClearTodoFeedbacksCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send browser::context_hub::mojom::PageHandler::ClearTodoFeedbacks");
#endif

  CHECK(base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTodos));
  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::kClearTodoFeedbacks), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_ClearTodoFeedbacks_Params_Data> params(
          message);
  params.Allocate();

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

void PageHandlerProxy::GetTodoFeedbacks(
    GetTodoFeedbacksCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send browser::context_hub::mojom::PageHandler::GetTodoFeedbacks");
#endif

  CHECK(base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTodos));
  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::kGetTodoFeedbacks), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_GetTodoFeedbacks_Params_Data> params(
          message);
  params.Allocate();

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

void PageHandlerProxy::GetSaveToMemoryBankContext(
    GetSaveToMemoryBankContextCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send browser::context_hub::mojom::PageHandler::GetSaveToMemoryBankContext");
#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::kGetSaveToMemoryBankContext), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_GetSaveToMemoryBankContext_Params_Data> params(
          message);
  params.Allocate();

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

void PageHandlerProxy::GetAllMemoryBankEntries(
    GetAllMemoryBankEntriesCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send browser::context_hub::mojom::PageHandler::GetAllMemoryBankEntries");
#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::kGetAllMemoryBankEntries), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_GetAllMemoryBankEntries_Params_Data> params(
          message);
  params.Allocate();

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

void PageHandlerProxy::DeleteMemoryBankEntries(
    const std::vector<int64_t>& in_ids, DeleteMemoryBankEntriesCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send browser::context_hub::mojom::PageHandler::DeleteMemoryBankEntries", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("ids"), in_ids,
                        "<value of type const std::vector<int64_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::kDeleteMemoryBankEntries), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_DeleteMemoryBankEntries_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<int64_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 PageHandler.DeleteMemoryBankEntries request");

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

void PageHandlerProxy::SaveMemoryBankEntry(
    MemoryBankEntryAnnotationsPtr in_annotations, SaveMemoryBankEntryCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send browser::context_hub::mojom::PageHandler::SaveMemoryBankEntry", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("annotations"), in_annotations,
                        "<value of type MemoryBankEntryAnnotationsPtr>");
   });
#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::kSaveMemoryBankEntry), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_SaveMemoryBankEntry_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->annotations)::BaseType> annotations_fragment(
          params.message());
  
  mojo::internal::Serialize<::browser::context_hub::mojom::MemoryBankEntryAnnotationsDataView>(
    in_annotations,
    annotations_fragment);

  params->annotations.Set(
      annotations_fragment.is_null() ? nullptr : annotations_fragment.data());

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

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

void PageHandlerProxy::GetAllMemoryBankTags(
    GetAllMemoryBankTagsCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send browser::context_hub::mojom::PageHandler::GetAllMemoryBankTags");
#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::kGetAllMemoryBankTags), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_GetAllMemoryBankTags_Params_Data> params(
          message);
  params.Allocate();

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

void PageHandlerProxy::GetAllMemoryBankCollections(
    GetAllMemoryBankCollectionsCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send browser::context_hub::mojom::PageHandler::GetAllMemoryBankCollections");
#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::kGetAllMemoryBankCollections), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_GetAllMemoryBankCollections_Params_Data> params(
          message);
  params.Allocate();

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

void PageHandlerProxy::GetTabs(
    GetTabsCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send browser::context_hub::mojom::PageHandler::GetTabs");
#endif

  CHECK(base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTabGroups));
  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::kGetTabs), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_GetTabs_Params_Data> params(
          message);
  params.Allocate();

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

void PageHandlerProxy::RetrieveAndGroupTabs(
    const std::string& in_user_command, RetrieveAndGroupTabsCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send browser::context_hub::mojom::PageHandler::RetrieveAndGroupTabs", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("user_command"), in_user_command,
                        "<value of type const std::string&>");
   });
#endif

  CHECK(base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTabGroups));
  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::kRetrieveAndGroupTabs), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_RetrieveAndGroupTabs_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->user_command)::BaseType> user_command_fragment(
          params.message());
  
  mojo::internal::Serialize<mojo::StringDataView>(
    in_user_command,
    user_command_fragment);

  params->user_command.Set(
      user_command_fragment.is_null() ? nullptr : user_command_fragment.data());

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

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

void PageHandlerProxy::GetExistingTabGroupsAndChats(
    GetExistingTabGroupsAndChatsCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send browser::context_hub::mojom::PageHandler::GetExistingTabGroupsAndChats");
#endif

  CHECK(base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTabGroups));
  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::kGetExistingTabGroupsAndChats), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_GetExistingTabGroupsAndChats_Params_Data> params(
          message);
  params.Allocate();

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

void PageHandlerProxy::SwitchToTab(
    int64_t in_tab_id) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send browser::context_hub::mojom::PageHandler::SwitchToTab", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("tab_id"), in_tab_id,
                        "<value of type int64_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::kSwitchToTab), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_SwitchToTab_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("SwitchToTab");
#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::CloseTab(
    int64_t in_tab_id) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send browser::context_hub::mojom::PageHandler::CloseTab", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("tab_id"), in_tab_id,
                        "<value of type int64_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::kCloseTab), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_CloseTab_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("CloseTab");
#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::ClearTabGroups(
    ClearTabGroupsCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send browser::context_hub::mojom::PageHandler::ClearTabGroups");
#endif

  CHECK(base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTabGroups));
  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::kClearTabGroups), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_ClearTabGroups_Params_Data> params(
          message);
  params.Allocate();

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

void PageHandlerProxy::ClearTabGroupChatHistory(
    ClearTabGroupChatHistoryCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send browser::context_hub::mojom::PageHandler::ClearTabGroupChatHistory");
#endif

  CHECK(base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTabGroups));
  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::kClearTabGroupChatHistory), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_ClearTabGroupChatHistory_Params_Data> params(
          message);
  params.Allocate();

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

void PageHandlerProxy::AskGeminiWithContext(
    const std::string& in_user_command, const std::vector<int64_t>& in_memory_bank_entry_ids, AskGeminiWithContextCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send browser::context_hub::mojom::PageHandler::AskGeminiWithContext", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("user_command"), in_user_command,
                        "<value of type const std::string&>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("memory_bank_entry_ids"), in_memory_bank_entry_ids,
                        "<value of type const std::vector<int64_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::kAskGeminiWithContext), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_AskGeminiWithContext_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->user_command)::BaseType> user_command_fragment(
          params.message());
  
  mojo::internal::Serialize<mojo::StringDataView>(
    in_user_command,
    user_command_fragment);

  params->user_command.Set(
      user_command_fragment.is_null() ? nullptr : user_command_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->user_command.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null user_command in PageHandler.AskGeminiWithContext request");
  mojo::internal::MessageFragment<
      typename decltype(params->memory_bank_entry_ids)::BaseType>
      memory_bank_entry_ids_fragment(params.message());
  constexpr const mojo::internal::ContainerValidateParams& memory_bank_entry_ids_validate_params =
      mojo::internal::GetArrayValidator<0, false, nullptr>();
  
  mojo::internal::Serialize<mojo::ArrayDataView<int64_t>>(
    in_memory_bank_entry_ids,
    memory_bank_entry_ids_fragment,
    &memory_bank_entry_ids_validate_params);

  params->memory_bank_entry_ids.Set(
      memory_bank_entry_ids_fragment.is_null() ? nullptr : memory_bank_entry_ids_fragment.data());

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

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

void PageHandlerProxy::ConfirmAllTabGroups(
    ConfirmAllTabGroupsCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send browser::context_hub::mojom::PageHandler::ConfirmAllTabGroups");
#endif

  CHECK(base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTabGroups));
  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::kConfirmAllTabGroups), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_ConfirmAllTabGroups_Params_Data> params(
          message);
  params.Allocate();

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

void PageHandlerProxy::GetConfirmedTabGroups(
    GetConfirmedTabGroupsCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send browser::context_hub::mojom::PageHandler::GetConfirmedTabGroups");
#endif

  CHECK(base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTabGroups));
  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::kGetConfirmedTabGroups), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_GetConfirmedTabGroups_Params_Data> params(
          message);
  params.Allocate();

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

void PageHandlerProxy::RemoveConfirmedTabGroup(
    const ::base::Uuid& in_saved_guid, RemoveConfirmedTabGroupCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send browser::context_hub::mojom::PageHandler::RemoveConfirmedTabGroup", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("saved_guid"), in_saved_guid,
                        "<value of type const ::base::Uuid&>");
   });
#endif

  CHECK(base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTabGroups));
  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::kRemoveConfirmedTabGroup), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_RemoveConfirmedTabGroup_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->saved_guid)::BaseType> saved_guid_fragment(
          params.message());
  
  mojo::internal::Serialize<::mojo_base::mojom::UuidDataView>(
    in_saved_guid,
    saved_guid_fragment);

  params->saved_guid.Set(
      saved_guid_fragment.is_null() ? nullptr : saved_guid_fragment.data());

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

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

void PageHandlerProxy::CloseConfirmedTabGroup(
    const ::base::Uuid& in_saved_guid, CloseConfirmedTabGroupCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send browser::context_hub::mojom::PageHandler::CloseConfirmedTabGroup", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("saved_guid"), in_saved_guid,
                        "<value of type const ::base::Uuid&>");
   });
#endif

  CHECK(base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTabGroups));
  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::kCloseConfirmedTabGroup), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_CloseConfirmedTabGroup_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->saved_guid)::BaseType> saved_guid_fragment(
          params.message());
  
  mojo::internal::Serialize<::mojo_base::mojom::UuidDataView>(
    in_saved_guid,
    saved_guid_fragment);

  params->saved_guid.Set(
      saved_guid_fragment.is_null() ? nullptr : saved_guid_fragment.data());

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

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

void PageHandlerProxy::RemoveAllConfirmedTabGroups(
    RemoveAllConfirmedTabGroupsCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send browser::context_hub::mojom::PageHandler::RemoveAllConfirmedTabGroups");
#endif

  CHECK(base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTabGroups));
  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::kRemoveAllConfirmedTabGroups), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_RemoveAllConfirmedTabGroups_Params_Data> params(
          message);
  params.Allocate();

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

  ~PageHandler_GenerateFirstPartyAutoTodos_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_GenerateFirstPartyAutoTodos_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::GenerateFirstPartyAutoTodosCallback 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(
      bool in_success);
};

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

  // Validation for PageHandler.0
  bool success = true;
  bool p_success{};
  PageHandler_GenerateFirstPartyAutoTodos_ResponseParamsDataView input_data_view(params, message);
  
  if (success)
    p_success = input_data_view.success();
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 0, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_success));
  }
  return true;
}

void PageHandler_GenerateFirstPartyAutoTodos_ProxyToResponder::Run(
    bool in_success) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply browser::context_hub::mojom::PageHandler::GenerateFirstPartyAutoTodos", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("success"), in_success,
                        "<value of type bool>");
   });
#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::kGenerateFirstPartyAutoTodos), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_GenerateFirstPartyAutoTodos_ResponseParams_Data> params(
          message);
  params.Allocate();

  params->success = in_success;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GenerateFirstPartyAutoTodos");
#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_GetAutoTodos_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::GetAutoTodosCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_GetAutoTodos_ProxyToResponder> proxy(
        new PageHandler_GetAutoTodos_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_GetAutoTodos_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_GetAutoTodos_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_GetAutoTodos_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::GetAutoTodosCallback 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::vector<::context_hub::AutoTodoEntry>& in_first_party_todos, const std::vector<::context_hub::AutoTodoEntry>& in_third_party_todos, ::base::Time in_last_first_party_generation_time, ::base::Time in_last_third_party_generation_time);
};

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

  // Validation for PageHandler.1
  bool success = true;
  std::vector<::context_hub::AutoTodoEntry> p_first_party_todos{};
  std::vector<::context_hub::AutoTodoEntry> p_third_party_todos{};
  ::base::Time p_last_first_party_generation_time{};
  ::base::Time p_last_third_party_generation_time{};
  PageHandler_GetAutoTodos_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadFirstPartyTodos(&p_first_party_todos))
    success = false;
  if (success && !input_data_view.ReadThirdPartyTodos(&p_third_party_todos))
    success = false;
  if (success && !input_data_view.ReadLastFirstPartyGenerationTime(&p_last_first_party_generation_time))
    success = false;
  if (success && !input_data_view.ReadLastThirdPartyGenerationTime(&p_last_third_party_generation_time))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 1, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_first_party_todos), 
std::move(p_third_party_todos), 
std::move(p_last_first_party_generation_time), 
std::move(p_last_third_party_generation_time));
  }
  return true;
}

void PageHandler_GetAutoTodos_ProxyToResponder::Run(
    const std::vector<::context_hub::AutoTodoEntry>& in_first_party_todos, const std::vector<::context_hub::AutoTodoEntry>& in_third_party_todos, ::base::Time in_last_first_party_generation_time, ::base::Time in_last_third_party_generation_time) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply browser::context_hub::mojom::PageHandler::GetAutoTodos", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("first_party_todos"), in_first_party_todos,
                        "<value of type const std::vector<::context_hub::AutoTodoEntry>&>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("third_party_todos"), in_third_party_todos,
                        "<value of type const std::vector<::context_hub::AutoTodoEntry>&>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("last_first_party_generation_time"), in_last_first_party_generation_time,
                        "<value of type ::base::Time>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("last_third_party_generation_time"), in_last_third_party_generation_time,
                        "<value of type ::base::Time>");
   });
#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::kGetAutoTodos), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_GetAutoTodos_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->first_party_todos)::BaseType>
      first_party_todos_fragment(params.message());
  constexpr const mojo::internal::ContainerValidateParams& first_party_todos_validate_params =
      mojo::internal::GetArrayValidator<0, false, nullptr>();
  
  mojo::internal::Serialize<mojo::ArrayDataView<::browser::context_hub::mojom::AutoTodoItemDataView>>(
    in_first_party_todos,
    first_party_todos_fragment,
    &first_party_todos_validate_params);

  params->first_party_todos.Set(
      first_party_todos_fragment.is_null() ? nullptr : first_party_todos_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->first_party_todos.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null first_party_todos in ");
  mojo::internal::MessageFragment<
      typename decltype(params->third_party_todos)::BaseType>
      third_party_todos_fragment(params.message());
  constexpr const mojo::internal::ContainerValidateParams& third_party_todos_validate_params =
      mojo::internal::GetArrayValidator<0, false, nullptr>();
  
  mojo::internal::Serialize<mojo::ArrayDataView<::browser::context_hub::mojom::AutoTodoItemDataView>>(
    in_third_party_todos,
    third_party_todos_fragment,
    &third_party_todos_validate_params);

  params->third_party_todos.Set(
      third_party_todos_fragment.is_null() ? nullptr : third_party_todos_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->third_party_todos.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null third_party_todos in ");
  mojo::internal::MessageFragment<
      typename decltype(params->last_first_party_generation_time)::BaseType> last_first_party_generation_time_fragment(
          params.message());
  
  mojo::internal::Serialize<::mojo_base::mojom::TimeDataView>(
    in_last_first_party_generation_time,
    last_first_party_generation_time_fragment);

  params->last_first_party_generation_time.Set(
      last_first_party_generation_time_fragment.is_null() ? nullptr : last_first_party_generation_time_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->last_first_party_generation_time.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null last_first_party_generation_time in ");
  mojo::internal::MessageFragment<
      typename decltype(params->last_third_party_generation_time)::BaseType> last_third_party_generation_time_fragment(
          params.message());
  
  mojo::internal::Serialize<::mojo_base::mojom::TimeDataView>(
    in_last_third_party_generation_time,
    last_third_party_generation_time_fragment);

  params->last_third_party_generation_time.Set(
      last_third_party_generation_time_fragment.is_null() ? nullptr : last_third_party_generation_time_fragment.data());

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

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetAutoTodos");
#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_UpdateAutoTodo_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::UpdateAutoTodoCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_UpdateAutoTodo_ProxyToResponder> proxy(
        new PageHandler_UpdateAutoTodo_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_UpdateAutoTodo_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_UpdateAutoTodo_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_UpdateAutoTodo_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::UpdateAutoTodoCallback 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(
      bool in_success);
};

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

  // Validation for PageHandler.2
  bool success = true;
  bool p_success{};
  PageHandler_UpdateAutoTodo_ResponseParamsDataView input_data_view(params, message);
  
  if (success)
    p_success = input_data_view.success();
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 2, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_success));
  }
  return true;
}

void PageHandler_UpdateAutoTodo_ProxyToResponder::Run(
    bool in_success) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply browser::context_hub::mojom::PageHandler::UpdateAutoTodo", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("success"), in_success,
                        "<value of type bool>");
   });
#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::kUpdateAutoTodo), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_UpdateAutoTodo_ResponseParams_Data> params(
          message);
  params.Allocate();

  params->success = in_success;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("UpdateAutoTodo");
#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_GenerateTabBasedTodos_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::GenerateTabBasedTodosCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_GenerateTabBasedTodos_ProxyToResponder> proxy(
        new PageHandler_GenerateTabBasedTodos_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_GenerateTabBasedTodos_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_GenerateTabBasedTodos_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_GenerateTabBasedTodos_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::GenerateTabBasedTodosCallback 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(
      bool in_success);
};

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

  // Validation for PageHandler.3
  bool success = true;
  bool p_success{};
  PageHandler_GenerateTabBasedTodos_ResponseParamsDataView input_data_view(params, message);
  
  if (success)
    p_success = input_data_view.success();
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 3, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_success));
  }
  return true;
}

void PageHandler_GenerateTabBasedTodos_ProxyToResponder::Run(
    bool in_success) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply browser::context_hub::mojom::PageHandler::GenerateTabBasedTodos", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("success"), in_success,
                        "<value of type bool>");
   });
#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::kGenerateTabBasedTodos), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_GenerateTabBasedTodos_ResponseParams_Data> params(
          message);
  params.Allocate();

  params->success = in_success;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GenerateTabBasedTodos");
#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_SetTodoFeedback_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::SetTodoFeedbackCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_SetTodoFeedback_ProxyToResponder> proxy(
        new PageHandler_SetTodoFeedback_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_SetTodoFeedback_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_SetTodoFeedback_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_SetTodoFeedback_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::SetTodoFeedbackCallback 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(
      );
};

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

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

void PageHandler_SetTodoFeedback_ProxyToResponder::Run(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send reply browser::context_hub::mojom::PageHandler::SetTodoFeedback");
#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::kSetTodoFeedback), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_SetTodoFeedback_ResponseParams_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("SetTodoFeedback");
#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_DeleteTodoFeedback_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::DeleteTodoFeedbackCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_DeleteTodoFeedback_ProxyToResponder> proxy(
        new PageHandler_DeleteTodoFeedback_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_DeleteTodoFeedback_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_DeleteTodoFeedback_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_DeleteTodoFeedback_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::DeleteTodoFeedbackCallback 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(
      );
};

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

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

void PageHandler_DeleteTodoFeedback_ProxyToResponder::Run(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send reply browser::context_hub::mojom::PageHandler::DeleteTodoFeedback");
#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::kDeleteTodoFeedback), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_DeleteTodoFeedback_ResponseParams_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("DeleteTodoFeedback");
#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_ClearTodoFeedbacks_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::ClearTodoFeedbacksCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_ClearTodoFeedbacks_ProxyToResponder> proxy(
        new PageHandler_ClearTodoFeedbacks_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_ClearTodoFeedbacks_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_ClearTodoFeedbacks_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_ClearTodoFeedbacks_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::ClearTodoFeedbacksCallback 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(
      );
};

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

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

void PageHandler_ClearTodoFeedbacks_ProxyToResponder::Run(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send reply browser::context_hub::mojom::PageHandler::ClearTodoFeedbacks");
#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::kClearTodoFeedbacks), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_ClearTodoFeedbacks_ResponseParams_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("ClearTodoFeedbacks");
#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_GetTodoFeedbacks_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::GetTodoFeedbacksCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_GetTodoFeedbacks_ProxyToResponder> proxy(
        new PageHandler_GetTodoFeedbacks_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_GetTodoFeedbacks_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_GetTodoFeedbacks_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_GetTodoFeedbacks_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::GetTodoFeedbacksCallback 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<AutoTodoItemFeedbackPtr> in_feedbacks);
};

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

  // Validation for PageHandler.7
  bool success = true;
  std::vector<AutoTodoItemFeedbackPtr> p_feedbacks{};
  PageHandler_GetTodoFeedbacks_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadFeedbacks(&p_feedbacks))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 7, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_feedbacks));
  }
  return true;
}

void PageHandler_GetTodoFeedbacks_ProxyToResponder::Run(
    std::vector<AutoTodoItemFeedbackPtr> in_feedbacks) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply browser::context_hub::mojom::PageHandler::GetTodoFeedbacks", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("feedbacks"), in_feedbacks,
                        "<value of type std::vector<AutoTodoItemFeedbackPtr>>");
   });
#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::kGetTodoFeedbacks), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_GetTodoFeedbacks_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->feedbacks)::BaseType>
      feedbacks_fragment(params.message());
  constexpr const mojo::internal::ContainerValidateParams& feedbacks_validate_params =
      mojo::internal::GetArrayValidator<0, false, nullptr>();
  
  mojo::internal::Serialize<mojo::ArrayDataView<::browser::context_hub::mojom::AutoTodoItemFeedbackDataView>>(
    in_feedbacks,
    feedbacks_fragment,
    &feedbacks_validate_params);

  params->feedbacks.Set(
      feedbacks_fragment.is_null() ? nullptr : feedbacks_fragment.data());

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

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetTodoFeedbacks");
#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_GetSaveToMemoryBankContext_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::GetSaveToMemoryBankContextCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_GetSaveToMemoryBankContext_ProxyToResponder> proxy(
        new PageHandler_GetSaveToMemoryBankContext_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_GetSaveToMemoryBankContext_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_GetSaveToMemoryBankContext_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_GetSaveToMemoryBankContext_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::GetSaveToMemoryBankContextCallback 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(
      SaveToMemoryBankContextPtr in_context);
};

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

  // Validation for PageHandler.8
  bool success = true;
  SaveToMemoryBankContextPtr p_context{};
  PageHandler_GetSaveToMemoryBankContext_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadContext(&p_context))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 8, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_context));
  }
  return true;
}

void PageHandler_GetSaveToMemoryBankContext_ProxyToResponder::Run(
    SaveToMemoryBankContextPtr in_context) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply browser::context_hub::mojom::PageHandler::GetSaveToMemoryBankContext", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("context"), in_context,
                        "<value of type SaveToMemoryBankContextPtr>");
   });
#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::kGetSaveToMemoryBankContext), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_GetSaveToMemoryBankContext_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->context)::BaseType> context_fragment(
          params.message());
  
  mojo::internal::Serialize<::browser::context_hub::mojom::SaveToMemoryBankContextDataView>(
    in_context,
    context_fragment);

  params->context.Set(
      context_fragment.is_null() ? nullptr : context_fragment.data());

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetSaveToMemoryBankContext");
#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_GetAllMemoryBankEntries_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::GetAllMemoryBankEntriesCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_GetAllMemoryBankEntries_ProxyToResponder> proxy(
        new PageHandler_GetAllMemoryBankEntries_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_GetAllMemoryBankEntries_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_GetAllMemoryBankEntries_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_GetAllMemoryBankEntries_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::GetAllMemoryBankEntriesCallback 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<MemoryBankEntryPtr> in_entries);
};

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

  // Validation for PageHandler.9
  bool success = true;
  std::vector<MemoryBankEntryPtr> p_entries{};
  PageHandler_GetAllMemoryBankEntries_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadEntries(&p_entries))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 9, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_entries));
  }
  return true;
}

void PageHandler_GetAllMemoryBankEntries_ProxyToResponder::Run(
    std::vector<MemoryBankEntryPtr> in_entries) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply browser::context_hub::mojom::PageHandler::GetAllMemoryBankEntries", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("entries"), in_entries,
                        "<value of type std::vector<MemoryBankEntryPtr>>");
   });
#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::kGetAllMemoryBankEntries), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_GetAllMemoryBankEntries_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->entries)::BaseType>
      entries_fragment(params.message());
  constexpr const mojo::internal::ContainerValidateParams& entries_validate_params =
      mojo::internal::GetArrayValidator<0, false, nullptr>();
  
  mojo::internal::Serialize<mojo::ArrayDataView<::browser::context_hub::mojom::MemoryBankEntryDataView>>(
    in_entries,
    entries_fragment,
    &entries_validate_params);

  params->entries.Set(
      entries_fragment.is_null() ? nullptr : entries_fragment.data());

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

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetAllMemoryBankEntries");
#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_DeleteMemoryBankEntries_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::DeleteMemoryBankEntriesCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_DeleteMemoryBankEntries_ProxyToResponder> proxy(
        new PageHandler_DeleteMemoryBankEntries_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_DeleteMemoryBankEntries_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_DeleteMemoryBankEntries_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_DeleteMemoryBankEntries_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::DeleteMemoryBankEntriesCallback 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(
      );
};

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

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

void PageHandler_DeleteMemoryBankEntries_ProxyToResponder::Run(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send reply browser::context_hub::mojom::PageHandler::DeleteMemoryBankEntries");
#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::kDeleteMemoryBankEntries), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_DeleteMemoryBankEntries_ResponseParams_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("DeleteMemoryBankEntries");
#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_SaveMemoryBankEntry_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::SaveMemoryBankEntryCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_SaveMemoryBankEntry_ProxyToResponder> proxy(
        new PageHandler_SaveMemoryBankEntry_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_SaveMemoryBankEntry_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_SaveMemoryBankEntry_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_SaveMemoryBankEntry_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::SaveMemoryBankEntryCallback 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(
      bool in_success);
};

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

  // Validation for PageHandler.11
  bool success = true;
  bool p_success{};
  PageHandler_SaveMemoryBankEntry_ResponseParamsDataView input_data_view(params, message);
  
  if (success)
    p_success = input_data_view.success();
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 11, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_success));
  }
  return true;
}

void PageHandler_SaveMemoryBankEntry_ProxyToResponder::Run(
    bool in_success) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply browser::context_hub::mojom::PageHandler::SaveMemoryBankEntry", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("success"), in_success,
                        "<value of type bool>");
   });
#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::kSaveMemoryBankEntry), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_SaveMemoryBankEntry_ResponseParams_Data> params(
          message);
  params.Allocate();

  params->success = in_success;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("SaveMemoryBankEntry");
#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_GetAllMemoryBankTags_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::GetAllMemoryBankTagsCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_GetAllMemoryBankTags_ProxyToResponder> proxy(
        new PageHandler_GetAllMemoryBankTags_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_GetAllMemoryBankTags_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_GetAllMemoryBankTags_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_GetAllMemoryBankTags_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::GetAllMemoryBankTagsCallback 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::vector<std::string>& in_tags);
};

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

  // Validation for PageHandler.12
  bool success = true;
  std::vector<std::string> p_tags{};
  PageHandler_GetAllMemoryBankTags_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadTags(&p_tags))
    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_tags));
  }
  return true;
}

void PageHandler_GetAllMemoryBankTags_ProxyToResponder::Run(
    const std::vector<std::string>& in_tags) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply browser::context_hub::mojom::PageHandler::GetAllMemoryBankTags", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("tags"), in_tags,
                        "<value of type const std::vector<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::kGetAllMemoryBankTags), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_GetAllMemoryBankTags_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->tags)::BaseType>
      tags_fragment(params.message());
  constexpr const mojo::internal::ContainerValidateParams& tags_validate_params =
      mojo::internal::GetArrayValidator<0, false, &mojo::internal::GetArrayValidator<0, false, nullptr>()>();
  
  mojo::internal::Serialize<mojo::ArrayDataView<mojo::StringDataView>>(
    in_tags,
    tags_fragment,
    &tags_validate_params);

  params->tags.Set(
      tags_fragment.is_null() ? nullptr : tags_fragment.data());

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

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetAllMemoryBankTags");
#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_GetAllMemoryBankCollections_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::GetAllMemoryBankCollectionsCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_GetAllMemoryBankCollections_ProxyToResponder> proxy(
        new PageHandler_GetAllMemoryBankCollections_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_GetAllMemoryBankCollections_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_GetAllMemoryBankCollections_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_GetAllMemoryBankCollections_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::GetAllMemoryBankCollectionsCallback 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::vector<std::string>& in_collections);
};

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

  // Validation for PageHandler.13
  bool success = true;
  std::vector<std::string> p_collections{};
  PageHandler_GetAllMemoryBankCollections_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadCollections(&p_collections))
    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_collections));
  }
  return true;
}

void PageHandler_GetAllMemoryBankCollections_ProxyToResponder::Run(
    const std::vector<std::string>& in_collections) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply browser::context_hub::mojom::PageHandler::GetAllMemoryBankCollections", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("collections"), in_collections,
                        "<value of type const std::vector<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::kGetAllMemoryBankCollections), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_GetAllMemoryBankCollections_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->collections)::BaseType>
      collections_fragment(params.message());
  constexpr const mojo::internal::ContainerValidateParams& collections_validate_params =
      mojo::internal::GetArrayValidator<0, false, &mojo::internal::GetArrayValidator<0, false, nullptr>()>();
  
  mojo::internal::Serialize<mojo::ArrayDataView<mojo::StringDataView>>(
    in_collections,
    collections_fragment,
    &collections_validate_params);

  params->collections.Set(
      collections_fragment.is_null() ? nullptr : collections_fragment.data());

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

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetAllMemoryBankCollections");
#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_GetTabs_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::GetTabsCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_GetTabs_ProxyToResponder> proxy(
        new PageHandler_GetTabs_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_GetTabs_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_GetTabs_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_GetTabs_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::GetTabsCallback 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_GetTabs_ForwardToCallback::Accept(
    mojo::Message* message) {
  DCHECK(message->is_serialized());
  internal::PageHandler_GetTabs_ResponseParams_Data* params =
      reinterpret_cast<
          internal::PageHandler_GetTabs_ResponseParams_Data*>(
              message->mutable_payload());
  

  // Validation for PageHandler.14
  bool success = true;
  std::vector<TabInfoPtr> p_tabs{};
  PageHandler_GetTabs_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_, 14, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_tabs));
  }
  return true;
}

void PageHandler_GetTabs_ProxyToResponder::Run(
    std::vector<TabInfoPtr> in_tabs) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply browser::context_hub::mojom::PageHandler::GetTabs", "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::kGetTabs), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_GetTabs_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<::browser::context_hub::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("GetTabs");
#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_RetrieveAndGroupTabs_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::RetrieveAndGroupTabsCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_RetrieveAndGroupTabs_ProxyToResponder> proxy(
        new PageHandler_RetrieveAndGroupTabs_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_RetrieveAndGroupTabs_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_RetrieveAndGroupTabs_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_RetrieveAndGroupTabs_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::RetrieveAndGroupTabsCallback 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<TabGroupPtr> in_groups, std::vector<TabInfoPtr> in_ungrouped_tabs, ChatMessagePtr in_llm_response);
};

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

  // Validation for PageHandler.15
  bool success = true;
  std::vector<TabGroupPtr> p_groups{};
  std::vector<TabInfoPtr> p_ungrouped_tabs{};
  ChatMessagePtr p_llm_response{};
  PageHandler_RetrieveAndGroupTabs_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadGroups(&p_groups))
    success = false;
  if (success && !input_data_view.ReadUngroupedTabs(&p_ungrouped_tabs))
    success = false;
  if (success && !input_data_view.ReadLlmResponse(&p_llm_response))
    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_groups), 
std::move(p_ungrouped_tabs), 
std::move(p_llm_response));
  }
  return true;
}

void PageHandler_RetrieveAndGroupTabs_ProxyToResponder::Run(
    std::vector<TabGroupPtr> in_groups, std::vector<TabInfoPtr> in_ungrouped_tabs, ChatMessagePtr in_llm_response) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply browser::context_hub::mojom::PageHandler::RetrieveAndGroupTabs", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("groups"), in_groups,
                        "<value of type std::vector<TabGroupPtr>>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("ungrouped_tabs"), in_ungrouped_tabs,
                        "<value of type std::vector<TabInfoPtr>>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("llm_response"), in_llm_response,
                        "<value of type ChatMessagePtr>");
   });
#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::kRetrieveAndGroupTabs), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_RetrieveAndGroupTabs_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->groups)::BaseType>
      groups_fragment(params.message());
  constexpr const mojo::internal::ContainerValidateParams& groups_validate_params =
      mojo::internal::GetArrayValidator<0, false, nullptr>();
  
  mojo::internal::Serialize<mojo::ArrayDataView<::browser::context_hub::mojom::TabGroupDataView>>(
    in_groups,
    groups_fragment,
    &groups_validate_params);

  params->groups.Set(
      groups_fragment.is_null() ? nullptr : groups_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->groups.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null groups in ");
  mojo::internal::MessageFragment<
      typename decltype(params->ungrouped_tabs)::BaseType>
      ungrouped_tabs_fragment(params.message());
  constexpr const mojo::internal::ContainerValidateParams& ungrouped_tabs_validate_params =
      mojo::internal::GetArrayValidator<0, false, nullptr>();
  
  mojo::internal::Serialize<mojo::ArrayDataView<::browser::context_hub::mojom::TabInfoDataView>>(
    in_ungrouped_tabs,
    ungrouped_tabs_fragment,
    &ungrouped_tabs_validate_params);

  params->ungrouped_tabs.Set(
      ungrouped_tabs_fragment.is_null() ? nullptr : ungrouped_tabs_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->ungrouped_tabs.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null ungrouped_tabs in ");
  mojo::internal::MessageFragment<
      typename decltype(params->llm_response)::BaseType> llm_response_fragment(
          params.message());
  
  mojo::internal::Serialize<::browser::context_hub::mojom::ChatMessageDataView>(
    in_llm_response,
    llm_response_fragment);

  params->llm_response.Set(
      llm_response_fragment.is_null() ? nullptr : llm_response_fragment.data());

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("RetrieveAndGroupTabs");
#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_GetExistingTabGroupsAndChats_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::GetExistingTabGroupsAndChatsCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_GetExistingTabGroupsAndChats_ProxyToResponder> proxy(
        new PageHandler_GetExistingTabGroupsAndChats_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_GetExistingTabGroupsAndChats_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_GetExistingTabGroupsAndChats_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_GetExistingTabGroupsAndChats_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::GetExistingTabGroupsAndChatsCallback 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<TabGroupPtr> in_groups, std::vector<TabInfoPtr> in_ungrouped_tabs, std::vector<ChatMessagePtr> in_history);
};

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

  // Validation for PageHandler.16
  bool success = true;
  std::vector<TabGroupPtr> p_groups{};
  std::vector<TabInfoPtr> p_ungrouped_tabs{};
  std::vector<ChatMessagePtr> p_history{};
  PageHandler_GetExistingTabGroupsAndChats_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadGroups(&p_groups))
    success = false;
  if (success && !input_data_view.ReadUngroupedTabs(&p_ungrouped_tabs))
    success = false;
  if (success && !input_data_view.ReadHistory(&p_history))
    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_groups), 
std::move(p_ungrouped_tabs), 
std::move(p_history));
  }
  return true;
}

void PageHandler_GetExistingTabGroupsAndChats_ProxyToResponder::Run(
    std::vector<TabGroupPtr> in_groups, std::vector<TabInfoPtr> in_ungrouped_tabs, std::vector<ChatMessagePtr> in_history) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply browser::context_hub::mojom::PageHandler::GetExistingTabGroupsAndChats", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("groups"), in_groups,
                        "<value of type std::vector<TabGroupPtr>>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("ungrouped_tabs"), in_ungrouped_tabs,
                        "<value of type std::vector<TabInfoPtr>>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("history"), in_history,
                        "<value of type std::vector<ChatMessagePtr>>");
   });
#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::kGetExistingTabGroupsAndChats), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_GetExistingTabGroupsAndChats_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->groups)::BaseType>
      groups_fragment(params.message());
  constexpr const mojo::internal::ContainerValidateParams& groups_validate_params =
      mojo::internal::GetArrayValidator<0, false, nullptr>();
  
  mojo::internal::Serialize<mojo::ArrayDataView<::browser::context_hub::mojom::TabGroupDataView>>(
    in_groups,
    groups_fragment,
    &groups_validate_params);

  params->groups.Set(
      groups_fragment.is_null() ? nullptr : groups_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->groups.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null groups in ");
  mojo::internal::MessageFragment<
      typename decltype(params->ungrouped_tabs)::BaseType>
      ungrouped_tabs_fragment(params.message());
  constexpr const mojo::internal::ContainerValidateParams& ungrouped_tabs_validate_params =
      mojo::internal::GetArrayValidator<0, false, nullptr>();
  
  mojo::internal::Serialize<mojo::ArrayDataView<::browser::context_hub::mojom::TabInfoDataView>>(
    in_ungrouped_tabs,
    ungrouped_tabs_fragment,
    &ungrouped_tabs_validate_params);

  params->ungrouped_tabs.Set(
      ungrouped_tabs_fragment.is_null() ? nullptr : ungrouped_tabs_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->ungrouped_tabs.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null ungrouped_tabs in ");
  mojo::internal::MessageFragment<
      typename decltype(params->history)::BaseType>
      history_fragment(params.message());
  constexpr const mojo::internal::ContainerValidateParams& history_validate_params =
      mojo::internal::GetArrayValidator<0, false, nullptr>();
  
  mojo::internal::Serialize<mojo::ArrayDataView<::browser::context_hub::mojom::ChatMessageDataView>>(
    in_history,
    history_fragment,
    &history_validate_params);

  params->history.Set(
      history_fragment.is_null() ? nullptr : history_fragment.data());

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

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetExistingTabGroupsAndChats");
#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_ClearTabGroups_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::ClearTabGroupsCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_ClearTabGroups_ProxyToResponder> proxy(
        new PageHandler_ClearTabGroups_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_ClearTabGroups_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_ClearTabGroups_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_ClearTabGroups_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::ClearTabGroupsCallback 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(
      );
};

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

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

void PageHandler_ClearTabGroups_ProxyToResponder::Run(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send reply browser::context_hub::mojom::PageHandler::ClearTabGroups");
#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::kClearTabGroups), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_ClearTabGroups_ResponseParams_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("ClearTabGroups");
#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_ClearTabGroupChatHistory_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::ClearTabGroupChatHistoryCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_ClearTabGroupChatHistory_ProxyToResponder> proxy(
        new PageHandler_ClearTabGroupChatHistory_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_ClearTabGroupChatHistory_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_ClearTabGroupChatHistory_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_ClearTabGroupChatHistory_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::ClearTabGroupChatHistoryCallback 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(
      );
};

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

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

void PageHandler_ClearTabGroupChatHistory_ProxyToResponder::Run(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send reply browser::context_hub::mojom::PageHandler::ClearTabGroupChatHistory");
#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::kClearTabGroupChatHistory), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_ClearTabGroupChatHistory_ResponseParams_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("ClearTabGroupChatHistory");
#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_AskGeminiWithContext_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::AskGeminiWithContextCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_AskGeminiWithContext_ProxyToResponder> proxy(
        new PageHandler_AskGeminiWithContext_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_AskGeminiWithContext_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_AskGeminiWithContext_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_AskGeminiWithContext_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::AskGeminiWithContextCallback 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(
      ChatMessagePtr in_response);
};

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

  // Validation for PageHandler.21
  bool success = true;
  ChatMessagePtr p_response{};
  PageHandler_AskGeminiWithContext_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_, 21, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_response));
  }
  return true;
}

void PageHandler_AskGeminiWithContext_ProxyToResponder::Run(
    ChatMessagePtr in_response) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply browser::context_hub::mojom::PageHandler::AskGeminiWithContext", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("response"), in_response,
                        "<value of type ChatMessagePtr>");
   });
#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::kAskGeminiWithContext), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_AskGeminiWithContext_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->response)::BaseType> response_fragment(
          params.message());
  
  mojo::internal::Serialize<::browser::context_hub::mojom::ChatMessageDataView>(
    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("AskGeminiWithContext");
#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_ConfirmAllTabGroups_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::ConfirmAllTabGroupsCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_ConfirmAllTabGroups_ProxyToResponder> proxy(
        new PageHandler_ConfirmAllTabGroups_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_ConfirmAllTabGroups_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_ConfirmAllTabGroups_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_ConfirmAllTabGroups_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::ConfirmAllTabGroupsCallback 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(
      bool in_success);
};

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

  // Validation for PageHandler.22
  bool success = true;
  bool p_success{};
  PageHandler_ConfirmAllTabGroups_ResponseParamsDataView input_data_view(params, message);
  
  if (success)
    p_success = input_data_view.success();
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 22, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_success));
  }
  return true;
}

void PageHandler_ConfirmAllTabGroups_ProxyToResponder::Run(
    bool in_success) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply browser::context_hub::mojom::PageHandler::ConfirmAllTabGroups", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("success"), in_success,
                        "<value of type bool>");
   });
#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::kConfirmAllTabGroups), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_ConfirmAllTabGroups_ResponseParams_Data> params(
          message);
  params.Allocate();

  params->success = in_success;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("ConfirmAllTabGroups");
#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_GetConfirmedTabGroups_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::GetConfirmedTabGroupsCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_GetConfirmedTabGroups_ProxyToResponder> proxy(
        new PageHandler_GetConfirmedTabGroups_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_GetConfirmedTabGroups_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_GetConfirmedTabGroups_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_GetConfirmedTabGroups_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::GetConfirmedTabGroupsCallback 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<TabGroupPtr> in_groups);
};

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

  // Validation for PageHandler.23
  bool success = true;
  std::vector<TabGroupPtr> p_groups{};
  PageHandler_GetConfirmedTabGroups_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadGroups(&p_groups))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandler::Name_, 23, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_groups));
  }
  return true;
}

void PageHandler_GetConfirmedTabGroups_ProxyToResponder::Run(
    std::vector<TabGroupPtr> in_groups) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply browser::context_hub::mojom::PageHandler::GetConfirmedTabGroups", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("groups"), in_groups,
                        "<value of type std::vector<TabGroupPtr>>");
   });
#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::kGetConfirmedTabGroups), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_GetConfirmedTabGroups_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->groups)::BaseType>
      groups_fragment(params.message());
  constexpr const mojo::internal::ContainerValidateParams& groups_validate_params =
      mojo::internal::GetArrayValidator<0, false, nullptr>();
  
  mojo::internal::Serialize<mojo::ArrayDataView<::browser::context_hub::mojom::TabGroupDataView>>(
    in_groups,
    groups_fragment,
    &groups_validate_params);

  params->groups.Set(
      groups_fragment.is_null() ? nullptr : groups_fragment.data());

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

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("GetConfirmedTabGroups");
#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_RemoveConfirmedTabGroup_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::RemoveConfirmedTabGroupCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_RemoveConfirmedTabGroup_ProxyToResponder> proxy(
        new PageHandler_RemoveConfirmedTabGroup_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_RemoveConfirmedTabGroup_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_RemoveConfirmedTabGroup_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_RemoveConfirmedTabGroup_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::RemoveConfirmedTabGroupCallback 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(
      );
};

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

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

void PageHandler_RemoveConfirmedTabGroup_ProxyToResponder::Run(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send reply browser::context_hub::mojom::PageHandler::RemoveConfirmedTabGroup");
#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::kRemoveConfirmedTabGroup), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_RemoveConfirmedTabGroup_ResponseParams_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("RemoveConfirmedTabGroup");
#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_CloseConfirmedTabGroup_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::CloseConfirmedTabGroupCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_CloseConfirmedTabGroup_ProxyToResponder> proxy(
        new PageHandler_CloseConfirmedTabGroup_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_CloseConfirmedTabGroup_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_CloseConfirmedTabGroup_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_CloseConfirmedTabGroup_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::CloseConfirmedTabGroupCallback 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(
      );
};

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

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

void PageHandler_CloseConfirmedTabGroup_ProxyToResponder::Run(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send reply browser::context_hub::mojom::PageHandler::CloseConfirmedTabGroup");
#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::kCloseConfirmedTabGroup), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_CloseConfirmedTabGroup_ResponseParams_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("CloseConfirmedTabGroup");
#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_RemoveAllConfirmedTabGroups_ProxyToResponder : public ::mojo::internal::ProxyToResponder {
 public:
  static PageHandler::RemoveAllConfirmedTabGroupsCallback CreateCallback(
      ::mojo::Message& message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
    std::unique_ptr<PageHandler_RemoveAllConfirmedTabGroups_ProxyToResponder> proxy(
        new PageHandler_RemoveAllConfirmedTabGroups_ProxyToResponder(
            message, std::move(responder)));
    return base::BindOnce(&PageHandler_RemoveAllConfirmedTabGroups_ProxyToResponder::Run,
                          std::move(proxy));
  }

  ~PageHandler_RemoveAllConfirmedTabGroups_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_RemoveAllConfirmedTabGroups_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::RemoveAllConfirmedTabGroupsCallback 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(
      );
};

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

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

void PageHandler_RemoveAllConfirmedTabGroups_ProxyToResponder::Run(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send reply browser::context_hub::mojom::PageHandler::RemoveAllConfirmedTabGroups");
#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::kRemoveAllConfirmedTabGroups), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::browser::context_hub::mojom::internal::PageHandler_RemoveAllConfirmedTabGroups_ResponseParams_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("RemoveAllConfirmedTabGroups");
#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::kGenerateFirstPartyAutoTodos: {
      break;
    }
    case messages::PageHandler::kGetAutoTodos: {
      break;
    }
    case messages::PageHandler::kUpdateAutoTodo: {
      break;
    }
    case messages::PageHandler::kGenerateTabBasedTodos: {
      break;
    }
    case messages::PageHandler::kSetTodoFeedback: {
      break;
    }
    case messages::PageHandler::kDeleteTodoFeedback: {
      break;
    }
    case messages::PageHandler::kClearTodoFeedbacks: {
      break;
    }
    case messages::PageHandler::kGetTodoFeedbacks: {
      break;
    }
    case messages::PageHandler::kGetSaveToMemoryBankContext: {
      break;
    }
    case messages::PageHandler::kGetAllMemoryBankEntries: {
      break;
    }
    case messages::PageHandler::kDeleteMemoryBankEntries: {
      break;
    }
    case messages::PageHandler::kSaveMemoryBankEntry: {
      break;
    }
    case messages::PageHandler::kGetAllMemoryBankTags: {
      break;
    }
    case messages::PageHandler::kGetAllMemoryBankCollections: {
      break;
    }
    case messages::PageHandler::kGetTabs: {
      break;
    }
    case messages::PageHandler::kRetrieveAndGroupTabs: {
      break;
    }
    case messages::PageHandler::kGetExistingTabGroupsAndChats: {
      break;
    }
    case messages::PageHandler::kSwitchToTab: {
      DCHECK(message->is_serialized());
      internal::PageHandler_SwitchToTab_Params_Data* params =
          reinterpret_cast<internal::PageHandler_SwitchToTab_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.17
      bool success = true;
      int64_t p_tab_id{};
      PageHandler_SwitchToTab_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_, 17, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->SwitchToTab(        
        std::move(p_tab_id));
      return true;
    }
    case messages::PageHandler::kCloseTab: {
      DCHECK(message->is_serialized());
      internal::PageHandler_CloseTab_Params_Data* params =
          reinterpret_cast<internal::PageHandler_CloseTab_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.18
      bool success = true;
      int64_t p_tab_id{};
      PageHandler_CloseTab_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_, 18, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->CloseTab(        
        std::move(p_tab_id));
      return true;
    }
    case messages::PageHandler::kClearTabGroups: {
      break;
    }
    case messages::PageHandler::kClearTabGroupChatHistory: {
      break;
    }
    case messages::PageHandler::kAskGeminiWithContext: {
      break;
    }
    case messages::PageHandler::kConfirmAllTabGroups: {
      break;
    }
    case messages::PageHandler::kGetConfirmedTabGroups: {
      break;
    }
    case messages::PageHandler::kRemoveConfirmedTabGroup: {
      break;
    }
    case messages::PageHandler::kCloseConfirmedTabGroup: {
      break;
    }
    case messages::PageHandler::kRemoveAllConfirmedTabGroups: {
      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::kGenerateFirstPartyAutoTodos: {
      internal::PageHandler_GenerateFirstPartyAutoTodos_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_GenerateFirstPartyAutoTodos_Params_Data*>(
                  message->mutable_payload());
      

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

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

      // Validation for PageHandler.2
      bool success = true;
      ::context_hub::AutoTodoEntry p_todo{};
      PageHandler_UpdateAutoTodo_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadTodo(&p_todo))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 2, false);
        return false;
      }
      auto callback =
          PageHandler_UpdateAutoTodo_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->UpdateAutoTodo(        
        std::move(p_todo), std::move(callback));
      return true;
    }
    case messages::PageHandler::kGenerateTabBasedTodos: {
      internal::PageHandler_GenerateTabBasedTodos_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_GenerateTabBasedTodos_Params_Data*>(
                  message->mutable_payload());
      

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

      // Validation for PageHandler.4
      bool success = true;
      AutoTodoItemFeedbackPtr p_feedback{};
      PageHandler_SetTodoFeedback_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadFeedback(&p_feedback))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 4, false);
        return false;
      }
      auto callback =
          PageHandler_SetTodoFeedback_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->SetTodoFeedback(        
        std::move(p_feedback), std::move(callback));
      return true;
    }
    case messages::PageHandler::kDeleteTodoFeedback: {
      internal::PageHandler_DeleteTodoFeedback_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_DeleteTodoFeedback_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.5
      bool success = true;
      std::string p_id{};
      PageHandler_DeleteTodoFeedback_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadId(&p_id))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 5, false);
        return false;
      }
      auto callback =
          PageHandler_DeleteTodoFeedback_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->DeleteTodoFeedback(        
        std::move(p_id), std::move(callback));
      return true;
    }
    case messages::PageHandler::kClearTodoFeedbacks: {
      internal::PageHandler_ClearTodoFeedbacks_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_ClearTodoFeedbacks_Params_Data*>(
                  message->mutable_payload());
      

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

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

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

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

      // Validation for PageHandler.10
      bool success = true;
      std::vector<int64_t> p_ids{};
      PageHandler_DeleteMemoryBankEntries_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,
            PageHandler::Name_, 10, false);
        return false;
      }
      auto callback =
          PageHandler_DeleteMemoryBankEntries_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->DeleteMemoryBankEntries(        
        std::move(p_ids), std::move(callback));
      return true;
    }
    case messages::PageHandler::kSaveMemoryBankEntry: {
      internal::PageHandler_SaveMemoryBankEntry_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_SaveMemoryBankEntry_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.11
      bool success = true;
      MemoryBankEntryAnnotationsPtr p_annotations{};
      PageHandler_SaveMemoryBankEntry_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadAnnotations(&p_annotations))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 11, false);
        return false;
      }
      auto callback =
          PageHandler_SaveMemoryBankEntry_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->SaveMemoryBankEntry(        
        std::move(p_annotations), std::move(callback));
      return true;
    }
    case messages::PageHandler::kGetAllMemoryBankTags: {
      internal::PageHandler_GetAllMemoryBankTags_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_GetAllMemoryBankTags_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.12
      bool success = true;
      PageHandler_GetAllMemoryBankTags_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_GetAllMemoryBankTags_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->GetAllMemoryBankTags(std::move(callback));
      return true;
    }
    case messages::PageHandler::kGetAllMemoryBankCollections: {
      internal::PageHandler_GetAllMemoryBankCollections_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_GetAllMemoryBankCollections_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.13
      bool success = true;
      PageHandler_GetAllMemoryBankCollections_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_GetAllMemoryBankCollections_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->GetAllMemoryBankCollections(std::move(callback));
      return true;
    }
    case messages::PageHandler::kGetTabs: {
      internal::PageHandler_GetTabs_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_GetTabs_Params_Data*>(
                  message->mutable_payload());
      

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

      // Validation for PageHandler.15
      bool success = true;
      std::string p_user_command{};
      PageHandler_RetrieveAndGroupTabs_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadUserCommand(&p_user_command))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 15, false);
        return false;
      }
      auto callback =
          PageHandler_RetrieveAndGroupTabs_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->RetrieveAndGroupTabs(        
        std::move(p_user_command), std::move(callback));
      return true;
    }
    case messages::PageHandler::kGetExistingTabGroupsAndChats: {
      internal::PageHandler_GetExistingTabGroupsAndChats_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_GetExistingTabGroupsAndChats_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.16
      bool success = true;
      PageHandler_GetExistingTabGroupsAndChats_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_GetExistingTabGroupsAndChats_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->GetExistingTabGroupsAndChats(std::move(callback));
      return true;
    }
    case messages::PageHandler::kSwitchToTab: {
      break;
    }
    case messages::PageHandler::kCloseTab: {
      break;
    }
    case messages::PageHandler::kClearTabGroups: {
      internal::PageHandler_ClearTabGroups_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_ClearTabGroups_Params_Data*>(
                  message->mutable_payload());
      

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

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

      // Validation for PageHandler.21
      bool success = true;
      std::string p_user_command{};
      std::vector<int64_t> p_memory_bank_entry_ids{};
      PageHandler_AskGeminiWithContext_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadUserCommand(&p_user_command))
        success = false;
      if (success && !input_data_view.ReadMemoryBankEntryIds(&p_memory_bank_entry_ids))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 21, false);
        return false;
      }
      auto callback =
          PageHandler_AskGeminiWithContext_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->AskGeminiWithContext(        
        std::move(p_user_command), 
        std::move(p_memory_bank_entry_ids), std::move(callback));
      return true;
    }
    case messages::PageHandler::kConfirmAllTabGroups: {
      internal::PageHandler_ConfirmAllTabGroups_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_ConfirmAllTabGroups_Params_Data*>(
                  message->mutable_payload());
      

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

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

      // Validation for PageHandler.24
      bool success = true;
      ::base::Uuid p_saved_guid{};
      PageHandler_RemoveConfirmedTabGroup_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadSavedGuid(&p_saved_guid))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 24, false);
        return false;
      }
      auto callback =
          PageHandler_RemoveConfirmedTabGroup_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->RemoveConfirmedTabGroup(        
        std::move(p_saved_guid), std::move(callback));
      return true;
    }
    case messages::PageHandler::kCloseConfirmedTabGroup: {
      internal::PageHandler_CloseConfirmedTabGroup_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_CloseConfirmedTabGroup_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.25
      bool success = true;
      ::base::Uuid p_saved_guid{};
      PageHandler_CloseConfirmedTabGroup_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadSavedGuid(&p_saved_guid))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 25, false);
        return false;
      }
      auto callback =
          PageHandler_CloseConfirmedTabGroup_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->CloseConfirmedTabGroup(        
        std::move(p_saved_guid), std::move(callback));
      return true;
    }
    case messages::PageHandler::kRemoveAllConfirmedTabGroups: {
      internal::PageHandler_RemoveAllConfirmedTabGroups_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_RemoveAllConfirmedTabGroups_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.26
      bool success = true;
      PageHandler_RemoveAllConfirmedTabGroups_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 26, false);
        return false;
      }
      auto callback =
          PageHandler_RemoveAllConfirmedTabGroups_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->RemoveAllConfirmedTabGroups(std::move(callback));
      return true;
    }
  }
  return false;
}
namespace {

bool ValidateWithRuntimeFeature_PageHandler_GenerateFirstPartyAutoTodos(
  const void* data, mojo::internal::ValidationContext* validation_context) {
  if (!base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTodos)) {
    return false;
  }
  return internal::PageHandler_GenerateFirstPartyAutoTodos_Params_Data::Validate(
    data, validation_context);
}

bool ValidateWithRuntimeFeature_PageHandler_GetAutoTodos(
  const void* data, mojo::internal::ValidationContext* validation_context) {
  if (!base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTodos)) {
    return false;
  }
  return internal::PageHandler_GetAutoTodos_Params_Data::Validate(
    data, validation_context);
}

bool ValidateWithRuntimeFeature_PageHandler_UpdateAutoTodo(
  const void* data, mojo::internal::ValidationContext* validation_context) {
  if (!base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTodos)) {
    return false;
  }
  return internal::PageHandler_UpdateAutoTodo_Params_Data::Validate(
    data, validation_context);
}

bool ValidateWithRuntimeFeature_PageHandler_GenerateTabBasedTodos(
  const void* data, mojo::internal::ValidationContext* validation_context) {
  if (!base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTodos)) {
    return false;
  }
  return internal::PageHandler_GenerateTabBasedTodos_Params_Data::Validate(
    data, validation_context);
}

bool ValidateWithRuntimeFeature_PageHandler_SetTodoFeedback(
  const void* data, mojo::internal::ValidationContext* validation_context) {
  if (!base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTodos)) {
    return false;
  }
  return internal::PageHandler_SetTodoFeedback_Params_Data::Validate(
    data, validation_context);
}

bool ValidateWithRuntimeFeature_PageHandler_DeleteTodoFeedback(
  const void* data, mojo::internal::ValidationContext* validation_context) {
  if (!base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTodos)) {
    return false;
  }
  return internal::PageHandler_DeleteTodoFeedback_Params_Data::Validate(
    data, validation_context);
}

bool ValidateWithRuntimeFeature_PageHandler_ClearTodoFeedbacks(
  const void* data, mojo::internal::ValidationContext* validation_context) {
  if (!base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTodos)) {
    return false;
  }
  return internal::PageHandler_ClearTodoFeedbacks_Params_Data::Validate(
    data, validation_context);
}

bool ValidateWithRuntimeFeature_PageHandler_GetTodoFeedbacks(
  const void* data, mojo::internal::ValidationContext* validation_context) {
  if (!base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTodos)) {
    return false;
  }
  return internal::PageHandler_GetTodoFeedbacks_Params_Data::Validate(
    data, validation_context);
}

bool ValidateWithRuntimeFeature_PageHandler_GetTabs(
  const void* data, mojo::internal::ValidationContext* validation_context) {
  if (!base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTabGroups)) {
    return false;
  }
  return internal::PageHandler_GetTabs_Params_Data::Validate(
    data, validation_context);
}

bool ValidateWithRuntimeFeature_PageHandler_RetrieveAndGroupTabs(
  const void* data, mojo::internal::ValidationContext* validation_context) {
  if (!base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTabGroups)) {
    return false;
  }
  return internal::PageHandler_RetrieveAndGroupTabs_Params_Data::Validate(
    data, validation_context);
}

bool ValidateWithRuntimeFeature_PageHandler_GetExistingTabGroupsAndChats(
  const void* data, mojo::internal::ValidationContext* validation_context) {
  if (!base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTabGroups)) {
    return false;
  }
  return internal::PageHandler_GetExistingTabGroupsAndChats_Params_Data::Validate(
    data, validation_context);
}

bool ValidateWithRuntimeFeature_PageHandler_ClearTabGroups(
  const void* data, mojo::internal::ValidationContext* validation_context) {
  if (!base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTabGroups)) {
    return false;
  }
  return internal::PageHandler_ClearTabGroups_Params_Data::Validate(
    data, validation_context);
}

bool ValidateWithRuntimeFeature_PageHandler_ClearTabGroupChatHistory(
  const void* data, mojo::internal::ValidationContext* validation_context) {
  if (!base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTabGroups)) {
    return false;
  }
  return internal::PageHandler_ClearTabGroupChatHistory_Params_Data::Validate(
    data, validation_context);
}

bool ValidateWithRuntimeFeature_PageHandler_ConfirmAllTabGroups(
  const void* data, mojo::internal::ValidationContext* validation_context) {
  if (!base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTabGroups)) {
    return false;
  }
  return internal::PageHandler_ConfirmAllTabGroups_Params_Data::Validate(
    data, validation_context);
}

bool ValidateWithRuntimeFeature_PageHandler_GetConfirmedTabGroups(
  const void* data, mojo::internal::ValidationContext* validation_context) {
  if (!base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTabGroups)) {
    return false;
  }
  return internal::PageHandler_GetConfirmedTabGroups_Params_Data::Validate(
    data, validation_context);
}

bool ValidateWithRuntimeFeature_PageHandler_RemoveConfirmedTabGroup(
  const void* data, mojo::internal::ValidationContext* validation_context) {
  if (!base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTabGroups)) {
    return false;
  }
  return internal::PageHandler_RemoveConfirmedTabGroup_Params_Data::Validate(
    data, validation_context);
}

bool ValidateWithRuntimeFeature_PageHandler_CloseConfirmedTabGroup(
  const void* data, mojo::internal::ValidationContext* validation_context) {
  if (!base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTabGroups)) {
    return false;
  }
  return internal::PageHandler_CloseConfirmedTabGroup_Params_Data::Validate(
    data, validation_context);
}

bool ValidateWithRuntimeFeature_PageHandler_RemoveAllConfirmedTabGroups(
  const void* data, mojo::internal::ValidationContext* validation_context) {
  if (!base::FeatureList::IsEnabled(::browser::context_hub::mojom::kAutoTabGroups)) {
    return false;
  }
  return internal::PageHandler_RemoveAllConfirmedTabGroups_Params_Data::Validate(
    data, validation_context);
}
}  // namespace
static const mojo::internal::GenericValidationInfo kPageHandlerValidationInfo[] = {
    { &ValidateWithRuntimeFeature_PageHandler_GenerateFirstPartyAutoTodos,
     &internal::PageHandler_GenerateFirstPartyAutoTodos_ResponseParams_Data::Validate},
    { &ValidateWithRuntimeFeature_PageHandler_GetAutoTodos,
     &internal::PageHandler_GetAutoTodos_ResponseParams_Data::Validate},
    { &ValidateWithRuntimeFeature_PageHandler_UpdateAutoTodo,
     &internal::PageHandler_UpdateAutoTodo_ResponseParams_Data::Validate},
    { &ValidateWithRuntimeFeature_PageHandler_GenerateTabBasedTodos,
     &internal::PageHandler_GenerateTabBasedTodos_ResponseParams_Data::Validate},
    { &ValidateWithRuntimeFeature_PageHandler_SetTodoFeedback,
     &internal::PageHandler_SetTodoFeedback_ResponseParams_Data::Validate},
    { &ValidateWithRuntimeFeature_PageHandler_DeleteTodoFeedback,
     &internal::PageHandler_DeleteTodoFeedback_ResponseParams_Data::Validate},
    { &ValidateWithRuntimeFeature_PageHandler_ClearTodoFeedbacks,
     &internal::PageHandler_ClearTodoFeedbacks_ResponseParams_Data::Validate},
    { &ValidateWithRuntimeFeature_PageHandler_GetTodoFeedbacks,
     &internal::PageHandler_GetTodoFeedbacks_ResponseParams_Data::Validate},
    { &internal::PageHandler_GetSaveToMemoryBankContext_Params_Data::Validate,
     &internal::PageHandler_GetSaveToMemoryBankContext_ResponseParams_Data::Validate},
    { &internal::PageHandler_GetAllMemoryBankEntries_Params_Data::Validate,
     &internal::PageHandler_GetAllMemoryBankEntries_ResponseParams_Data::Validate},
    { &internal::PageHandler_DeleteMemoryBankEntries_Params_Data::Validate,
     &internal::PageHandler_DeleteMemoryBankEntries_ResponseParams_Data::Validate},
    { &internal::PageHandler_SaveMemoryBankEntry_Params_Data::Validate,
     &internal::PageHandler_SaveMemoryBankEntry_ResponseParams_Data::Validate},
    { &internal::PageHandler_GetAllMemoryBankTags_Params_Data::Validate,
     &internal::PageHandler_GetAllMemoryBankTags_ResponseParams_Data::Validate},
    { &internal::PageHandler_GetAllMemoryBankCollections_Params_Data::Validate,
     &internal::PageHandler_GetAllMemoryBankCollections_ResponseParams_Data::Validate},
    { &ValidateWithRuntimeFeature_PageHandler_GetTabs,
     &internal::PageHandler_GetTabs_ResponseParams_Data::Validate},
    { &ValidateWithRuntimeFeature_PageHandler_RetrieveAndGroupTabs,
     &internal::PageHandler_RetrieveAndGroupTabs_ResponseParams_Data::Validate},
    { &ValidateWithRuntimeFeature_PageHandler_GetExistingTabGroupsAndChats,
     &internal::PageHandler_GetExistingTabGroupsAndChats_ResponseParams_Data::Validate},
    { &internal::PageHandler_SwitchToTab_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_CloseTab_Params_Data::Validate,
     nullptr /* no response */},
    { &ValidateWithRuntimeFeature_PageHandler_ClearTabGroups,
     &internal::PageHandler_ClearTabGroups_ResponseParams_Data::Validate},
    { &ValidateWithRuntimeFeature_PageHandler_ClearTabGroupChatHistory,
     &internal::PageHandler_ClearTabGroupChatHistory_ResponseParams_Data::Validate},
    { &internal::PageHandler_AskGeminiWithContext_Params_Data::Validate,
     &internal::PageHandler_AskGeminiWithContext_ResponseParams_Data::Validate},
    { &ValidateWithRuntimeFeature_PageHandler_ConfirmAllTabGroups,
     &internal::PageHandler_ConfirmAllTabGroups_ResponseParams_Data::Validate},
    { &ValidateWithRuntimeFeature_PageHandler_GetConfirmedTabGroups,
     &internal::PageHandler_GetConfirmedTabGroups_ResponseParams_Data::Validate},
    { &ValidateWithRuntimeFeature_PageHandler_RemoveConfirmedTabGroup,
     &internal::PageHandler_RemoveConfirmedTabGroup_ResponseParams_Data::Validate},
    { &ValidateWithRuntimeFeature_PageHandler_CloseConfirmedTabGroup,
     &internal::PageHandler_CloseConfirmedTabGroup_ResponseParams_Data::Validate},
    { &ValidateWithRuntimeFeature_PageHandler_RemoveAllConfirmedTabGroups,
     &internal::PageHandler_RemoveAllConfirmedTabGroups_ResponseParams_Data::Validate},
};

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

bool PageHandlerResponseValidator::Accept(mojo::Message* message) {
  return mojo::internal::ValidateResponseGenericPacked(
    message,
    ::browser::context_hub::mojom::PageHandler::Name_,
    kPageHandlerValidationInfo);
}


}  // browser::context_hub::mojom


namespace mojo {


// static
bool StructTraits<::browser::context_hub::mojom::GmailReference::DataView, ::browser::context_hub::mojom::GmailReferencePtr>::Read(
    ::browser::context_hub::mojom::GmailReference::DataView input,
    ::browser::context_hub::mojom::GmailReferencePtr* output) {
  bool success = true;
  ::browser::context_hub::mojom::GmailReferencePtr result(::browser::context_hub::mojom::GmailReference::New());
  
      if (success && !input.ReadMessageUrl(&result->message_url))
        success = false;
      if (success && !input.ReadSubject(&result->subject))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::browser::context_hub::mojom::PhotosReference::DataView, ::browser::context_hub::mojom::PhotosReferencePtr>::Read(
    ::browser::context_hub::mojom::PhotosReference::DataView input,
    ::browser::context_hub::mojom::PhotosReferencePtr* output) {
  bool success = true;
  ::browser::context_hub::mojom::PhotosReferencePtr result(::browser::context_hub::mojom::PhotosReference::New());
  
      if (success && !input.ReadPhotosUrl(&result->photos_url))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::browser::context_hub::mojom::FirstPartyData::DataView, ::browser::context_hub::mojom::FirstPartyDataPtr>::Read(
    ::browser::context_hub::mojom::FirstPartyData::DataView input,
    ::browser::context_hub::mojom::FirstPartyDataPtr* output) {
  bool success = true;
  ::browser::context_hub::mojom::FirstPartyDataPtr result(::browser::context_hub::mojom::FirstPartyData::New());
  
      if (success && !input.ReadSourceReferences(&result->source_references))
        success = false;
      if (success && !input.ReadActionableUrl(&result->actionable_url))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::browser::context_hub::mojom::ThirdPartyData::DataView, ::browser::context_hub::mojom::ThirdPartyDataPtr>::Read(
    ::browser::context_hub::mojom::ThirdPartyData::DataView input,
    ::browser::context_hub::mojom::ThirdPartyDataPtr* output) {
  bool success = true;
  ::browser::context_hub::mojom::ThirdPartyDataPtr result(::browser::context_hub::mojom::ThirdPartyData::New());
  
      if (success)
        result->tab_id = input.tab_id();
      if (success && !input.ReadLastActiveTimestamp(&result->last_active_timestamp))
        success = false;
      if (success && !input.ReadGroupType(&result->group_type))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::browser::context_hub::mojom::AutoTodoItem::DataView, ::browser::context_hub::mojom::AutoTodoItemPtr>::Read(
    ::browser::context_hub::mojom::AutoTodoItem::DataView input,
    ::browser::context_hub::mojom::AutoTodoItemPtr* output) {
  bool success = true;
  ::browser::context_hub::mojom::AutoTodoItemPtr result(::browser::context_hub::mojom::AutoTodoItem::New());
  
      if (success && !input.ReadId(&result->id))
        success = false;
      if (success && !input.ReadTitle(&result->title))
        success = false;
      if (success && !input.ReadDescription(&result->description))
        success = false;
      if (success && !input.ReadStatus(&result->status))
        success = false;
      if (success)
        result->score = input.score();
      if (success && !input.ReadData(&result->data))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::browser::context_hub::mojom::MemoryBankEntry::DataView, ::browser::context_hub::mojom::MemoryBankEntryPtr>::Read(
    ::browser::context_hub::mojom::MemoryBankEntry::DataView input,
    ::browser::context_hub::mojom::MemoryBankEntryPtr* output) {
  bool success = true;
  ::browser::context_hub::mojom::MemoryBankEntryPtr result(::browser::context_hub::mojom::MemoryBankEntry::New());
  
      if (success)
        result->id = input.id();
      if (success && !input.ReadType(&result->type))
        success = false;
      if (success && !input.ReadTimestamp(&result->timestamp))
        success = false;
      if (success && !input.ReadUrl(&result->url))
        success = false;
      if (success && !input.ReadTabTitle(&result->tab_title))
        success = false;
      if (success && !input.ReadSelectedText(&result->selected_text))
        success = false;
      if (success && !input.ReadTags(&result->tags))
        success = false;
      if (success && !input.ReadNote(&result->note))
        success = false;
      if (success && !input.ReadCollection(&result->collection))
        success = false;
  *output = std::move(result);
  return success;
}


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


// static
bool StructTraits<::browser::context_hub::mojom::TabGroup::DataView, ::browser::context_hub::mojom::TabGroupPtr>::Read(
    ::browser::context_hub::mojom::TabGroup::DataView input,
    ::browser::context_hub::mojom::TabGroupPtr* output) {
  bool success = true;
  ::browser::context_hub::mojom::TabGroupPtr result(::browser::context_hub::mojom::TabGroup::New());
  
      if (success && !input.ReadLabel(&result->label))
        success = false;
      if (success && !input.ReadTabs(&result->tabs))
        success = false;
      if (success && !input.ReadSavedGuid(&result->saved_guid))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::browser::context_hub::mojom::ChatMessage::DataView, ::browser::context_hub::mojom::ChatMessagePtr>::Read(
    ::browser::context_hub::mojom::ChatMessage::DataView input,
    ::browser::context_hub::mojom::ChatMessagePtr* output) {
  bool success = true;
  ::browser::context_hub::mojom::ChatMessagePtr result(::browser::context_hub::mojom::ChatMessage::New());
  
      if (success && !input.ReadRole(&result->role))
        success = false;
      if (success && !input.ReadContent(&result->content))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::browser::context_hub::mojom::SaveToMemoryBankContext::DataView, ::browser::context_hub::mojom::SaveToMemoryBankContextPtr>::Read(
    ::browser::context_hub::mojom::SaveToMemoryBankContext::DataView input,
    ::browser::context_hub::mojom::SaveToMemoryBankContextPtr* output) {
  bool success = true;
  ::browser::context_hub::mojom::SaveToMemoryBankContextPtr result(::browser::context_hub::mojom::SaveToMemoryBankContext::New());
  
      if (success && !input.ReadUrl(&result->url))
        success = false;
      if (success && !input.ReadTabTitle(&result->tab_title))
        success = false;
      if (success && !input.ReadSelectedText(&result->selected_text))
        success = false;
      if (success)
        result->is_text_selection = input.is_text_selection();
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::browser::context_hub::mojom::MemoryBankEntryAnnotations::DataView, ::browser::context_hub::mojom::MemoryBankEntryAnnotationsPtr>::Read(
    ::browser::context_hub::mojom::MemoryBankEntryAnnotations::DataView input,
    ::browser::context_hub::mojom::MemoryBankEntryAnnotationsPtr* output) {
  bool success = true;
  ::browser::context_hub::mojom::MemoryBankEntryAnnotationsPtr result(::browser::context_hub::mojom::MemoryBankEntryAnnotations::New());
  
      if (success && !input.ReadCollection(&result->collection))
        success = false;
      if (success && !input.ReadNote(&result->note))
        success = false;
      if (success && !input.ReadTags(&result->tags))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::browser::context_hub::mojom::AutoTodoItemFeedback::DataView, ::browser::context_hub::mojom::AutoTodoItemFeedbackPtr>::Read(
    ::browser::context_hub::mojom::AutoTodoItemFeedback::DataView input,
    ::browser::context_hub::mojom::AutoTodoItemFeedbackPtr* output) {
  bool success = true;
  ::browser::context_hub::mojom::AutoTodoItemFeedbackPtr result(::browser::context_hub::mojom::AutoTodoItemFeedback::New());
  
      if (success && !input.ReadTodoId(&result->todo_id))
        success = false;
      if (success)
        result->liked = input.liked();
  *output = std::move(result);
  return success;
}

// static
bool UnionTraits<::browser::context_hub::mojom::SourceReference::DataView, ::browser::context_hub::mojom::SourceReferencePtr>::Read(
    ::browser::context_hub::mojom::SourceReference::DataView input,
    ::browser::context_hub::mojom::SourceReferencePtr* output) {
  using UnionType = ::browser::context_hub::mojom::SourceReference;
  using Tag = UnionType::Tag;

  switch (input.tag()) {
    case Tag::kGmail: {
      ::context_hub::SourceReference result_gmail{};
      if (!input.ReadGmail(&result_gmail))
        return false;

      *output = UnionType::NewGmail(
          std::move(result_gmail));
      break;
    }
    case Tag::kPhotos: {
      ::browser::context_hub::mojom::PhotosReferencePtr result_photos{};
      if (!input.ReadPhotos(&result_photos))
        return false;

      *output = UnionType::NewPhotos(
          std::move(result_photos));
      break;
    }
    default:

      return false;
  }
  return true;
}

// static
bool UnionTraits<::browser::context_hub::mojom::AutoTodoData::DataView, ::browser::context_hub::mojom::AutoTodoDataPtr>::Read(
    ::browser::context_hub::mojom::AutoTodoData::DataView input,
    ::browser::context_hub::mojom::AutoTodoDataPtr* output) {
  using UnionType = ::browser::context_hub::mojom::AutoTodoData;
  using Tag = UnionType::Tag;

  switch (input.tag()) {
    case Tag::kFirstParty: {
      ::context_hub::FirstPartyData result_first_party{};
      if (!input.ReadFirstParty(&result_first_party))
        return false;

      *output = UnionType::NewFirstParty(
          std::move(result_first_party));
      break;
    }
    case Tag::kThirdParty: {
      ::context_hub::ThirdPartyData result_third_party{};
      if (!input.ReadThirdParty(&result_third_party))
        return false;

      *output = UnionType::NewThirdParty(
          std::move(result_third_party));
      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 browser::context_hub::mojom {


void PageInterceptorForTesting::OnAutoTodosChanged(const std::vector<::context_hub::AutoTodoEntry>& todos) {
  GetForwardingInterface()->OnAutoTodosChanged(
    std::move(todos)
    );
}
void PageInterceptorForTesting::OnFirstPartyAutoTodosGenerationStateChanged(bool is_generating) {
  GetForwardingInterface()->OnFirstPartyAutoTodosGenerationStateChanged(
    std::move(is_generating)
    );
}
void PageInterceptorForTesting::OnThirdPartyAutoTodosGenerationStateChanged(bool is_generating) {
  GetForwardingInterface()->OnThirdPartyAutoTodosGenerationStateChanged(
    std::move(is_generating)
    );
}
PageAsyncWaiter::PageAsyncWaiter(
    Page* proxy) : proxy_(proxy) {}

PageAsyncWaiter::~PageAsyncWaiter() = default;





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::GenerateFirstPartyAutoTodos(GenerateFirstPartyAutoTodosCallback callback) {
  GetForwardingInterface()->GenerateFirstPartyAutoTodos(std::move(callback));
}
void PageHandlerInterceptorForTesting::GetAutoTodos(GetAutoTodosCallback callback) {
  GetForwardingInterface()->GetAutoTodos(std::move(callback));
}
void PageHandlerInterceptorForTesting::UpdateAutoTodo(const ::context_hub::AutoTodoEntry& todo, UpdateAutoTodoCallback callback) {
  GetForwardingInterface()->UpdateAutoTodo(
    std::move(todo)
    , std::move(callback));
}
void PageHandlerInterceptorForTesting::GenerateTabBasedTodos(GenerateTabBasedTodosCallback callback) {
  GetForwardingInterface()->GenerateTabBasedTodos(std::move(callback));
}
void PageHandlerInterceptorForTesting::SetTodoFeedback(AutoTodoItemFeedbackPtr feedback, SetTodoFeedbackCallback callback) {
  GetForwardingInterface()->SetTodoFeedback(
    std::move(feedback)
    , std::move(callback));
}
void PageHandlerInterceptorForTesting::DeleteTodoFeedback(const std::string& id, DeleteTodoFeedbackCallback callback) {
  GetForwardingInterface()->DeleteTodoFeedback(
    std::move(id)
    , std::move(callback));
}
void PageHandlerInterceptorForTesting::ClearTodoFeedbacks(ClearTodoFeedbacksCallback callback) {
  GetForwardingInterface()->ClearTodoFeedbacks(std::move(callback));
}
void PageHandlerInterceptorForTesting::GetTodoFeedbacks(GetTodoFeedbacksCallback callback) {
  GetForwardingInterface()->GetTodoFeedbacks(std::move(callback));
}
void PageHandlerInterceptorForTesting::GetSaveToMemoryBankContext(GetSaveToMemoryBankContextCallback callback) {
  GetForwardingInterface()->GetSaveToMemoryBankContext(std::move(callback));
}
void PageHandlerInterceptorForTesting::GetAllMemoryBankEntries(GetAllMemoryBankEntriesCallback callback) {
  GetForwardingInterface()->GetAllMemoryBankEntries(std::move(callback));
}
void PageHandlerInterceptorForTesting::DeleteMemoryBankEntries(const std::vector<int64_t>& ids, DeleteMemoryBankEntriesCallback callback) {
  GetForwardingInterface()->DeleteMemoryBankEntries(
    std::move(ids)
    , std::move(callback));
}
void PageHandlerInterceptorForTesting::SaveMemoryBankEntry(MemoryBankEntryAnnotationsPtr annotations, SaveMemoryBankEntryCallback callback) {
  GetForwardingInterface()->SaveMemoryBankEntry(
    std::move(annotations)
    , std::move(callback));
}
void PageHandlerInterceptorForTesting::GetAllMemoryBankTags(GetAllMemoryBankTagsCallback callback) {
  GetForwardingInterface()->GetAllMemoryBankTags(std::move(callback));
}
void PageHandlerInterceptorForTesting::GetAllMemoryBankCollections(GetAllMemoryBankCollectionsCallback callback) {
  GetForwardingInterface()->GetAllMemoryBankCollections(std::move(callback));
}
void PageHandlerInterceptorForTesting::GetTabs(GetTabsCallback callback) {
  GetForwardingInterface()->GetTabs(std::move(callback));
}
void PageHandlerInterceptorForTesting::RetrieveAndGroupTabs(const std::string& user_command, RetrieveAndGroupTabsCallback callback) {
  GetForwardingInterface()->RetrieveAndGroupTabs(
    std::move(user_command)
    , std::move(callback));
}
void PageHandlerInterceptorForTesting::GetExistingTabGroupsAndChats(GetExistingTabGroupsAndChatsCallback callback) {
  GetForwardingInterface()->GetExistingTabGroupsAndChats(std::move(callback));
}
void PageHandlerInterceptorForTesting::SwitchToTab(int64_t tab_id) {
  GetForwardingInterface()->SwitchToTab(
    std::move(tab_id)
    );
}
void PageHandlerInterceptorForTesting::CloseTab(int64_t tab_id) {
  GetForwardingInterface()->CloseTab(
    std::move(tab_id)
    );
}
void PageHandlerInterceptorForTesting::ClearTabGroups(ClearTabGroupsCallback callback) {
  GetForwardingInterface()->ClearTabGroups(std::move(callback));
}
void PageHandlerInterceptorForTesting::ClearTabGroupChatHistory(ClearTabGroupChatHistoryCallback callback) {
  GetForwardingInterface()->ClearTabGroupChatHistory(std::move(callback));
}
void PageHandlerInterceptorForTesting::AskGeminiWithContext(const std::string& user_command, const std::vector<int64_t>& memory_bank_entry_ids, AskGeminiWithContextCallback callback) {
  GetForwardingInterface()->AskGeminiWithContext(
    std::move(user_command)
    , 
    std::move(memory_bank_entry_ids)
    , std::move(callback));
}
void PageHandlerInterceptorForTesting::ConfirmAllTabGroups(ConfirmAllTabGroupsCallback callback) {
  GetForwardingInterface()->ConfirmAllTabGroups(std::move(callback));
}
void PageHandlerInterceptorForTesting::GetConfirmedTabGroups(GetConfirmedTabGroupsCallback callback) {
  GetForwardingInterface()->GetConfirmedTabGroups(std::move(callback));
}
void PageHandlerInterceptorForTesting::RemoveConfirmedTabGroup(const ::base::Uuid& saved_guid, RemoveConfirmedTabGroupCallback callback) {
  GetForwardingInterface()->RemoveConfirmedTabGroup(
    std::move(saved_guid)
    , std::move(callback));
}
void PageHandlerInterceptorForTesting::CloseConfirmedTabGroup(const ::base::Uuid& saved_guid, CloseConfirmedTabGroupCallback callback) {
  GetForwardingInterface()->CloseConfirmedTabGroup(
    std::move(saved_guid)
    , std::move(callback));
}
void PageHandlerInterceptorForTesting::RemoveAllConfirmedTabGroups(RemoveAllConfirmedTabGroupsCallback callback) {
  GetForwardingInterface()->RemoveAllConfirmedTabGroups(std::move(callback));
}
PageHandlerAsyncWaiter::PageHandlerAsyncWaiter(
    PageHandler* proxy) : proxy_(proxy) {}

PageHandlerAsyncWaiter::~PageHandlerAsyncWaiter() = default;


void PageHandlerAsyncWaiter::GenerateFirstPartyAutoTodos(
    bool* out_success) {
  base::RunLoop loop;
  proxy_->GenerateFirstPartyAutoTodos(
      base::BindOnce(
          [](base::RunLoop* loop,
             bool* out_success
,
             bool success) {*out_success = std::move(success);
            loop->Quit();
          },
          &loop,
          out_success));
  loop.Run();
}

bool PageHandlerAsyncWaiter::GenerateFirstPartyAutoTodos(
    ) {
  bool async_wait_result;
  GenerateFirstPartyAutoTodos(&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::GetAutoTodos(
    std::vector<::context_hub::AutoTodoEntry>* out_first_party_todos, std::vector<::context_hub::AutoTodoEntry>* out_third_party_todos, ::base::Time* out_last_first_party_generation_time, ::base::Time* out_last_third_party_generation_time) {
  base::RunLoop loop;
  proxy_->GetAutoTodos(
      base::BindOnce(
          [](base::RunLoop* loop,
             std::vector<::context_hub::AutoTodoEntry>* out_first_party_todos
,
             std::vector<::context_hub::AutoTodoEntry>* out_third_party_todos
,
             ::base::Time* out_last_first_party_generation_time
,
             ::base::Time* out_last_third_party_generation_time
,
             const std::vector<::context_hub::AutoTodoEntry>& first_party_todos,
             const std::vector<::context_hub::AutoTodoEntry>& third_party_todos,
             ::base::Time last_first_party_generation_time,
             ::base::Time last_third_party_generation_time) {*out_first_party_todos = std::move(first_party_todos);*out_third_party_todos = std::move(third_party_todos);*out_last_first_party_generation_time = std::move(last_first_party_generation_time);*out_last_third_party_generation_time = std::move(last_third_party_generation_time);
            loop->Quit();
          },
          &loop,
          out_first_party_todos,
          out_third_party_todos,
          out_last_first_party_generation_time,
          out_last_third_party_generation_time));
  loop.Run();
}



void PageHandlerAsyncWaiter::UpdateAutoTodo(
    const ::context_hub::AutoTodoEntry& todo, bool* out_success) {
  base::RunLoop loop;
  proxy_->UpdateAutoTodo(
      std::move(todo),
      base::BindOnce(
          [](base::RunLoop* loop,
             bool* out_success
,
             bool success) {*out_success = std::move(success);
            loop->Quit();
          },
          &loop,
          out_success));
  loop.Run();
}

bool PageHandlerAsyncWaiter::UpdateAutoTodo(
    const ::context_hub::AutoTodoEntry& todo) {
  bool async_wait_result;
  UpdateAutoTodo(std::move(todo),&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::GenerateTabBasedTodos(
    bool* out_success) {
  base::RunLoop loop;
  proxy_->GenerateTabBasedTodos(
      base::BindOnce(
          [](base::RunLoop* loop,
             bool* out_success
,
             bool success) {*out_success = std::move(success);
            loop->Quit();
          },
          &loop,
          out_success));
  loop.Run();
}

bool PageHandlerAsyncWaiter::GenerateTabBasedTodos(
    ) {
  bool async_wait_result;
  GenerateTabBasedTodos(&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::SetTodoFeedback(
    AutoTodoItemFeedbackPtr feedback) {
  base::RunLoop loop;
  proxy_->SetTodoFeedback(
      std::move(feedback),
      base::BindOnce(
          [](base::RunLoop* loop) {
            loop->Quit();
          },
          &loop));
  loop.Run();
}



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



void PageHandlerAsyncWaiter::ClearTodoFeedbacks(
    ) {
  base::RunLoop loop;
  proxy_->ClearTodoFeedbacks(
      base::BindOnce(
          [](base::RunLoop* loop) {
            loop->Quit();
          },
          &loop));
  loop.Run();
}



void PageHandlerAsyncWaiter::GetTodoFeedbacks(
    std::vector<AutoTodoItemFeedbackPtr>* out_feedbacks) {
  base::RunLoop loop;
  proxy_->GetTodoFeedbacks(
      base::BindOnce(
          [](base::RunLoop* loop,
             std::vector<AutoTodoItemFeedbackPtr>* out_feedbacks
,
             std::vector<AutoTodoItemFeedbackPtr> feedbacks) {*out_feedbacks = std::move(feedbacks);
            loop->Quit();
          },
          &loop,
          out_feedbacks));
  loop.Run();
}

std::vector<AutoTodoItemFeedbackPtr> PageHandlerAsyncWaiter::GetTodoFeedbacks(
    ) {
  std::vector<AutoTodoItemFeedbackPtr> async_wait_result;
  GetTodoFeedbacks(&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::GetSaveToMemoryBankContext(
    SaveToMemoryBankContextPtr* out_context) {
  base::RunLoop loop;
  proxy_->GetSaveToMemoryBankContext(
      base::BindOnce(
          [](base::RunLoop* loop,
             SaveToMemoryBankContextPtr* out_context
,
             SaveToMemoryBankContextPtr context) {*out_context = std::move(context);
            loop->Quit();
          },
          &loop,
          out_context));
  loop.Run();
}

SaveToMemoryBankContextPtr PageHandlerAsyncWaiter::GetSaveToMemoryBankContext(
    ) {
  SaveToMemoryBankContextPtr async_wait_result;
  GetSaveToMemoryBankContext(&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::GetAllMemoryBankEntries(
    std::vector<MemoryBankEntryPtr>* out_entries) {
  base::RunLoop loop;
  proxy_->GetAllMemoryBankEntries(
      base::BindOnce(
          [](base::RunLoop* loop,
             std::vector<MemoryBankEntryPtr>* out_entries
,
             std::vector<MemoryBankEntryPtr> entries) {*out_entries = std::move(entries);
            loop->Quit();
          },
          &loop,
          out_entries));
  loop.Run();
}

std::vector<MemoryBankEntryPtr> PageHandlerAsyncWaiter::GetAllMemoryBankEntries(
    ) {
  std::vector<MemoryBankEntryPtr> async_wait_result;
  GetAllMemoryBankEntries(&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::DeleteMemoryBankEntries(
    const std::vector<int64_t>& ids) {
  base::RunLoop loop;
  proxy_->DeleteMemoryBankEntries(
      std::move(ids),
      base::BindOnce(
          [](base::RunLoop* loop) {
            loop->Quit();
          },
          &loop));
  loop.Run();
}



void PageHandlerAsyncWaiter::SaveMemoryBankEntry(
    MemoryBankEntryAnnotationsPtr annotations, bool* out_success) {
  base::RunLoop loop;
  proxy_->SaveMemoryBankEntry(
      std::move(annotations),
      base::BindOnce(
          [](base::RunLoop* loop,
             bool* out_success
,
             bool success) {*out_success = std::move(success);
            loop->Quit();
          },
          &loop,
          out_success));
  loop.Run();
}

bool PageHandlerAsyncWaiter::SaveMemoryBankEntry(
    MemoryBankEntryAnnotationsPtr annotations) {
  bool async_wait_result;
  SaveMemoryBankEntry(std::move(annotations),&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::GetAllMemoryBankTags(
    std::vector<std::string>* out_tags) {
  base::RunLoop loop;
  proxy_->GetAllMemoryBankTags(
      base::BindOnce(
          [](base::RunLoop* loop,
             std::vector<std::string>* out_tags
,
             const std::vector<std::string>& tags) {*out_tags = std::move(tags);
            loop->Quit();
          },
          &loop,
          out_tags));
  loop.Run();
}

std::vector<std::string> PageHandlerAsyncWaiter::GetAllMemoryBankTags(
    ) {
  std::vector<std::string> async_wait_result;
  GetAllMemoryBankTags(&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::GetAllMemoryBankCollections(
    std::vector<std::string>* out_collections) {
  base::RunLoop loop;
  proxy_->GetAllMemoryBankCollections(
      base::BindOnce(
          [](base::RunLoop* loop,
             std::vector<std::string>* out_collections
,
             const std::vector<std::string>& collections) {*out_collections = std::move(collections);
            loop->Quit();
          },
          &loop,
          out_collections));
  loop.Run();
}

std::vector<std::string> PageHandlerAsyncWaiter::GetAllMemoryBankCollections(
    ) {
  std::vector<std::string> async_wait_result;
  GetAllMemoryBankCollections(&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::GetTabs(
    std::vector<TabInfoPtr>* out_tabs) {
  base::RunLoop loop;
  proxy_->GetTabs(
      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::GetTabs(
    ) {
  std::vector<TabInfoPtr> async_wait_result;
  GetTabs(&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::RetrieveAndGroupTabs(
    const std::string& user_command, std::vector<TabGroupPtr>* out_groups, std::vector<TabInfoPtr>* out_ungrouped_tabs, ChatMessagePtr* out_llm_response) {
  base::RunLoop loop;
  proxy_->RetrieveAndGroupTabs(
      std::move(user_command),
      base::BindOnce(
          [](base::RunLoop* loop,
             std::vector<TabGroupPtr>* out_groups
,
             std::vector<TabInfoPtr>* out_ungrouped_tabs
,
             ChatMessagePtr* out_llm_response
,
             std::vector<TabGroupPtr> groups,
             std::vector<TabInfoPtr> ungrouped_tabs,
             ChatMessagePtr llm_response) {*out_groups = std::move(groups);*out_ungrouped_tabs = std::move(ungrouped_tabs);*out_llm_response = std::move(llm_response);
            loop->Quit();
          },
          &loop,
          out_groups,
          out_ungrouped_tabs,
          out_llm_response));
  loop.Run();
}



void PageHandlerAsyncWaiter::GetExistingTabGroupsAndChats(
    std::vector<TabGroupPtr>* out_groups, std::vector<TabInfoPtr>* out_ungrouped_tabs, std::vector<ChatMessagePtr>* out_history) {
  base::RunLoop loop;
  proxy_->GetExistingTabGroupsAndChats(
      base::BindOnce(
          [](base::RunLoop* loop,
             std::vector<TabGroupPtr>* out_groups
,
             std::vector<TabInfoPtr>* out_ungrouped_tabs
,
             std::vector<ChatMessagePtr>* out_history
,
             std::vector<TabGroupPtr> groups,
             std::vector<TabInfoPtr> ungrouped_tabs,
             std::vector<ChatMessagePtr> history) {*out_groups = std::move(groups);*out_ungrouped_tabs = std::move(ungrouped_tabs);*out_history = std::move(history);
            loop->Quit();
          },
          &loop,
          out_groups,
          out_ungrouped_tabs,
          out_history));
  loop.Run();
}



void PageHandlerAsyncWaiter::ClearTabGroups(
    ) {
  base::RunLoop loop;
  proxy_->ClearTabGroups(
      base::BindOnce(
          [](base::RunLoop* loop) {
            loop->Quit();
          },
          &loop));
  loop.Run();
}



void PageHandlerAsyncWaiter::ClearTabGroupChatHistory(
    ) {
  base::RunLoop loop;
  proxy_->ClearTabGroupChatHistory(
      base::BindOnce(
          [](base::RunLoop* loop) {
            loop->Quit();
          },
          &loop));
  loop.Run();
}



void PageHandlerAsyncWaiter::AskGeminiWithContext(
    const std::string& user_command, const std::vector<int64_t>& memory_bank_entry_ids, ChatMessagePtr* out_response) {
  base::RunLoop loop;
  proxy_->AskGeminiWithContext(
      std::move(user_command),
      std::move(memory_bank_entry_ids),
      base::BindOnce(
          [](base::RunLoop* loop,
             ChatMessagePtr* out_response
,
             ChatMessagePtr response) {*out_response = std::move(response);
            loop->Quit();
          },
          &loop,
          out_response));
  loop.Run();
}

ChatMessagePtr PageHandlerAsyncWaiter::AskGeminiWithContext(
    const std::string& user_command, const std::vector<int64_t>& memory_bank_entry_ids) {
  ChatMessagePtr async_wait_result;
  AskGeminiWithContext(std::move(user_command),std::move(memory_bank_entry_ids),&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::ConfirmAllTabGroups(
    bool* out_success) {
  base::RunLoop loop;
  proxy_->ConfirmAllTabGroups(
      base::BindOnce(
          [](base::RunLoop* loop,
             bool* out_success
,
             bool success) {*out_success = std::move(success);
            loop->Quit();
          },
          &loop,
          out_success));
  loop.Run();
}

bool PageHandlerAsyncWaiter::ConfirmAllTabGroups(
    ) {
  bool async_wait_result;
  ConfirmAllTabGroups(&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::GetConfirmedTabGroups(
    std::vector<TabGroupPtr>* out_groups) {
  base::RunLoop loop;
  proxy_->GetConfirmedTabGroups(
      base::BindOnce(
          [](base::RunLoop* loop,
             std::vector<TabGroupPtr>* out_groups
,
             std::vector<TabGroupPtr> groups) {*out_groups = std::move(groups);
            loop->Quit();
          },
          &loop,
          out_groups));
  loop.Run();
}

std::vector<TabGroupPtr> PageHandlerAsyncWaiter::GetConfirmedTabGroups(
    ) {
  std::vector<TabGroupPtr> async_wait_result;
  GetConfirmedTabGroups(&async_wait_result);
  return async_wait_result;
}

void PageHandlerAsyncWaiter::RemoveConfirmedTabGroup(
    const ::base::Uuid& saved_guid) {
  base::RunLoop loop;
  proxy_->RemoveConfirmedTabGroup(
      std::move(saved_guid),
      base::BindOnce(
          [](base::RunLoop* loop) {
            loop->Quit();
          },
          &loop));
  loop.Run();
}



void PageHandlerAsyncWaiter::CloseConfirmedTabGroup(
    const ::base::Uuid& saved_guid) {
  base::RunLoop loop;
  proxy_->CloseConfirmedTabGroup(
      std::move(saved_guid),
      base::BindOnce(
          [](base::RunLoop* loop) {
            loop->Quit();
          },
          &loop));
  loop.Run();
}



void PageHandlerAsyncWaiter::RemoveAllConfirmedTabGroups(
    ) {
  base::RunLoop loop;
  proxy_->RemoveAllConfirmedTabGroups(
      base::BindOnce(
          [](base::RunLoop* loop) {
            loop->Quit();
          },
          &loop));
  loop.Run();
}








}  // browser::context_hub::mojom


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