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

#include "chrome/browser/geic/geic.mojom-import-headers.h"
#include "chrome/browser/geic/geic.mojom-test-utils.h"


namespace geic::mojom {
TabMetadata::TabMetadata()
    : tab_id(),
      window_id(),
      url(),
      title(),
      favicon(),
      is_active_in_window() {}

TabMetadata::TabMetadata(
    int32_t tab_id_in,
    int32_t window_id_in,
    const ::GURL& url_in,
    const ::std::u16string& title_in,
    std::optional<std::vector<uint8_t>> favicon_in,
    bool is_active_in_window_in)
    : tab_id(std::move(tab_id_in)),
      window_id(std::move(window_id_in)),
      url(std::move(url_in)),
      title(std::move(title_in)),
      favicon(std::move(favicon_in)),
      is_active_in_window(std::move(is_active_in_window_in)) {}

TabMetadata::~TabMetadata() = default;

void TabMetadata::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "tab_id"), this->tab_id,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type int32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "window_id"), this->window_id,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type int32_t>"
#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(
      "title"), this->title,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const ::std::u16string&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "favicon"), this->favicon,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<std::vector<uint8_t>>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "is_active_in_window"), this->is_active_in_window,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool TabMetadata::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
NoFocusedTabData::NoFocusedTabData()
    : no_focus_reason() {}

NoFocusedTabData::NoFocusedTabData(
    const std::string& no_focus_reason_in)
    : no_focus_reason(std::move(no_focus_reason_in)) {}

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

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

bool NoFocusedTabData::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
GeicInitialState::GeicInitialState()
    : focused_tab_data() {}

GeicInitialState::GeicInitialState(
    FocusedTabDataPtr focused_tab_data_in)
    : focused_tab_data(std::move(focused_tab_data_in)) {}

GeicInitialState::~GeicInitialState() = default;

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

bool GeicInitialState::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
TabContextOptions::TabContextOptions()
    : include_inner_text(false),
      inner_text_bytes_limit(0U),
      include_screenshot(false),
      screenshot_max_width(0U),
      screenshot_max_height(0U) {}

TabContextOptions::TabContextOptions(
    bool include_inner_text_in,
    uint32_t inner_text_bytes_limit_in,
    bool include_screenshot_in,
    uint32_t screenshot_max_width_in,
    uint32_t screenshot_max_height_in)
    : include_inner_text(std::move(include_inner_text_in)),
      inner_text_bytes_limit(std::move(inner_text_bytes_limit_in)),
      include_screenshot(std::move(include_screenshot_in)),
      screenshot_max_width(std::move(screenshot_max_width_in)),
      screenshot_max_height(std::move(screenshot_max_height_in)) {}

TabContextOptions::~TabContextOptions() = default;
size_t TabContextOptions::Hash(size_t seed) const {
  seed = mojo::internal::Hash(seed, this->include_inner_text);
  seed = mojo::internal::Hash(seed, this->inner_text_bytes_limit);
  seed = mojo::internal::Hash(seed, this->include_screenshot);
  seed = mojo::internal::Hash(seed, this->screenshot_max_width);
  seed = mojo::internal::Hash(seed, this->screenshot_max_height);
  return seed;
}

void TabContextOptions::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "include_inner_text"), this->include_inner_text,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "inner_text_bytes_limit"), this->inner_text_bytes_limit,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type uint32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "include_screenshot"), this->include_screenshot,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type bool>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "screenshot_max_width"), this->screenshot_max_width,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type uint32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "screenshot_max_height"), this->screenshot_max_height,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type uint32_t>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool TabContextOptions::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
TabContextData::TabContextData()
    : metadata(),
      inner_text(),
      screenshot_data(),
      screenshot_mime_type() {}

TabContextData::TabContextData(
    TabMetadataPtr metadata_in,
    const std::optional<std::string>& inner_text_in,
    std::optional<std::vector<uint8_t>> screenshot_data_in,
    const std::optional<std::string>& screenshot_mime_type_in)
    : metadata(std::move(metadata_in)),
      inner_text(std::move(inner_text_in)),
      screenshot_data(std::move(screenshot_data_in)),
      screenshot_mime_type(std::move(screenshot_mime_type_in)) {}

TabContextData::~TabContextData() = default;

void TabContextData::WriteIntoTrace(
    perfetto::TracedValue traced_context) const {
  [[maybe_unused]] auto dict = std::move(traced_context).WriteDictionary();
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "metadata"), this->metadata,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type TabMetadataPtr>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "inner_text"), this->inner_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(
      "screenshot_data"), this->screenshot_data,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<std::vector<uint8_t>>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
  perfetto::WriteIntoTracedValueWithFallback(
    dict.AddItem(
      "screenshot_mime_type"), this->screenshot_mime_type,
#if BUILDFLAG(MOJO_TRACE_ENABLED)
      "<value of type const std::optional<std::string>&>"
#else
      "<value>"
#endif  // BUILDFLAG(MOJO_TRACE_ENABLED)
    );
}

bool TabContextData::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
FocusedTabDataPtr
FocusedTabData::NewFocusedTab(
    TabMetadataPtr value) {
  return FocusedTabDataPtr(
      std::in_place,
      std::in_place_index<static_cast<size_t>(Tag::kFocusedTab)>,
      std::move(value));
}

FocusedTabDataPtr
FocusedTabData::NewNoFocusedTabData(
    NoFocusedTabDataPtr value) {
  return FocusedTabDataPtr(
      std::in_place,
      std::in_place_index<static_cast<size_t>(Tag::kNoFocusedTabData)>,
      std::move(value));
}

FocusedTabData::FocusedTabData(
    std::in_place_index_t<static_cast<size_t>(Tag::kFocusedTab)>,
    TabMetadataPtr value)
    : tag_(Tag::kFocusedTab),
      data_(std::in_place_index<static_cast<size_t>(Tag::kFocusedTab)>,
            std::move(value)) {}

FocusedTabData::FocusedTabData(
    std::in_place_index_t<static_cast<size_t>(Tag::kNoFocusedTabData)>,
    NoFocusedTabDataPtr value)
    : tag_(Tag::kNoFocusedTabData),
      data_(std::in_place_index<static_cast<size_t>(Tag::kNoFocusedTabData)>,
            std::move(value)) {}
FocusedTabData::~FocusedTabData() {
  DestroyActive();
}

void FocusedTabData::set_focused_tab(TabMetadataPtr focused_tab) {
  if (tag_ == Tag::kFocusedTab) {
    data_.focused_tab = std::move(focused_tab);
  } else {
    DestroyActive();
    tag_ = Tag::kFocusedTab;
    new (&data_.focused_tab) TabMetadataPtr(
        std::move(focused_tab));
  }
}

void FocusedTabData::set_no_focused_tab_data(NoFocusedTabDataPtr no_focused_tab_data) {
  if (tag_ == Tag::kNoFocusedTabData) {
    data_.no_focused_tab_data = std::move(no_focused_tab_data);
  } else {
    DestroyActive();
    tag_ = Tag::kNoFocusedTabData;
    new (&data_.no_focused_tab_data) NoFocusedTabDataPtr(
        std::move(no_focused_tab_data));
  }
}


FocusedTabData::Union_::Union_(
    std::in_place_index_t<static_cast<size_t>(Tag::kFocusedTab)>,
    TabMetadataPtr value)
    : focused_tab(std::move(value)) {}

FocusedTabData::Union_::Union_(
    std::in_place_index_t<static_cast<size_t>(Tag::kNoFocusedTabData)>,
    NoFocusedTabDataPtr value)
    : no_focused_tab_data(std::move(value)) {}

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

    case Tag::kFocusedTab:
      std::destroy_at(&data_.focused_tab);
      break;
    case Tag::kNoFocusedTabData:
      std::destroy_at(&data_.no_focused_tab_data);
      break;
  }
}

bool FocusedTabData::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context, false);
}
GeicBrowserHost_GetContextFromFocusedTab_ResponseParam_ResultPtr
GeicBrowserHost_GetContextFromFocusedTab_ResponseParam_Result::NewSuccess(
    TabContextDataPtr value) {
  return GeicBrowserHost_GetContextFromFocusedTab_ResponseParam_ResultPtr(
      std::in_place,
      std::in_place_index<static_cast<size_t>(Tag::kSuccess)>,
      std::move(value));
}

GeicBrowserHost_GetContextFromFocusedTab_ResponseParam_ResultPtr
GeicBrowserHost_GetContextFromFocusedTab_ResponseParam_Result::NewFailure(
    GetTabContextError value) {
  return GeicBrowserHost_GetContextFromFocusedTab_ResponseParam_ResultPtr(
      std::in_place,
      std::in_place_index<static_cast<size_t>(Tag::kFailure)>,
      std::move(value));
}

GeicBrowserHost_GetContextFromFocusedTab_ResponseParam_Result::GeicBrowserHost_GetContextFromFocusedTab_ResponseParam_Result(
    std::in_place_index_t<static_cast<size_t>(Tag::kSuccess)>,
    TabContextDataPtr value)
    : tag_(Tag::kSuccess),
      data_(std::in_place_index<static_cast<size_t>(Tag::kSuccess)>,
            std::move(value)) {}

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

void GeicBrowserHost_GetContextFromFocusedTab_ResponseParam_Result::set_success(TabContextDataPtr success) {
  if (tag_ == Tag::kSuccess) {
    data_.success = std::move(success);
  } else {
    DestroyActive();
    tag_ = Tag::kSuccess;
    new (&data_.success) TabContextDataPtr(
        std::move(success));
  }
}

void GeicBrowserHost_GetContextFromFocusedTab_ResponseParam_Result::set_failure(GetTabContextError failure) {
  if (tag_ != Tag::kFailure) {
    DestroyActive();
    tag_ = Tag::kFailure;
  }
  data_.failure = failure;
}


GeicBrowserHost_GetContextFromFocusedTab_ResponseParam_Result::Union_::Union_(
    std::in_place_index_t<static_cast<size_t>(Tag::kSuccess)>,
    TabContextDataPtr value)
    : success(std::move(value)) {}

GeicBrowserHost_GetContextFromFocusedTab_ResponseParam_Result::Union_::Union_(
    std::in_place_index_t<static_cast<size_t>(Tag::kFailure)>,
    GetTabContextError value)
    : failure(std::move(value)) {}

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

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

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

GeicApi::IPCStableHashFunction GeicApi::MessageToMethodInfo_(mojo::Message& message) {
#if !BUILDFLAG(IS_FUCHSIA)
#endif  // !BUILDFLAG(IS_FUCHSIA)
  return nullptr;
}


const char* GeicApi::MessageToMethodName_(mojo::Message& message) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  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)
# endif // !BUILDFLAG(IS_FUCHSIA)

// static
bool GeicApi::RuntimeFeature_IsEnabled_(bool expected) {
  bool enabled = base::FeatureList::IsEnabled(::pwc::mojom::features::kPrivilegedWebContents);
#if DCHECK_IS_ON()
  if (expected) {
    DCHECK(enabled) << "RuntimeFeature ::pwc::mojom::features::kPrivilegedWebContents for GeicApi is not enabled";
  }
#endif
  return enabled;
}

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

// static
bool GeicApiStubDispatch::Accept(
    GeicApi* impl,
    mojo::Message* message) {
  return false;
}

// static
bool GeicApiStubDispatch::AcceptWithResponder(
    GeicApi* impl,
    mojo::Message* message,
    std::unique_ptr<mojo::MessageReceiverWithStatus> responder) {
  return false;
}
namespace {
}  // namespace

bool GeicApiRequestValidator::Accept(mojo::Message* message) {
  return mojo::internal::ValidateRequestGeneric(
    message,
    ::geic::mojom::GeicApi::Name_,
    {});
}

// The declaration includes the definition on other builds.

GeicBrowserHost::IPCStableHashFunction GeicBrowserHost::MessageToMethodInfo_(mojo::Message& message) {
#if !BUILDFLAG(IS_FUCHSIA)
  switch (static_cast<messages::GeicBrowserHost>(message.name())) {
    case messages::GeicBrowserHost::kRegisterClient: {
      return &GeicBrowserHost::RegisterClient_Sym::IPCStableHash;
    }
    case messages::GeicBrowserHost::kGetFocusedTab: {
      return &GeicBrowserHost::GetFocusedTab_Sym::IPCStableHash;
    }
    case messages::GeicBrowserHost::kGetContextFromFocusedTab: {
      return &GeicBrowserHost::GetContextFromFocusedTab_Sym::IPCStableHash;
    }
    case messages::GeicBrowserHost::kClosePanel: {
      return &GeicBrowserHost::ClosePanel_Sym::IPCStableHash;
    }
  }
#endif  // !BUILDFLAG(IS_FUCHSIA)
  return nullptr;
}


const char* GeicBrowserHost::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::GeicBrowserHost>(message.name())) {
      case messages::GeicBrowserHost::kRegisterClient:
            return "Receive geic::mojom::GeicBrowserHost::RegisterClient";
      case messages::GeicBrowserHost::kGetFocusedTab:
            return "Receive geic::mojom::GeicBrowserHost::GetFocusedTab";
      case messages::GeicBrowserHost::kGetContextFromFocusedTab:
            return "Receive geic::mojom::GeicBrowserHost::GetContextFromFocusedTab";
      case messages::GeicBrowserHost::kClosePanel:
            return "Receive geic::mojom::GeicBrowserHost::ClosePanel";
    }
  } else {
    switch (static_cast<messages::GeicBrowserHost>(message.name())) {
      case messages::GeicBrowserHost::kRegisterClient:
            return "Receive reply geic::mojom::GeicBrowserHost::RegisterClient";
      case messages::GeicBrowserHost::kGetFocusedTab:
            return "Receive reply geic::mojom::GeicBrowserHost::GetFocusedTab";
      case messages::GeicBrowserHost::kGetContextFromFocusedTab:
            return "Receive reply geic::mojom::GeicBrowserHost::GetContextFromFocusedTab";
      case messages::GeicBrowserHost::kClosePanel:
            return "Receive reply geic::mojom::GeicBrowserHost::ClosePanel";
    }
  }
  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 GeicBrowserHost::RegisterClient_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 = 0xc9f36eb4;  // IPCStableHash for geic::mojom::GeicBrowserHost::RegisterClient
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t GeicBrowserHost::GetFocusedTab_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 = 0x143eb3c0;  // IPCStableHash for geic::mojom::GeicBrowserHost::GetFocusedTab
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t GeicBrowserHost::GetContextFromFocusedTab_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 = 0xd10626f8;  // IPCStableHash for geic::mojom::GeicBrowserHost::GetContextFromFocusedTab
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t GeicBrowserHost::ClosePanel_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 = 0x00b60387;  // IPCStableHash for geic::mojom::GeicBrowserHost::ClosePanel
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
# endif // !BUILDFLAG(IS_FUCHSIA)

class GeicBrowserHost_RegisterClient_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  GeicBrowserHost_RegisterClient_ForwardToCallback(
      GeicBrowserHost::RegisterClientCallback callback
      ) : callback_(std::move(callback)) {
  }

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

  bool Accept(mojo::Message* message) override;
 private:
  GeicBrowserHost::RegisterClientCallback callback_;
};

class GeicBrowserHost_GetFocusedTab_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  GeicBrowserHost_GetFocusedTab_ForwardToCallback(
      GeicBrowserHost::GetFocusedTabCallback callback
      ) : callback_(std::move(callback)) {
  }

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

  bool Accept(mojo::Message* message) override;
 private:
  GeicBrowserHost::GetFocusedTabCallback callback_;
};

class GeicBrowserHost_GetContextFromFocusedTab_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  GeicBrowserHost_GetContextFromFocusedTab_ForwardToCallback(
      GeicBrowserHost::GetContextFromFocusedTabCallback callback
      ) : callback_(std::move(callback)) {
  }

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

  bool Accept(mojo::Message* message) override;
 private:
  GeicBrowserHost::GetContextFromFocusedTabCallback callback_;
};

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

void GeicBrowserHostProxy::RegisterClient(
    ::mojo::PendingRemote<GeicClient> in_client, RegisterClientCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send geic::mojom::GeicBrowserHost::RegisterClient", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("client"), in_client,
                        "<value of type ::mojo::PendingRemote<GeicClient>>");
   });
#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::GeicBrowserHost::kRegisterClient), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::geic::mojom::internal::GeicBrowserHost_RegisterClient_Params_Data> params(
          message);
  params.Allocate();

  
  mojo::internal::Serialize<mojo::InterfacePtrDataView<::geic::mojom::GeicClientInterfaceBase>>(
    in_client,
    &params->client,
    &params.message());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(!mojo::internal::IsHandleOrInterfaceValid(params->client)),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_HANDLE,
    "invalid client in GeicBrowserHost.RegisterClient request");

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

void GeicBrowserHostProxy::GetFocusedTab(
    GetFocusedTabCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send geic::mojom::GeicBrowserHost::GetFocusedTab");
#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::GeicBrowserHost::kGetFocusedTab), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::geic::mojom::internal::GeicBrowserHost_GetFocusedTab_Params_Data> params(
          message);
  params.Allocate();

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

void GeicBrowserHostProxy::GetContextFromFocusedTab(
    TabContextOptionsPtr in_options, GetContextFromFocusedTabCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send geic::mojom::GeicBrowserHost::GetContextFromFocusedTab", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("options"), in_options,
                        "<value of type TabContextOptionsPtr>");
   });
#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::GeicBrowserHost::kGetContextFromFocusedTab), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::geic::mojom::internal::GeicBrowserHost_GetContextFromFocusedTab_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->options)::BaseType> options_fragment(
          params.message());
  
  mojo::internal::Serialize<::geic::mojom::TabContextOptionsDataView>(
    in_options,
    options_fragment);

  params->options.Set(
      options_fragment.is_null() ? nullptr : options_fragment.data());

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

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

void GeicBrowserHostProxy::ClosePanel(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send geic::mojom::GeicBrowserHost::ClosePanel");
#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::GeicBrowserHost::kClosePanel), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::geic::mojom::internal::GeicBrowserHost_ClosePanel_Params_Data> params(
          message);
  params.Allocate();

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

  ~GeicBrowserHost_RegisterClient_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:
  GeicBrowserHost_RegisterClient_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)
        << "GeicBrowserHost::RegisterClientCallback 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(
      GeicInitialStatePtr in_initial_state);
};

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

  // Validation for GeicBrowserHost.0
  bool success = true;
  GeicInitialStatePtr p_initial_state{};
  GeicBrowserHost_RegisterClient_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadInitialState(&p_initial_state))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        GeicBrowserHost::Name_, 0, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_initial_state));
  }
  return true;
}

void GeicBrowserHost_RegisterClient_ProxyToResponder::Run(
    GeicInitialStatePtr in_initial_state) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply geic::mojom::GeicBrowserHost::RegisterClient", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("initial_state"), in_initial_state,
                        "<value of type GeicInitialStatePtr>");
   });
#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::GeicBrowserHost::kRegisterClient), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::geic::mojom::internal::GeicBrowserHost_RegisterClient_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->initial_state)::BaseType> initial_state_fragment(
          params.message());
  
  mojo::internal::Serialize<::geic::mojom::GeicInitialStateDataView>(
    in_initial_state,
    initial_state_fragment);

  params->initial_state.Set(
      initial_state_fragment.is_null() ? nullptr : initial_state_fragment.data());

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

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

  ~GeicBrowserHost_GetFocusedTab_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:
  GeicBrowserHost_GetFocusedTab_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)
        << "GeicBrowserHost::GetFocusedTabCallback 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(
      FocusedTabDataPtr in_data);
};

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

  // Validation for GeicBrowserHost.1
  bool success = true;
  FocusedTabDataPtr p_data{};
  GeicBrowserHost_GetFocusedTab_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadData(&p_data))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        GeicBrowserHost::Name_, 1, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_data));
  }
  return true;
}

void GeicBrowserHost_GetFocusedTab_ProxyToResponder::Run(
    FocusedTabDataPtr in_data) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply geic::mojom::GeicBrowserHost::GetFocusedTab", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("data"), in_data,
                        "<value of type FocusedTabDataPtr>");
   });
#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::GeicBrowserHost::kGetFocusedTab), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::geic::mojom::internal::GeicBrowserHost_GetFocusedTab_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<decltype(params->data)>
      data_fragment(params.message());
  data_fragment.Claim(&params->data);
  
  mojo::internal::Serialize<::geic::mojom::FocusedTabDataDataView>(
    in_data,
    data_fragment,
    true);

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

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

  static GeicBrowserHost_GetContextFromFocusedTab_ResponseParam_ResultPtr Transform(base::expected<
  TabContextDataPtr,
  GetTabContextError> in) {
    return in.has_value() ? ::geic::mojom::GeicBrowserHost_GetContextFromFocusedTab_ResponseParam_Result::NewSuccess(std::move(in.value())) :
                            ::geic::mojom::GeicBrowserHost_GetContextFromFocusedTab_ResponseParam_Result::NewFailure(std::move(in.error()));
  }



  ~GeicBrowserHost_GetContextFromFocusedTab_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:
  GeicBrowserHost_GetContextFromFocusedTab_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)
        << "GeicBrowserHost::GetContextFromFocusedTabCallback 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(
      GeicBrowserHost_GetContextFromFocusedTab_ResponseParam_ResultPtr in_result);
};

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

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

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

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

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::GeicBrowserHost::kGetContextFromFocusedTab), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::geic::mojom::internal::GeicBrowserHost_GetContextFromFocusedTab_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<decltype(params->result)>
      result_fragment(params.message());
  result_fragment.Claim(&params->result);
  
  mojo::internal::Serialize<::geic::mojom::GeicBrowserHost_GetContextFromFocusedTab_ResponseParam_ResultDataView>(
    in_result,
    result_fragment,
    true);

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

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(GeicBrowserHost::Name_);
  message.set_method_name("GetContextFromFocusedTab");
#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 GeicBrowserHostStubDispatch::Accept(
    GeicBrowserHost* impl,
    mojo::Message* message) {
  switch (static_cast<messages::GeicBrowserHost>(message->header()->name)) {
    case messages::GeicBrowserHost::kRegisterClient: {
      break;
    }
    case messages::GeicBrowserHost::kGetFocusedTab: {
      break;
    }
    case messages::GeicBrowserHost::kGetContextFromFocusedTab: {
      break;
    }
    case messages::GeicBrowserHost::kClosePanel: {
      DCHECK(message->is_serialized());
      internal::GeicBrowserHost_ClosePanel_Params_Data* params =
          reinterpret_cast<internal::GeicBrowserHost_ClosePanel_Params_Data*>(
              message->mutable_payload());
      

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

// static
bool GeicBrowserHostStubDispatch::AcceptWithResponder(
    GeicBrowserHost* 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::GeicBrowserHost>(message->header()->name)) {
    case messages::GeicBrowserHost::kRegisterClient: {
      internal::GeicBrowserHost_RegisterClient_Params_Data* params =
          reinterpret_cast<
              internal::GeicBrowserHost_RegisterClient_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for GeicBrowserHost.0
      bool success = true;
      ::mojo::PendingRemote<GeicClient> p_client{};
      GeicBrowserHost_RegisterClient_ParamsDataView input_data_view(params, message);
      
      if (success) {
        p_client =
            input_data_view.TakeClient<decltype(p_client)>();
      }
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            GeicBrowserHost::Name_, 0, false);
        return false;
      }
      auto callback =
          GeicBrowserHost_RegisterClient_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->RegisterClient(        
        std::move(p_client), std::move(callback));
      return true;
    }
    case messages::GeicBrowserHost::kGetFocusedTab: {
      internal::GeicBrowserHost_GetFocusedTab_Params_Data* params =
          reinterpret_cast<
              internal::GeicBrowserHost_GetFocusedTab_Params_Data*>(
                  message->mutable_payload());
      

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

      // Validation for GeicBrowserHost.2
      bool success = true;
      TabContextOptionsPtr p_options{};
      GeicBrowserHost_GetContextFromFocusedTab_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadOptions(&p_options))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            GeicBrowserHost::Name_, 2, false);
        return false;
      }
      auto callback =
          GeicBrowserHost_GetContextFromFocusedTab_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->GetContextFromFocusedTab(        
        std::move(p_options), std::move(callback));
      return true;
    }
    case messages::GeicBrowserHost::kClosePanel: {
      break;
    }
  }
  return false;
}
namespace {
}  // namespace
static const mojo::internal::GenericValidationInfo kGeicBrowserHostValidationInfo[] = {
    { &internal::GeicBrowserHost_RegisterClient_Params_Data::Validate,
     &internal::GeicBrowserHost_RegisterClient_ResponseParams_Data::Validate},
    { &internal::GeicBrowserHost_GetFocusedTab_Params_Data::Validate,
     &internal::GeicBrowserHost_GetFocusedTab_ResponseParams_Data::Validate},
    { &internal::GeicBrowserHost_GetContextFromFocusedTab_Params_Data::Validate,
     &internal::GeicBrowserHost_GetContextFromFocusedTab_ResponseParams_Data::Validate},
    { &internal::GeicBrowserHost_ClosePanel_Params_Data::Validate,
     nullptr /* no response */},
};

bool GeicBrowserHostRequestValidator::Accept(mojo::Message* message) {
  return mojo::internal::ValidateRequestGenericPacked(
    message,
    ::geic::mojom::GeicBrowserHost::Name_,
    kGeicBrowserHostValidationInfo);
}

bool GeicBrowserHostResponseValidator::Accept(mojo::Message* message) {
  return mojo::internal::ValidateResponseGenericPacked(
    message,
    ::geic::mojom::GeicBrowserHost::Name_,
    kGeicBrowserHostValidationInfo);
}
// The declaration includes the definition on other builds.

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


const char* GeicClient::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::GeicClient>(message.name())) {
      case messages::GeicClient::kOnFocusedTabChanged:
            return "Receive geic::mojom::GeicClient::OnFocusedTabChanged";
    }
  } else {
    switch (static_cast<messages::GeicClient>(message.name())) {
      case messages::GeicClient::kOnFocusedTabChanged:
            return "Receive reply geic::mojom::GeicClient::OnFocusedTabChanged";
    }
  }
  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 GeicClient::OnFocusedTabChanged_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 = 0x06a045ad;  // IPCStableHash for geic::mojom::GeicClient::OnFocusedTabChanged
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
# endif // !BUILDFLAG(IS_FUCHSIA)

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

void GeicClientProxy::OnFocusedTabChanged(
    FocusedTabDataPtr in_data) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send geic::mojom::GeicClient::OnFocusedTabChanged", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("data"), in_data,
                        "<value of type FocusedTabDataPtr>");
   });
#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::GeicClient::kOnFocusedTabChanged), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::geic::mojom::internal::GeicClient_OnFocusedTabChanged_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<decltype(params->data)>
      data_fragment(params.message());
  data_fragment.Claim(&params->data);
  
  mojo::internal::Serialize<::geic::mojom::FocusedTabDataDataView>(
    in_data,
    data_fragment,
    true);

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

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

      // Validation for GeicClient.0
      bool success = true;
      FocusedTabDataPtr p_data{};
      GeicClient_OnFocusedTabChanged_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadData(&p_data))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            GeicClient::Name_, 0, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OnFocusedTabChanged(        
        std::move(p_data));
      return true;
    }
  }
  return false;
}

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

bool GeicClientRequestValidator::Accept(mojo::Message* message) {
  return mojo::internal::ValidateRequestGenericPacked(
    message,
    ::geic::mojom::GeicClient::Name_,
    kGeicClientValidationInfo);
}



}  // geic::mojom


namespace mojo {


// static
bool StructTraits<::geic::mojom::TabMetadata::DataView, ::geic::mojom::TabMetadataPtr>::Read(
    ::geic::mojom::TabMetadata::DataView input,
    ::geic::mojom::TabMetadataPtr* output) {
  bool success = true;
  ::geic::mojom::TabMetadataPtr result(::geic::mojom::TabMetadata::New());
  
      if (success)
        result->tab_id = input.tab_id();
      if (success)
        result->window_id = input.window_id();
      if (success && !input.ReadUrl(&result->url))
        success = false;
      if (success && !input.ReadTitle(&result->title))
        success = false;
      if (success && !input.ReadFavicon(&result->favicon))
        success = false;
      if (success)
        result->is_active_in_window = input.is_active_in_window();
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::geic::mojom::NoFocusedTabData::DataView, ::geic::mojom::NoFocusedTabDataPtr>::Read(
    ::geic::mojom::NoFocusedTabData::DataView input,
    ::geic::mojom::NoFocusedTabDataPtr* output) {
  bool success = true;
  ::geic::mojom::NoFocusedTabDataPtr result(::geic::mojom::NoFocusedTabData::New());
  
      if (success && !input.ReadNoFocusReason(&result->no_focus_reason))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::geic::mojom::GeicInitialState::DataView, ::geic::mojom::GeicInitialStatePtr>::Read(
    ::geic::mojom::GeicInitialState::DataView input,
    ::geic::mojom::GeicInitialStatePtr* output) {
  bool success = true;
  ::geic::mojom::GeicInitialStatePtr result(::geic::mojom::GeicInitialState::New());
  
      if (success && !input.ReadFocusedTabData(&result->focused_tab_data))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::geic::mojom::TabContextOptions::DataView, ::geic::mojom::TabContextOptionsPtr>::Read(
    ::geic::mojom::TabContextOptions::DataView input,
    ::geic::mojom::TabContextOptionsPtr* output) {
  bool success = true;
  ::geic::mojom::TabContextOptionsPtr result(::geic::mojom::TabContextOptions::New());
  
      if (success)
        result->include_inner_text = input.include_inner_text();
      if (success)
        result->inner_text_bytes_limit = input.inner_text_bytes_limit();
      if (success)
        result->include_screenshot = input.include_screenshot();
      if (success)
        result->screenshot_max_width = input.screenshot_max_width();
      if (success)
        result->screenshot_max_height = input.screenshot_max_height();
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::geic::mojom::TabContextData::DataView, ::geic::mojom::TabContextDataPtr>::Read(
    ::geic::mojom::TabContextData::DataView input,
    ::geic::mojom::TabContextDataPtr* output) {
  bool success = true;
  ::geic::mojom::TabContextDataPtr result(::geic::mojom::TabContextData::New());
  
      if (success && !input.ReadMetadata(&result->metadata))
        success = false;
      if (success && !input.ReadInnerText(&result->inner_text))
        success = false;
      if (success && !input.ReadScreenshotData(&result->screenshot_data))
        success = false;
      if (success && !input.ReadScreenshotMimeType(&result->screenshot_mime_type))
        success = false;
  *output = std::move(result);
  return success;
}

// static
bool UnionTraits<::geic::mojom::FocusedTabData::DataView, ::geic::mojom::FocusedTabDataPtr>::Read(
    ::geic::mojom::FocusedTabData::DataView input,
    ::geic::mojom::FocusedTabDataPtr* output) {
  using UnionType = ::geic::mojom::FocusedTabData;
  using Tag = UnionType::Tag;

  switch (input.tag()) {
    case Tag::kFocusedTab: {
      ::geic::mojom::TabMetadataPtr result_focused_tab{};
      if (!input.ReadFocusedTab(&result_focused_tab))
        return false;

      *output = UnionType::NewFocusedTab(
          std::move(result_focused_tab));
      break;
    }
    case Tag::kNoFocusedTabData: {
      ::geic::mojom::NoFocusedTabDataPtr result_no_focused_tab_data{};
      if (!input.ReadNoFocusedTabData(&result_no_focused_tab_data))
        return false;

      *output = UnionType::NewNoFocusedTabData(
          std::move(result_no_focused_tab_data));
      break;
    }
    default:

      return false;
  }
  return true;
}

// static
bool UnionTraits<::geic::mojom::GeicBrowserHost_GetContextFromFocusedTab_ResponseParam_Result::DataView, ::geic::mojom::GeicBrowserHost_GetContextFromFocusedTab_ResponseParam_ResultPtr>::Read(
    ::geic::mojom::GeicBrowserHost_GetContextFromFocusedTab_ResponseParam_Result::DataView input,
    ::geic::mojom::GeicBrowserHost_GetContextFromFocusedTab_ResponseParam_ResultPtr* output) {
  using UnionType = ::geic::mojom::GeicBrowserHost_GetContextFromFocusedTab_ResponseParam_Result;
  using Tag = UnionType::Tag;

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

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

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

      return false;
  }
  return true;
}

}  // namespace mojo


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


namespace geic::mojom {


GeicApiAsyncWaiter::GeicApiAsyncWaiter(
    GeicApi* proxy) : proxy_(proxy) {}

GeicApiAsyncWaiter::~GeicApiAsyncWaiter() = default;





void GeicBrowserHostInterceptorForTesting::RegisterClient(::mojo::PendingRemote<GeicClient> client, RegisterClientCallback callback) {
  GetForwardingInterface()->RegisterClient(
    std::move(client)
    , std::move(callback));
}
void GeicBrowserHostInterceptorForTesting::GetFocusedTab(GetFocusedTabCallback callback) {
  GetForwardingInterface()->GetFocusedTab(std::move(callback));
}
void GeicBrowserHostInterceptorForTesting::GetContextFromFocusedTab(TabContextOptionsPtr options, GetContextFromFocusedTabCallback callback) {
  GetForwardingInterface()->GetContextFromFocusedTab(
    std::move(options)
    , std::move(callback));
}
void GeicBrowserHostInterceptorForTesting::ClosePanel() {
  GetForwardingInterface()->ClosePanel();
}
GeicBrowserHostAsyncWaiter::GeicBrowserHostAsyncWaiter(
    GeicBrowserHost* proxy) : proxy_(proxy) {}

GeicBrowserHostAsyncWaiter::~GeicBrowserHostAsyncWaiter() = default;


void GeicBrowserHostAsyncWaiter::RegisterClient(
    ::mojo::PendingRemote<GeicClient> client, GeicInitialStatePtr* out_initial_state) {
  base::RunLoop loop;
  proxy_->RegisterClient(
      std::move(client),
      base::BindOnce(
          [](base::RunLoop* loop,
             GeicInitialStatePtr* out_initial_state
,
             GeicInitialStatePtr initial_state) {*out_initial_state = std::move(initial_state);
            loop->Quit();
          },
          &loop,
          out_initial_state));
  loop.Run();
}

GeicInitialStatePtr GeicBrowserHostAsyncWaiter::RegisterClient(
    ::mojo::PendingRemote<GeicClient> client) {
  GeicInitialStatePtr async_wait_result;
  RegisterClient(std::move(client),&async_wait_result);
  return async_wait_result;
}

void GeicBrowserHostAsyncWaiter::GetFocusedTab(
    FocusedTabDataPtr* out_data) {
  base::RunLoop loop;
  proxy_->GetFocusedTab(
      base::BindOnce(
          [](base::RunLoop* loop,
             FocusedTabDataPtr* out_data
,
             FocusedTabDataPtr data) {*out_data = std::move(data);
            loop->Quit();
          },
          &loop,
          out_data));
  loop.Run();
}

FocusedTabDataPtr GeicBrowserHostAsyncWaiter::GetFocusedTab(
    ) {
  FocusedTabDataPtr async_wait_result;
  GetFocusedTab(&async_wait_result);
  return async_wait_result;
}




void GeicClientInterceptorForTesting::OnFocusedTabChanged(FocusedTabDataPtr data) {
  GetForwardingInterface()->OnFocusedTabChanged(
    std::move(data)
    );
}
GeicClientAsyncWaiter::GeicClientAsyncWaiter(
    GeicClient* proxy) : proxy_(proxy) {}

GeicClientAsyncWaiter::~GeicClientAsyncWaiter() = default;







}  // geic::mojom


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