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

#include "chrome/browser/glic/host/glic_webui.mojom-import-headers.h"
#include "chrome/browser/glic/host/glic_webui.mojom-test-utils.h"


namespace glic::mojom {
// The declaration includes the definition on other builds.

PreloadPage::IPCStableHashFunction PreloadPage::MessageToMethodInfo_(mojo::Message& message) {
#if !BUILDFLAG(IS_FUCHSIA)
  switch (static_cast<messages::PreloadPage>(message.name())) {
    case messages::PreloadPage::kSetProfileReadyState: {
      return &PreloadPage::SetProfileReadyState_Sym::IPCStableHash;
    }
    case messages::PreloadPage::kOnGuestNavigationStarted: {
      return &PreloadPage::OnGuestNavigationStarted_Sym::IPCStableHash;
    }
    case messages::PreloadPage::kOnGuestNavigated: {
      return &PreloadPage::OnGuestNavigated_Sym::IPCStableHash;
    }
    case messages::PreloadPage::kOnGuestProcessGone: {
      return &PreloadPage::OnGuestProcessGone_Sym::IPCStableHash;
    }
    case messages::PreloadPage::kWebClientStateChanged: {
      return &PreloadPage::WebClientStateChanged_Sym::IPCStableHash;
    }
  }
#endif  // !BUILDFLAG(IS_FUCHSIA)
  return nullptr;
}


const char* PreloadPage::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::PreloadPage>(message.name())) {
      case messages::PreloadPage::kSetProfileReadyState:
            return "Receive glic::mojom::PreloadPage::SetProfileReadyState";
      case messages::PreloadPage::kOnGuestNavigationStarted:
            return "Receive glic::mojom::PreloadPage::OnGuestNavigationStarted";
      case messages::PreloadPage::kOnGuestNavigated:
            return "Receive glic::mojom::PreloadPage::OnGuestNavigated";
      case messages::PreloadPage::kOnGuestProcessGone:
            return "Receive glic::mojom::PreloadPage::OnGuestProcessGone";
      case messages::PreloadPage::kWebClientStateChanged:
            return "Receive glic::mojom::PreloadPage::WebClientStateChanged";
    }
  } else {
    switch (static_cast<messages::PreloadPage>(message.name())) {
      case messages::PreloadPage::kSetProfileReadyState:
            return "Receive reply glic::mojom::PreloadPage::SetProfileReadyState";
      case messages::PreloadPage::kOnGuestNavigationStarted:
            return "Receive reply glic::mojom::PreloadPage::OnGuestNavigationStarted";
      case messages::PreloadPage::kOnGuestNavigated:
            return "Receive reply glic::mojom::PreloadPage::OnGuestNavigated";
      case messages::PreloadPage::kOnGuestProcessGone:
            return "Receive reply glic::mojom::PreloadPage::OnGuestProcessGone";
      case messages::PreloadPage::kWebClientStateChanged:
            return "Receive reply glic::mojom::PreloadPage::WebClientStateChanged";
    }
  }
  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 PreloadPage::SetProfileReadyState_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 = 0x04636491;  // IPCStableHash for glic::mojom::PreloadPage::SetProfileReadyState
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PreloadPage::OnGuestNavigationStarted_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 = 0x8a973811;  // IPCStableHash for glic::mojom::PreloadPage::OnGuestNavigationStarted
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PreloadPage::OnGuestNavigated_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 = 0xf964b39c;  // IPCStableHash for glic::mojom::PreloadPage::OnGuestNavigated
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PreloadPage::OnGuestProcessGone_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 = 0x82b6c23f;  // IPCStableHash for glic::mojom::PreloadPage::OnGuestProcessGone
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PreloadPage::WebClientStateChanged_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 = 0x06542472;  // IPCStableHash for glic::mojom::PreloadPage::WebClientStateChanged
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
# endif // !BUILDFLAG(IS_FUCHSIA)

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

void PreloadPageProxy::SetProfileReadyState(
    ProfileReadyState in_ready_state) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send glic::mojom::PreloadPage::SetProfileReadyState", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("ready_state"), in_ready_state,
                        "<value of type ProfileReadyState>");
   });
#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::PreloadPage::kSetProfileReadyState), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::PreloadPage_SetProfileReadyState_Params_Data> params(
          message);
  params.Allocate();

  
  mojo::internal::Serialize<::glic::mojom::ProfileReadyState>(
    in_ready_state,
    &params->ready_state);

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PreloadPage::Name_);
  message.set_method_name("SetProfileReadyState");
#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 PreloadPageProxy::OnGuestNavigationStarted(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send glic::mojom::PreloadPage::OnGuestNavigationStarted");
#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::PreloadPage::kOnGuestNavigationStarted), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::PreloadPage_OnGuestNavigationStarted_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PreloadPage::Name_);
  message.set_method_name("OnGuestNavigationStarted");
#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 PreloadPageProxy::OnGuestNavigated(
    const ::GURL& in_url, bool in_is_api_allowed, GuestPageType in_page_type, bool in_is_initial_commit) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send glic::mojom::PreloadPage::OnGuestNavigated", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("url"), in_url,
                        "<value of type const ::GURL&>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("is_api_allowed"), in_is_api_allowed,
                        "<value of type bool>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("page_type"), in_page_type,
                        "<value of type GuestPageType>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("is_initial_commit"), in_is_initial_commit,
                        "<value of type bool>");
   });
#endif

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

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

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PreloadPage::kOnGuestNavigated), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::PreloadPage_OnGuestNavigated_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->url)::BaseType> url_fragment(
          params.message());
  
  mojo::internal::Serialize<::url::mojom::UrlDataView>(
    in_url,
    url_fragment);

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

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

  params->is_api_allowed = in_is_api_allowed;

  
  mojo::internal::Serialize<::glic::mojom::GuestPageType>(
    in_page_type,
    &params->page_type);

  params->is_initial_commit = in_is_initial_commit;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PreloadPage::Name_);
  message.set_method_name("OnGuestNavigated");
#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 PreloadPageProxy::OnGuestProcessGone(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send glic::mojom::PreloadPage::OnGuestProcessGone");
#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::PreloadPage::kOnGuestProcessGone), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::PreloadPage_OnGuestProcessGone_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PreloadPage::Name_);
  message.set_method_name("OnGuestProcessGone");
#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 PreloadPageProxy::WebClientStateChanged(
    WebClientState in_state) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send glic::mojom::PreloadPage::WebClientStateChanged", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("state"), in_state,
                        "<value of type WebClientState>");
   });
#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::PreloadPage::kWebClientStateChanged), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::PreloadPage_WebClientStateChanged_Params_Data> params(
          message);
  params.Allocate();

  
  mojo::internal::Serialize<::glic::mojom::WebClientState>(
    in_state,
    &params->state);

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

      // Validation for PreloadPage.0
      bool success = true;
      ProfileReadyState p_ready_state{};
      PreloadPage_SetProfileReadyState_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadReadyState(&p_ready_state))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PreloadPage::Name_, 0, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->SetProfileReadyState(        
        std::move(p_ready_state));
      return true;
    }
    case messages::PreloadPage::kOnGuestNavigationStarted: {
      DCHECK(message->is_serialized());
      internal::PreloadPage_OnGuestNavigationStarted_Params_Data* params =
          reinterpret_cast<internal::PreloadPage_OnGuestNavigationStarted_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PreloadPage.1
      bool success = true;
      PreloadPage_OnGuestNavigationStarted_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PreloadPage::Name_, 1, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OnGuestNavigationStarted(        );
      return true;
    }
    case messages::PreloadPage::kOnGuestNavigated: {
      DCHECK(message->is_serialized());
      internal::PreloadPage_OnGuestNavigated_Params_Data* params =
          reinterpret_cast<internal::PreloadPage_OnGuestNavigated_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PreloadPage.2
      bool success = true;
      ::GURL p_url{};
      bool p_is_api_allowed{};
      GuestPageType p_page_type{};
      bool p_is_initial_commit{};
      PreloadPage_OnGuestNavigated_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadUrl(&p_url))
        success = false;
      if (success)
        p_is_api_allowed = input_data_view.is_api_allowed();
      if (success && !input_data_view.ReadPageType(&p_page_type))
        success = false;
      if (success)
        p_is_initial_commit = input_data_view.is_initial_commit();
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PreloadPage::Name_, 2, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OnGuestNavigated(        
        std::move(p_url), 
        std::move(p_is_api_allowed), 
        std::move(p_page_type), 
        std::move(p_is_initial_commit));
      return true;
    }
    case messages::PreloadPage::kOnGuestProcessGone: {
      DCHECK(message->is_serialized());
      internal::PreloadPage_OnGuestProcessGone_Params_Data* params =
          reinterpret_cast<internal::PreloadPage_OnGuestProcessGone_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PreloadPage.3
      bool success = true;
      PreloadPage_OnGuestProcessGone_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PreloadPage::Name_, 3, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OnGuestProcessGone(        );
      return true;
    }
    case messages::PreloadPage::kWebClientStateChanged: {
      DCHECK(message->is_serialized());
      internal::PreloadPage_WebClientStateChanged_Params_Data* params =
          reinterpret_cast<internal::PreloadPage_WebClientStateChanged_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PreloadPage.4
      bool success = true;
      WebClientState p_state{};
      PreloadPage_WebClientStateChanged_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadState(&p_state))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PreloadPage::Name_, 4, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->WebClientStateChanged(        
        std::move(p_state));
      return true;
    }
  }
  return false;
}

// static
bool PreloadPageStubDispatch::AcceptWithResponder(
    PreloadPage* 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::PreloadPage>(message->header()->name)) {
    case messages::PreloadPage::kSetProfileReadyState: {
      break;
    }
    case messages::PreloadPage::kOnGuestNavigationStarted: {
      break;
    }
    case messages::PreloadPage::kOnGuestNavigated: {
      break;
    }
    case messages::PreloadPage::kOnGuestProcessGone: {
      break;
    }
    case messages::PreloadPage::kWebClientStateChanged: {
      break;
    }
  }
  return false;
}
namespace {
}  // namespace
static const mojo::internal::GenericValidationInfo kPreloadPageValidationInfo[] = {
    { &internal::PreloadPage_SetProfileReadyState_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PreloadPage_OnGuestNavigationStarted_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PreloadPage_OnGuestNavigated_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PreloadPage_OnGuestProcessGone_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PreloadPage_WebClientStateChanged_Params_Data::Validate,
     nullptr /* no response */},
};

bool PreloadPageRequestValidator::Accept(mojo::Message* message) {
  return mojo::internal::ValidateRequestGenericPacked(
    message,
    ::glic::mojom::PreloadPage::Name_,
    kPreloadPageValidationInfo);
}

// 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::kIntentToShow: {
      return &Page::IntentToShow_Sym::IPCStableHash;
    }
    case messages::Page::kSetProfileReadyState: {
      return &Page::SetProfileReadyState_Sym::IPCStableHash;
    }
    case messages::Page::kUpdatePageState: {
      return &Page::UpdatePageState_Sym::IPCStableHash;
    }
    case messages::Page::kClientReadyStateChanged: {
      return &Page::ClientReadyStateChanged_Sym::IPCStableHash;
    }
    case messages::Page::kZoom: {
      return &Page::Zoom_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::kIntentToShow:
            return "Receive glic::mojom::Page::IntentToShow";
      case messages::Page::kSetProfileReadyState:
            return "Receive glic::mojom::Page::SetProfileReadyState";
      case messages::Page::kUpdatePageState:
            return "Receive glic::mojom::Page::UpdatePageState";
      case messages::Page::kClientReadyStateChanged:
            return "Receive glic::mojom::Page::ClientReadyStateChanged";
      case messages::Page::kZoom:
            return "Receive glic::mojom::Page::Zoom";
    }
  } else {
    switch (static_cast<messages::Page>(message.name())) {
      case messages::Page::kIntentToShow:
            return "Receive reply glic::mojom::Page::IntentToShow";
      case messages::Page::kSetProfileReadyState:
            return "Receive reply glic::mojom::Page::SetProfileReadyState";
      case messages::Page::kUpdatePageState:
            return "Receive reply glic::mojom::Page::UpdatePageState";
      case messages::Page::kClientReadyStateChanged:
            return "Receive reply glic::mojom::Page::ClientReadyStateChanged";
      case messages::Page::kZoom:
            return "Receive reply glic::mojom::Page::Zoom";
    }
  }
  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::IntentToShow_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 = 0xc8a3395b;  // IPCStableHash for glic::mojom::Page::IntentToShow
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::SetProfileReadyState_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 = 0x946e3d49;  // IPCStableHash for glic::mojom::Page::SetProfileReadyState
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::UpdatePageState_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 = 0x4bbd61ba;  // IPCStableHash for glic::mojom::Page::UpdatePageState
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::ClientReadyStateChanged_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 = 0x15a9c605;  // IPCStableHash for glic::mojom::Page::ClientReadyStateChanged
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t Page::Zoom_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 = 0xf5b7dab7;  // IPCStableHash for glic::mojom::Page::Zoom
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
# endif // !BUILDFLAG(IS_FUCHSIA)

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

void PageProxy::IntentToShow(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send glic::mojom::Page::IntentToShow");
#endif

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

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

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::Page::kIntentToShow), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::Page_IntentToShow_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("IntentToShow");
#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::SetProfileReadyState(
    ProfileReadyState in_ready_state) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send glic::mojom::Page::SetProfileReadyState", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("ready_state"), in_ready_state,
                        "<value of type ProfileReadyState>");
   });
#endif

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

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

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::Page::kSetProfileReadyState), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::Page_SetProfileReadyState_Params_Data> params(
          message);
  params.Allocate();

  
  mojo::internal::Serialize<::glic::mojom::ProfileReadyState>(
    in_ready_state,
    &params->ready_state);

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("SetProfileReadyState");
#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::UpdatePageState(
    ::glic::mojom::PanelStateKind in_panelStateKind) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send glic::mojom::Page::UpdatePageState", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("panelStateKind"), in_panelStateKind,
                        "<value of type ::glic::mojom::PanelStateKind>");
   });
#endif

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

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

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::Page::kUpdatePageState), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::Page_UpdatePageState_Params_Data> params(
          message);
  params.Allocate();

  
  mojo::internal::Serialize<::glic::mojom::PanelStateKind>(
    in_panelStateKind,
    &params->panelStateKind);

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

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

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

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::Page::kClientReadyStateChanged), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::Page_ClientReadyStateChanged_Params_Data> params(
          message);
  params.Allocate();

  params->ready = in_ready;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(Page::Name_);
  message.set_method_name("ClientReadyStateChanged");
#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::Zoom(
    ZoomAction in_action) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send glic::mojom::Page::Zoom", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("action"), in_action,
                        "<value of type ZoomAction>");
   });
#endif

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

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

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::Page::kZoom), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::Page_Zoom_Params_Data> params(
          message);
  params.Allocate();

  
  mojo::internal::Serialize<::glic::mojom::ZoomAction>(
    in_action,
    &params->action);

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

      // Validation for Page.0
      bool success = true;
      Page_IntentToShow_ParamsDataView input_data_view(params, message);
      
      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->IntentToShow(        );
      return true;
    }
    case messages::Page::kSetProfileReadyState: {
      DCHECK(message->is_serialized());
      internal::Page_SetProfileReadyState_Params_Data* params =
          reinterpret_cast<internal::Page_SetProfileReadyState_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.1
      bool success = true;
      ProfileReadyState p_ready_state{};
      Page_SetProfileReadyState_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadReadyState(&p_ready_state))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            Page::Name_, 1, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->SetProfileReadyState(        
        std::move(p_ready_state));
      return true;
    }
    case messages::Page::kUpdatePageState: {
      DCHECK(message->is_serialized());
      internal::Page_UpdatePageState_Params_Data* params =
          reinterpret_cast<internal::Page_UpdatePageState_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.2
      bool success = true;
      ::glic::mojom::PanelStateKind p_panelStateKind{};
      Page_UpdatePageState_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadPanelStateKind(&p_panelStateKind))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            Page::Name_, 2, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->UpdatePageState(        
        std::move(p_panelStateKind));
      return true;
    }
    case messages::Page::kClientReadyStateChanged: {
      DCHECK(message->is_serialized());
      internal::Page_ClientReadyStateChanged_Params_Data* params =
          reinterpret_cast<internal::Page_ClientReadyStateChanged_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.3
      bool success = true;
      bool p_ready{};
      Page_ClientReadyStateChanged_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_ready = input_data_view.ready();
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            Page::Name_, 3, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->ClientReadyStateChanged(        
        std::move(p_ready));
      return true;
    }
    case messages::Page::kZoom: {
      DCHECK(message->is_serialized());
      internal::Page_Zoom_Params_Data* params =
          reinterpret_cast<internal::Page_Zoom_Params_Data*>(
              message->mutable_payload());
      

      // Validation for Page.4
      bool success = true;
      ZoomAction p_action{};
      Page_Zoom_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadAction(&p_action))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            Page::Name_, 4, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->Zoom(        
        std::move(p_action));
      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::kIntentToShow: {
      break;
    }
    case messages::Page::kSetProfileReadyState: {
      break;
    }
    case messages::Page::kUpdatePageState: {
      break;
    }
    case messages::Page::kClientReadyStateChanged: {
      break;
    }
    case messages::Page::kZoom: {
      break;
    }
  }
  return false;
}
namespace {
}  // namespace
static const mojo::internal::GenericValidationInfo kPageValidationInfo[] = {
    { &internal::Page_IntentToShow_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::Page_SetProfileReadyState_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::Page_UpdatePageState_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::Page_ClientReadyStateChanged_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::Page_Zoom_Params_Data::Validate,
     nullptr /* no response */},
};

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

// The declaration includes the definition on other builds.

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


const char* GlicPreloadHandler::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::GlicPreloadHandler>(message.name())) {
      case messages::GlicPreloadHandler::kPrepareForClient:
            return "Receive glic::mojom::GlicPreloadHandler::PrepareForClient";
    }
  } else {
    switch (static_cast<messages::GlicPreloadHandler>(message.name())) {
      case messages::GlicPreloadHandler::kPrepareForClient:
            return "Receive reply glic::mojom::GlicPreloadHandler::PrepareForClient";
    }
  }
  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 GlicPreloadHandler::PrepareForClient_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 = 0x7211d6b6;  // IPCStableHash for glic::mojom::GlicPreloadHandler::PrepareForClient
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
# endif // !BUILDFLAG(IS_FUCHSIA)

class GlicPreloadHandler_PrepareForClient_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  GlicPreloadHandler_PrepareForClient_ForwardToCallback(
      GlicPreloadHandler::PrepareForClientCallback callback
      ) : callback_(std::move(callback)) {
  }

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

  bool Accept(mojo::Message* message) override;
 private:
  GlicPreloadHandler::PrepareForClientCallback callback_;
};

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

void GlicPreloadHandlerProxy::PrepareForClient(
    PrepareForClientCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send glic::mojom::GlicPreloadHandler::PrepareForClient");
#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::GlicPreloadHandler::kPrepareForClient), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::GlicPreloadHandler_PrepareForClient_Params_Data> params(
          message);
  params.Allocate();

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

  ~GlicPreloadHandler_PrepareForClient_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:
  GlicPreloadHandler_PrepareForClient_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)
        << "GlicPreloadHandler::PrepareForClientCallback 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(
      PrepareForClientResult in_result);
};

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

  // Validation for GlicPreloadHandler.0
  bool success = true;
  PrepareForClientResult p_result{};
  GlicPreloadHandler_PrepareForClient_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,
        GlicPreloadHandler::Name_, 0, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_result));
  }
  return true;
}

void GlicPreloadHandler_PrepareForClient_ProxyToResponder::Run(
    PrepareForClientResult in_result) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply glic::mojom::GlicPreloadHandler::PrepareForClient", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("result"), in_result,
                        "<value of type PrepareForClientResult>");
   });
#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::GlicPreloadHandler::kPrepareForClient), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::GlicPreloadHandler_PrepareForClient_ResponseParams_Data> params(
          message);
  params.Allocate();

  
  mojo::internal::Serialize<::glic::mojom::PrepareForClientResult>(
    in_result,
    &params->result);

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(GlicPreloadHandler::Name_);
  message.set_method_name("PrepareForClient");
#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 GlicPreloadHandlerStubDispatch::Accept(
    GlicPreloadHandler* impl,
    mojo::Message* message) {
  switch (static_cast<messages::GlicPreloadHandler>(message->header()->name)) {
    case messages::GlicPreloadHandler::kPrepareForClient: {
      break;
    }
  }
  return false;
}

// static
bool GlicPreloadHandlerStubDispatch::AcceptWithResponder(
    GlicPreloadHandler* 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::GlicPreloadHandler>(message->header()->name)) {
    case messages::GlicPreloadHandler::kPrepareForClient: {
      internal::GlicPreloadHandler_PrepareForClient_Params_Data* params =
          reinterpret_cast<
              internal::GlicPreloadHandler_PrepareForClient_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for GlicPreloadHandler.0
      bool success = true;
      GlicPreloadHandler_PrepareForClient_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            GlicPreloadHandler::Name_, 0, false);
        return false;
      }
      auto callback =
          GlicPreloadHandler_PrepareForClient_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->PrepareForClient(std::move(callback));
      return true;
    }
  }
  return false;
}
namespace {
}  // namespace
static const mojo::internal::GenericValidationInfo kGlicPreloadHandlerValidationInfo[] = {
    { &internal::GlicPreloadHandler_PrepareForClient_Params_Data::Validate,
     &internal::GlicPreloadHandler_PrepareForClient_ResponseParams_Data::Validate},
};

bool GlicPreloadHandlerRequestValidator::Accept(mojo::Message* message) {
  return mojo::internal::ValidateRequestGenericPacked(
    message,
    ::glic::mojom::GlicPreloadHandler::Name_,
    kGlicPreloadHandlerValidationInfo);
}

bool GlicPreloadHandlerResponseValidator::Accept(mojo::Message* message) {
  return mojo::internal::ValidateResponseGenericPacked(
    message,
    ::glic::mojom::GlicPreloadHandler::Name_,
    kGlicPreloadHandlerValidationInfo);
}
// The declaration includes the definition on other builds.

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


const char* GlicPreloadHandlerFactory::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::GlicPreloadHandlerFactory>(message.name())) {
      case messages::GlicPreloadHandlerFactory::kCreatePreloadHandler:
            return "Receive glic::mojom::GlicPreloadHandlerFactory::CreatePreloadHandler";
    }
  } else {
    switch (static_cast<messages::GlicPreloadHandlerFactory>(message.name())) {
      case messages::GlicPreloadHandlerFactory::kCreatePreloadHandler:
            return "Receive reply glic::mojom::GlicPreloadHandlerFactory::CreatePreloadHandler";
    }
  }
  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 GlicPreloadHandlerFactory::CreatePreloadHandler_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 = 0xfe7d4e15;  // IPCStableHash for glic::mojom::GlicPreloadHandlerFactory::CreatePreloadHandler
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
# endif // !BUILDFLAG(IS_FUCHSIA)

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

void GlicPreloadHandlerFactoryProxy::CreatePreloadHandler(
    ::mojo::PendingReceiver<GlicPreloadHandler> in_receiver, ::mojo::PendingRemote<PreloadPage> in_page) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send glic::mojom::GlicPreloadHandlerFactory::CreatePreloadHandler", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("receiver"), in_receiver,
                        "<value of type ::mojo::PendingReceiver<GlicPreloadHandler>>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("page"), in_page,
                        "<value of type ::mojo::PendingRemote<PreloadPage>>");
   });
#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::GlicPreloadHandlerFactory::kCreatePreloadHandler), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::GlicPreloadHandlerFactory_CreatePreloadHandler_Params_Data> params(
          message);
  params.Allocate();

  
  mojo::internal::Serialize<mojo::InterfaceRequestDataView<::glic::mojom::GlicPreloadHandlerInterfaceBase>>(
    in_receiver,
    &params->receiver,
    &params.message());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(!mojo::internal::IsHandleOrInterfaceValid(params->receiver)),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_HANDLE,
    "invalid receiver in GlicPreloadHandlerFactory.CreatePreloadHandler request");

  
  mojo::internal::Serialize<mojo::InterfacePtrDataView<::glic::mojom::PreloadPageInterfaceBase>>(
    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 GlicPreloadHandlerFactory.CreatePreloadHandler request");

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

      // Validation for GlicPreloadHandlerFactory.0
      bool success = true;
      ::mojo::PendingReceiver<GlicPreloadHandler> p_receiver{};
      ::mojo::PendingRemote<PreloadPage> p_page{};
      GlicPreloadHandlerFactory_CreatePreloadHandler_ParamsDataView input_data_view(params, message);
      
      if (success) {
        p_receiver =
            input_data_view.TakeReceiver<decltype(p_receiver)>();
      }
      if (success) {
        p_page =
            input_data_view.TakePage<decltype(p_page)>();
      }
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            GlicPreloadHandlerFactory::Name_, 0, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->CreatePreloadHandler(        
        std::move(p_receiver), 
        std::move(p_page));
      return true;
    }
  }
  return false;
}

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

bool GlicPreloadHandlerFactoryRequestValidator::Accept(mojo::Message* message) {
  return mojo::internal::ValidateRequestGenericPacked(
    message,
    ::glic::mojom::GlicPreloadHandlerFactory::Name_,
    kGlicPreloadHandlerFactoryValidationInfo);
}

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

class PageHandlerFactory_CreatePageHandler_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandlerFactory_CreatePageHandler_ForwardToCallback(
      PageHandlerFactory::CreatePageHandlerCallback callback
      ) : callback_(std::move(callback)) {
  }

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

  bool Accept(mojo::Message* message) override;
 private:
  PageHandlerFactory::CreatePageHandlerCallback callback_;
};

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

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

  
  mojo::internal::Serialize<mojo::InterfaceRequestDataView<::glic::mojom::PageHandlerInterfaceBase>>(
    in_receiver,
    &params->receiver,
    &params.message());

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

  
  mojo::internal::Serialize<mojo::InterfacePtrDataView<::glic::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");

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

  ~PageHandlerFactory_CreatePageHandler_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:
  PageHandlerFactory_CreatePageHandler_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)
        << "PageHandlerFactory::CreatePageHandlerCallback was destroyed without "
        << "first either being run or its corresponding binding being closed. "
        << "It is an error to drop response callbacks which still correspond "
        << "to an open interface pipe.";
  }
#endif

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

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

  // Validation for PageHandlerFactory.0
  bool success = true;
  std::string p_instance_id{};
  PageHandlerFactory_CreatePageHandler_ResponseParamsDataView input_data_view(params, message);
  
  if (success && !input_data_view.ReadInstanceId(&p_instance_id))
    success = false;
  if (!success) {
    ReportValidationErrorForMessage(
        message,
        mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
        PageHandlerFactory::Name_, 0, true);
    return false;
  }
  if (!callback_.is_null()) {
    std::move(callback_).Run(
std::move(p_instance_id));
  }
  return true;
}

void PageHandlerFactory_CreatePageHandler_ProxyToResponder::Run(
    const std::string& in_instance_id) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply glic::mojom::PageHandlerFactory::CreatePageHandler", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("instance_id"), in_instance_id,
                        "<value of type const std::string&>");
   });
#endif

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

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandlerFactory::kCreatePageHandler), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::PageHandlerFactory_CreatePageHandler_ResponseParams_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->instance_id)::BaseType> instance_id_fragment(
          params.message());
  
  mojo::internal::Serialize<mojo::StringDataView>(
    in_instance_id,
    instance_id_fragment);

  params->instance_id.Set(
      instance_id_fragment.is_null() ? nullptr : instance_id_fragment.data());

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

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

      // Validation for PageHandlerFactory.0
      bool success = true;
      ::mojo::PendingReceiver<PageHandler> p_receiver{};
      ::mojo::PendingRemote<Page> p_page{};
      PageHandlerFactory_CreatePageHandler_ParamsDataView input_data_view(params, message);
      
      if (success) {
        p_receiver =
            input_data_view.TakeReceiver<decltype(p_receiver)>();
      }
      if (success) {
        p_page =
            input_data_view.TakePage<decltype(p_page)>();
      }
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandlerFactory::Name_, 0, false);
        return false;
      }
      auto callback =
          PageHandlerFactory_CreatePageHandler_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->CreatePageHandler(        
        std::move(p_receiver), 
        std::move(p_page), std::move(callback));
      return true;
    }
  }
  return false;
}
namespace {
}  // namespace
static const mojo::internal::GenericValidationInfo kPageHandlerFactoryValidationInfo[] = {
    { &internal::PageHandlerFactory_CreatePageHandler_Params_Data::Validate,
     &internal::PageHandlerFactory_CreatePageHandler_ResponseParams_Data::Validate},
};

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

bool PageHandlerFactoryResponseValidator::Accept(mojo::Message* message) {
  return mojo::internal::ValidateResponseGenericPacked(
    message,
    ::glic::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::kCreateWebClient: {
      return &PageHandler::CreateWebClient_Sym::IPCStableHash;
    }
    case messages::PageHandler::kPrepareForClient: {
      return &PageHandler::PrepareForClient_Sym::IPCStableHash;
    }
    case messages::PageHandler::kWebviewCommitted: {
      return &PageHandler::WebviewCommitted_Sym::IPCStableHash;
    }
    case messages::PageHandler::kOnZoomLevelChange: {
      return &PageHandler::OnZoomLevelChange_Sym::IPCStableHash;
    }
    case messages::PageHandler::kClosePanel: {
      return &PageHandler::ClosePanel_Sym::IPCStableHash;
    }
    case messages::PageHandler::kOpenHelpCenterTopicAndClosePanel: {
      return &PageHandler::OpenHelpCenterTopicAndClosePanel_Sym::IPCStableHash;
    }
    case messages::PageHandler::kOpenProfilePickerAndClosePanel: {
      return &PageHandler::OpenProfilePickerAndClosePanel_Sym::IPCStableHash;
    }
    case messages::PageHandler::kOpenDisabledByAdminLinkAndClosePanel: {
      return &PageHandler::OpenDisabledByAdminLinkAndClosePanel_Sym::IPCStableHash;
    }
    case messages::PageHandler::kSignInAndClosePanel: {
      return &PageHandler::SignInAndClosePanel_Sym::IPCStableHash;
    }
    case messages::PageHandler::kResizeWidget: {
      return &PageHandler::ResizeWidget_Sym::IPCStableHash;
    }
    case messages::PageHandler::kEnableDragResize: {
      return &PageHandler::EnableDragResize_Sym::IPCStableHash;
    }
    case messages::PageHandler::kOnWebUiStateChanged: {
      return &PageHandler::OnWebUiStateChanged_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::kCreateWebClient:
            return "Receive glic::mojom::PageHandler::CreateWebClient";
      case messages::PageHandler::kPrepareForClient:
            return "Receive glic::mojom::PageHandler::PrepareForClient";
      case messages::PageHandler::kWebviewCommitted:
            return "Receive glic::mojom::PageHandler::WebviewCommitted";
      case messages::PageHandler::kOnZoomLevelChange:
            return "Receive glic::mojom::PageHandler::OnZoomLevelChange";
      case messages::PageHandler::kClosePanel:
            return "Receive glic::mojom::PageHandler::ClosePanel";
      case messages::PageHandler::kOpenHelpCenterTopicAndClosePanel:
            return "Receive glic::mojom::PageHandler::OpenHelpCenterTopicAndClosePanel";
      case messages::PageHandler::kOpenProfilePickerAndClosePanel:
            return "Receive glic::mojom::PageHandler::OpenProfilePickerAndClosePanel";
      case messages::PageHandler::kOpenDisabledByAdminLinkAndClosePanel:
            return "Receive glic::mojom::PageHandler::OpenDisabledByAdminLinkAndClosePanel";
      case messages::PageHandler::kSignInAndClosePanel:
            return "Receive glic::mojom::PageHandler::SignInAndClosePanel";
      case messages::PageHandler::kResizeWidget:
            return "Receive glic::mojom::PageHandler::ResizeWidget";
      case messages::PageHandler::kEnableDragResize:
            return "Receive glic::mojom::PageHandler::EnableDragResize";
      case messages::PageHandler::kOnWebUiStateChanged:
            return "Receive glic::mojom::PageHandler::OnWebUiStateChanged";
    }
  } else {
    switch (static_cast<messages::PageHandler>(message.name())) {
      case messages::PageHandler::kCreateWebClient:
            return "Receive reply glic::mojom::PageHandler::CreateWebClient";
      case messages::PageHandler::kPrepareForClient:
            return "Receive reply glic::mojom::PageHandler::PrepareForClient";
      case messages::PageHandler::kWebviewCommitted:
            return "Receive reply glic::mojom::PageHandler::WebviewCommitted";
      case messages::PageHandler::kOnZoomLevelChange:
            return "Receive reply glic::mojom::PageHandler::OnZoomLevelChange";
      case messages::PageHandler::kClosePanel:
            return "Receive reply glic::mojom::PageHandler::ClosePanel";
      case messages::PageHandler::kOpenHelpCenterTopicAndClosePanel:
            return "Receive reply glic::mojom::PageHandler::OpenHelpCenterTopicAndClosePanel";
      case messages::PageHandler::kOpenProfilePickerAndClosePanel:
            return "Receive reply glic::mojom::PageHandler::OpenProfilePickerAndClosePanel";
      case messages::PageHandler::kOpenDisabledByAdminLinkAndClosePanel:
            return "Receive reply glic::mojom::PageHandler::OpenDisabledByAdminLinkAndClosePanel";
      case messages::PageHandler::kSignInAndClosePanel:
            return "Receive reply glic::mojom::PageHandler::SignInAndClosePanel";
      case messages::PageHandler::kResizeWidget:
            return "Receive reply glic::mojom::PageHandler::ResizeWidget";
      case messages::PageHandler::kEnableDragResize:
            return "Receive reply glic::mojom::PageHandler::EnableDragResize";
      case messages::PageHandler::kOnWebUiStateChanged:
            return "Receive reply glic::mojom::PageHandler::OnWebUiStateChanged";
    }
  }
  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::CreateWebClient_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 = 0x93bcdc3a;  // IPCStableHash for glic::mojom::PageHandler::CreateWebClient
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::PrepareForClient_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 = 0xbfaaed9f;  // IPCStableHash for glic::mojom::PageHandler::PrepareForClient
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::WebviewCommitted_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 = 0xa01f6fcc;  // IPCStableHash for glic::mojom::PageHandler::WebviewCommitted
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::OnZoomLevelChange_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 = 0xe9503adf;  // IPCStableHash for glic::mojom::PageHandler::OnZoomLevelChange
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::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 = 0xf5f6f919;  // IPCStableHash for glic::mojom::PageHandler::ClosePanel
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::OpenHelpCenterTopicAndClosePanel_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 = 0x09aeb0e8;  // IPCStableHash for glic::mojom::PageHandler::OpenHelpCenterTopicAndClosePanel
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::OpenProfilePickerAndClosePanel_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 = 0x0b4330bf;  // IPCStableHash for glic::mojom::PageHandler::OpenProfilePickerAndClosePanel
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::OpenDisabledByAdminLinkAndClosePanel_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 = 0x08b5eccd;  // IPCStableHash for glic::mojom::PageHandler::OpenDisabledByAdminLinkAndClosePanel
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::SignInAndClosePanel_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 = 0xb3dba5d3;  // IPCStableHash for glic::mojom::PageHandler::SignInAndClosePanel
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::ResizeWidget_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 = 0xf0d016d6;  // IPCStableHash for glic::mojom::PageHandler::ResizeWidget
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::EnableDragResize_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 = 0x90845c5a;  // IPCStableHash for glic::mojom::PageHandler::EnableDragResize
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::OnWebUiStateChanged_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 = 0x9c35374a;  // IPCStableHash for glic::mojom::PageHandler::OnWebUiStateChanged
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
# endif // !BUILDFLAG(IS_FUCHSIA)

class PageHandler_PrepareForClient_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_PrepareForClient_ForwardToCallback(
      PageHandler::PrepareForClientCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_ClosePanel_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_ClosePanel_ForwardToCallback(
      PageHandler::ClosePanelCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_ResizeWidget_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_ResizeWidget_ForwardToCallback(
      PageHandler::ResizeWidgetCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

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

void PageHandlerProxy::CreateWebClient(
    ::mojo::PendingReceiver<::glic::mojom::WebClientHandler> in_web_client_receiver) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send glic::mojom::PageHandler::CreateWebClient", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("web_client_receiver"), in_web_client_receiver,
                        "<value of type ::mojo::PendingReceiver<::glic::mojom::WebClientHandler>>");
   });
#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::kCreateWebClient), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::PageHandler_CreateWebClient_Params_Data> params(
          message);
  params.Allocate();

  
  mojo::internal::Serialize<mojo::InterfaceRequestDataView<::glic::mojom::WebClientHandlerInterfaceBase>>(
    in_web_client_receiver,
    &params->web_client_receiver,
    &params.message());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(!mojo::internal::IsHandleOrInterfaceValid(params->web_client_receiver)),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_HANDLE,
    "invalid web_client_receiver in PageHandler.CreateWebClient request");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("CreateWebClient");
#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::PrepareForClient(
    PrepareForClientCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send glic::mojom::PageHandler::PrepareForClient");
#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::kPrepareForClient), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::PageHandler_PrepareForClient_Params_Data> params(
          message);
  params.Allocate();

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

void PageHandlerProxy::WebviewCommitted(
    const ::GURL& in_url) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send glic::mojom::PageHandler::WebviewCommitted", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("url"), in_url,
                        "<value of type const ::GURL&>");
   });
#endif

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

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

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandler::kWebviewCommitted), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::PageHandler_WebviewCommitted_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->url)::BaseType> url_fragment(
          params.message());
  
  mojo::internal::Serialize<::url::mojom::UrlDataView>(
    in_url,
    url_fragment);

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

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

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("WebviewCommitted");
#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::OnZoomLevelChange(
    double in_zoom_factor) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send glic::mojom::PageHandler::OnZoomLevelChange", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("zoom_factor"), in_zoom_factor,
                        "<value of type double>");
   });
#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::kOnZoomLevelChange), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::PageHandler_OnZoomLevelChange_Params_Data> params(
          message);
  params.Allocate();

  params->zoom_factor = in_zoom_factor;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("OnZoomLevelChange");
#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::ClosePanel(
    ClosePanelCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send glic::mojom::PageHandler::ClosePanel");
#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::kClosePanel), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::PageHandler_ClosePanel_Params_Data> params(
          message);
  params.Allocate();

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

void PageHandlerProxy::OpenHelpCenterTopicAndClosePanel(
    HelpCenterTopic in_topic) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send glic::mojom::PageHandler::OpenHelpCenterTopicAndClosePanel", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("topic"), in_topic,
                        "<value of type HelpCenterTopic>");
   });
#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::kOpenHelpCenterTopicAndClosePanel), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::PageHandler_OpenHelpCenterTopicAndClosePanel_Params_Data> params(
          message);
  params.Allocate();

  
  mojo::internal::Serialize<::glic::mojom::HelpCenterTopic>(
    in_topic,
    &params->topic);

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("OpenHelpCenterTopicAndClosePanel");
#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::OpenProfilePickerAndClosePanel(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send glic::mojom::PageHandler::OpenProfilePickerAndClosePanel");
#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::kOpenProfilePickerAndClosePanel), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::PageHandler_OpenProfilePickerAndClosePanel_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("OpenProfilePickerAndClosePanel");
#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::OpenDisabledByAdminLinkAndClosePanel(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send glic::mojom::PageHandler::OpenDisabledByAdminLinkAndClosePanel");
#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::kOpenDisabledByAdminLinkAndClosePanel), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::PageHandler_OpenDisabledByAdminLinkAndClosePanel_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("OpenDisabledByAdminLinkAndClosePanel");
#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::SignInAndClosePanel(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send glic::mojom::PageHandler::SignInAndClosePanel");
#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::kSignInAndClosePanel), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::PageHandler_SignInAndClosePanel_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("SignInAndClosePanel");
#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::ResizeWidget(
    const ::gfx::Size& in_size, ::base::TimeDelta in_duration, ResizeWidgetCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send glic::mojom::PageHandler::ResizeWidget", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("size"), in_size,
                        "<value of type const ::gfx::Size&>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("duration"), in_duration,
                        "<value of type ::base::TimeDelta>");
   });
#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::kResizeWidget), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::PageHandler_ResizeWidget_Params_Data> params(
          message);
  params.Allocate();
  mojo::internal::MessageFragment<
      typename decltype(params->size)::BaseType> size_fragment(
          params.message());
  
  mojo::internal::Serialize<::gfx::mojom::SizeDataView>(
    in_size,
    size_fragment);

  params->size.Set(
      size_fragment.is_null() ? nullptr : size_fragment.data());

  
  MOJO_INTERNAL_CHECK_SERIALIZATION(
    mojo::internal::SendValidation::kDefault,
    !(params->size.is_null()),
    mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
    "null size in PageHandler.ResizeWidget request");
  mojo::internal::MessageFragment<
      typename decltype(params->duration)::BaseType> duration_fragment(
          params.message());
  
  mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView>(
    in_duration,
    duration_fragment);

  params->duration.Set(
      duration_fragment.is_null() ? nullptr : duration_fragment.data());

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

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

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

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

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

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

  params->enabled = in_enabled;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("EnableDragResize");
#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::OnWebUiStateChanged(
    WebUiState in_new_state) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send glic::mojom::PageHandler::OnWebUiStateChanged", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("new_state"), in_new_state,
                        "<value of type WebUiState>");
   });
#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::kOnWebUiStateChanged), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::PageHandler_OnWebUiStateChanged_Params_Data> params(
          message);
  params.Allocate();

  
  mojo::internal::Serialize<::glic::mojom::WebUiState>(
    in_new_state,
    &params->new_state);

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

  ~PageHandler_PrepareForClient_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_PrepareForClient_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::PrepareForClientCallback 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(
      PrepareForClientResult in_result);
};

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

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

void PageHandler_PrepareForClient_ProxyToResponder::Run(
    PrepareForClientResult in_result) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply glic::mojom::PageHandler::PrepareForClient", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("result"), in_result,
                        "<value of type PrepareForClientResult>");
   });
#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::kPrepareForClient), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::PageHandler_PrepareForClient_ResponseParams_Data> params(
          message);
  params.Allocate();

  
  mojo::internal::Serialize<::glic::mojom::PrepareForClientResult>(
    in_result,
    &params->result);

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

  ~PageHandler_ClosePanel_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_ClosePanel_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::ClosePanelCallback 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_ClosePanel_ForwardToCallback::Accept(
    mojo::Message* message) {
  DCHECK(message->is_serialized());
  internal::PageHandler_ClosePanel_ResponseParams_Data* params =
      reinterpret_cast<
          internal::PageHandler_ClosePanel_ResponseParams_Data*>(
              message->mutable_payload());
  

  // Validation for PageHandler.4
  bool success = true;
  PageHandler_ClosePanel_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_ClosePanel_ProxyToResponder::Run(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send reply glic::mojom::PageHandler::ClosePanel");
#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::kClosePanel), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::PageHandler_ClosePanel_ResponseParams_Data> params(
          message);
  params.Allocate();

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

  ~PageHandler_ResizeWidget_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_ResizeWidget_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::ResizeWidgetCallback 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_ResizeWidget_ForwardToCallback::Accept(
    mojo::Message* message) {
  DCHECK(message->is_serialized());
  internal::PageHandler_ResizeWidget_ResponseParams_Data* params =
      reinterpret_cast<
          internal::PageHandler_ResizeWidget_ResponseParams_Data*>(
              message->mutable_payload());
  

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

void PageHandler_ResizeWidget_ProxyToResponder::Run(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send reply glic::mojom::PageHandler::ResizeWidget");
#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::kResizeWidget), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::glic::mojom::internal::PageHandler_ResizeWidget_ResponseParams_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("ResizeWidget");
#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::kCreateWebClient: {
      DCHECK(message->is_serialized());
      internal::PageHandler_CreateWebClient_Params_Data* params =
          reinterpret_cast<internal::PageHandler_CreateWebClient_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.0
      bool success = true;
      ::mojo::PendingReceiver<::glic::mojom::WebClientHandler> p_web_client_receiver{};
      PageHandler_CreateWebClient_ParamsDataView input_data_view(params, message);
      
      if (success) {
        p_web_client_receiver =
            input_data_view.TakeWebClientReceiver<decltype(p_web_client_receiver)>();
      }
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 0, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->CreateWebClient(        
        std::move(p_web_client_receiver));
      return true;
    }
    case messages::PageHandler::kPrepareForClient: {
      break;
    }
    case messages::PageHandler::kWebviewCommitted: {
      DCHECK(message->is_serialized());
      internal::PageHandler_WebviewCommitted_Params_Data* params =
          reinterpret_cast<internal::PageHandler_WebviewCommitted_Params_Data*>(
              message->mutable_payload());
      

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

      // Validation for PageHandler.3
      bool success = true;
      double p_zoom_factor{};
      PageHandler_OnZoomLevelChange_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_zoom_factor = input_data_view.zoom_factor();
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 3, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OnZoomLevelChange(        
        std::move(p_zoom_factor));
      return true;
    }
    case messages::PageHandler::kClosePanel: {
      break;
    }
    case messages::PageHandler::kOpenHelpCenterTopicAndClosePanel: {
      DCHECK(message->is_serialized());
      internal::PageHandler_OpenHelpCenterTopicAndClosePanel_Params_Data* params =
          reinterpret_cast<internal::PageHandler_OpenHelpCenterTopicAndClosePanel_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.5
      bool success = true;
      HelpCenterTopic p_topic{};
      PageHandler_OpenHelpCenterTopicAndClosePanel_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadTopic(&p_topic))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 5, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OpenHelpCenterTopicAndClosePanel(        
        std::move(p_topic));
      return true;
    }
    case messages::PageHandler::kOpenProfilePickerAndClosePanel: {
      DCHECK(message->is_serialized());
      internal::PageHandler_OpenProfilePickerAndClosePanel_Params_Data* params =
          reinterpret_cast<internal::PageHandler_OpenProfilePickerAndClosePanel_Params_Data*>(
              message->mutable_payload());
      

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

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

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

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

      // Validation for PageHandler.11
      bool success = true;
      WebUiState p_new_state{};
      PageHandler_OnWebUiStateChanged_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadNewState(&p_new_state))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 11, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->OnWebUiStateChanged(        
        std::move(p_new_state));
      return true;
    }
  }
  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::kCreateWebClient: {
      break;
    }
    case messages::PageHandler::kPrepareForClient: {
      internal::PageHandler_PrepareForClient_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_PrepareForClient_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.1
      bool success = true;
      PageHandler_PrepareForClient_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_PrepareForClient_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->PrepareForClient(std::move(callback));
      return true;
    }
    case messages::PageHandler::kWebviewCommitted: {
      break;
    }
    case messages::PageHandler::kOnZoomLevelChange: {
      break;
    }
    case messages::PageHandler::kClosePanel: {
      internal::PageHandler_ClosePanel_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_ClosePanel_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.4
      bool success = true;
      PageHandler_ClosePanel_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 4, false);
        return false;
      }
      auto callback =
          PageHandler_ClosePanel_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->ClosePanel(std::move(callback));
      return true;
    }
    case messages::PageHandler::kOpenHelpCenterTopicAndClosePanel: {
      break;
    }
    case messages::PageHandler::kOpenProfilePickerAndClosePanel: {
      break;
    }
    case messages::PageHandler::kOpenDisabledByAdminLinkAndClosePanel: {
      break;
    }
    case messages::PageHandler::kSignInAndClosePanel: {
      break;
    }
    case messages::PageHandler::kResizeWidget: {
      internal::PageHandler_ResizeWidget_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_ResizeWidget_Params_Data*>(
                  message->mutable_payload());
      

      // Validation for PageHandler.9
      bool success = true;
      ::gfx::Size p_size{};
      ::base::TimeDelta p_duration{};
      PageHandler_ResizeWidget_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadSize(&p_size))
        success = false;
      if (success && !input_data_view.ReadDuration(&p_duration))
        success = false;
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 9, false);
        return false;
      }
      auto callback =
          PageHandler_ResizeWidget_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->ResizeWidget(        
        std::move(p_size), 
        std::move(p_duration), std::move(callback));
      return true;
    }
    case messages::PageHandler::kEnableDragResize: {
      break;
    }
    case messages::PageHandler::kOnWebUiStateChanged: {
      break;
    }
  }
  return false;
}
namespace {
}  // namespace
static const mojo::internal::GenericValidationInfo kPageHandlerValidationInfo[] = {
    { &internal::PageHandler_CreateWebClient_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_PrepareForClient_Params_Data::Validate,
     &internal::PageHandler_PrepareForClient_ResponseParams_Data::Validate},
    { &internal::PageHandler_WebviewCommitted_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_OnZoomLevelChange_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_ClosePanel_Params_Data::Validate,
     &internal::PageHandler_ClosePanel_ResponseParams_Data::Validate},
    { &internal::PageHandler_OpenHelpCenterTopicAndClosePanel_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_OpenProfilePickerAndClosePanel_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_OpenDisabledByAdminLinkAndClosePanel_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_SignInAndClosePanel_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_ResizeWidget_Params_Data::Validate,
     &internal::PageHandler_ResizeWidget_ResponseParams_Data::Validate},
    { &internal::PageHandler_EnableDragResize_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_OnWebUiStateChanged_Params_Data::Validate,
     nullptr /* no response */},
};

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

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


}  // glic::mojom


namespace mojo {

}  // namespace mojo


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


namespace glic::mojom {


void PreloadPageInterceptorForTesting::SetProfileReadyState(ProfileReadyState ready_state) {
  GetForwardingInterface()->SetProfileReadyState(
    std::move(ready_state)
    );
}
void PreloadPageInterceptorForTesting::OnGuestNavigationStarted() {
  GetForwardingInterface()->OnGuestNavigationStarted();
}
void PreloadPageInterceptorForTesting::OnGuestNavigated(const ::GURL& url, bool is_api_allowed, GuestPageType page_type, bool is_initial_commit) {
  GetForwardingInterface()->OnGuestNavigated(
    std::move(url)
    , 
    std::move(is_api_allowed)
    , 
    std::move(page_type)
    , 
    std::move(is_initial_commit)
    );
}
void PreloadPageInterceptorForTesting::OnGuestProcessGone() {
  GetForwardingInterface()->OnGuestProcessGone();
}
void PreloadPageInterceptorForTesting::WebClientStateChanged(WebClientState state) {
  GetForwardingInterface()->WebClientStateChanged(
    std::move(state)
    );
}
PreloadPageAsyncWaiter::PreloadPageAsyncWaiter(
    PreloadPage* proxy) : proxy_(proxy) {}

PreloadPageAsyncWaiter::~PreloadPageAsyncWaiter() = default;





void PageInterceptorForTesting::IntentToShow() {
  GetForwardingInterface()->IntentToShow();
}
void PageInterceptorForTesting::SetProfileReadyState(ProfileReadyState ready_state) {
  GetForwardingInterface()->SetProfileReadyState(
    std::move(ready_state)
    );
}
void PageInterceptorForTesting::UpdatePageState(::glic::mojom::PanelStateKind panelStateKind) {
  GetForwardingInterface()->UpdatePageState(
    std::move(panelStateKind)
    );
}
void PageInterceptorForTesting::ClientReadyStateChanged(bool ready) {
  GetForwardingInterface()->ClientReadyStateChanged(
    std::move(ready)
    );
}
void PageInterceptorForTesting::Zoom(ZoomAction action) {
  GetForwardingInterface()->Zoom(
    std::move(action)
    );
}
PageAsyncWaiter::PageAsyncWaiter(
    Page* proxy) : proxy_(proxy) {}

PageAsyncWaiter::~PageAsyncWaiter() = default;





void GlicPreloadHandlerInterceptorForTesting::PrepareForClient(PrepareForClientCallback callback) {
  GetForwardingInterface()->PrepareForClient(std::move(callback));
}
GlicPreloadHandlerAsyncWaiter::GlicPreloadHandlerAsyncWaiter(
    GlicPreloadHandler* proxy) : proxy_(proxy) {}

GlicPreloadHandlerAsyncWaiter::~GlicPreloadHandlerAsyncWaiter() = default;


void GlicPreloadHandlerAsyncWaiter::PrepareForClient(
    PrepareForClientResult* out_result) {
  base::RunLoop loop;
  proxy_->PrepareForClient(
      base::BindOnce(
          [](base::RunLoop* loop,
             PrepareForClientResult* out_result
,
             PrepareForClientResult result) {*out_result = std::move(result);
            loop->Quit();
          },
          &loop,
          out_result));
  loop.Run();
}

PrepareForClientResult GlicPreloadHandlerAsyncWaiter::PrepareForClient(
    ) {
  PrepareForClientResult async_wait_result;
  PrepareForClient(&async_wait_result);
  return async_wait_result;
}




void GlicPreloadHandlerFactoryInterceptorForTesting::CreatePreloadHandler(::mojo::PendingReceiver<GlicPreloadHandler> receiver, ::mojo::PendingRemote<PreloadPage> page) {
  GetForwardingInterface()->CreatePreloadHandler(
    std::move(receiver)
    , 
    std::move(page)
    );
}
GlicPreloadHandlerFactoryAsyncWaiter::GlicPreloadHandlerFactoryAsyncWaiter(
    GlicPreloadHandlerFactory* proxy) : proxy_(proxy) {}

GlicPreloadHandlerFactoryAsyncWaiter::~GlicPreloadHandlerFactoryAsyncWaiter() = default;





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

PageHandlerFactoryAsyncWaiter::~PageHandlerFactoryAsyncWaiter() = default;


void PageHandlerFactoryAsyncWaiter::CreatePageHandler(
    ::mojo::PendingReceiver<PageHandler> receiver, ::mojo::PendingRemote<Page> page, std::string* out_instance_id) {
  base::RunLoop loop;
  proxy_->CreatePageHandler(
      std::move(receiver),
      std::move(page),
      base::BindOnce(
          [](base::RunLoop* loop,
             std::string* out_instance_id
,
             const std::string& instance_id) {*out_instance_id = std::move(instance_id);
            loop->Quit();
          },
          &loop,
          out_instance_id));
  loop.Run();
}

std::string PageHandlerFactoryAsyncWaiter::CreatePageHandler(
    ::mojo::PendingReceiver<PageHandler> receiver, ::mojo::PendingRemote<Page> page) {
  std::string async_wait_result;
  CreatePageHandler(std::move(receiver),std::move(page),&async_wait_result);
  return async_wait_result;
}




void PageHandlerInterceptorForTesting::CreateWebClient(::mojo::PendingReceiver<::glic::mojom::WebClientHandler> web_client_receiver) {
  GetForwardingInterface()->CreateWebClient(
    std::move(web_client_receiver)
    );
}
void PageHandlerInterceptorForTesting::PrepareForClient(PrepareForClientCallback callback) {
  GetForwardingInterface()->PrepareForClient(std::move(callback));
}
void PageHandlerInterceptorForTesting::WebviewCommitted(const ::GURL& url) {
  GetForwardingInterface()->WebviewCommitted(
    std::move(url)
    );
}
void PageHandlerInterceptorForTesting::OnZoomLevelChange(double zoom_factor) {
  GetForwardingInterface()->OnZoomLevelChange(
    std::move(zoom_factor)
    );
}
void PageHandlerInterceptorForTesting::ClosePanel(ClosePanelCallback callback) {
  GetForwardingInterface()->ClosePanel(std::move(callback));
}
void PageHandlerInterceptorForTesting::OpenHelpCenterTopicAndClosePanel(HelpCenterTopic topic) {
  GetForwardingInterface()->OpenHelpCenterTopicAndClosePanel(
    std::move(topic)
    );
}
void PageHandlerInterceptorForTesting::OpenProfilePickerAndClosePanel() {
  GetForwardingInterface()->OpenProfilePickerAndClosePanel();
}
void PageHandlerInterceptorForTesting::OpenDisabledByAdminLinkAndClosePanel() {
  GetForwardingInterface()->OpenDisabledByAdminLinkAndClosePanel();
}
void PageHandlerInterceptorForTesting::SignInAndClosePanel() {
  GetForwardingInterface()->SignInAndClosePanel();
}
void PageHandlerInterceptorForTesting::ResizeWidget(const ::gfx::Size& size, ::base::TimeDelta duration, ResizeWidgetCallback callback) {
  GetForwardingInterface()->ResizeWidget(
    std::move(size)
    , 
    std::move(duration)
    , std::move(callback));
}
void PageHandlerInterceptorForTesting::EnableDragResize(bool enabled) {
  GetForwardingInterface()->EnableDragResize(
    std::move(enabled)
    );
}
void PageHandlerInterceptorForTesting::OnWebUiStateChanged(WebUiState new_state) {
  GetForwardingInterface()->OnWebUiStateChanged(
    std::move(new_state)
    );
}
PageHandlerAsyncWaiter::PageHandlerAsyncWaiter(
    PageHandler* proxy) : proxy_(proxy) {}

PageHandlerAsyncWaiter::~PageHandlerAsyncWaiter() = default;


void PageHandlerAsyncWaiter::PrepareForClient(
    PrepareForClientResult* out_result) {
  base::RunLoop loop;
  proxy_->PrepareForClient(
      base::BindOnce(
          [](base::RunLoop* loop,
             PrepareForClientResult* out_result
,
             PrepareForClientResult result) {*out_result = std::move(result);
            loop->Quit();
          },
          &loop,
          out_result));
  loop.Run();
}

PrepareForClientResult PageHandlerAsyncWaiter::PrepareForClient(
    ) {
  PrepareForClientResult async_wait_result;
  PrepareForClient(&async_wait_result);
  return async_wait_result;
}

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



void PageHandlerAsyncWaiter::ResizeWidget(
    const ::gfx::Size& size, ::base::TimeDelta duration) {
  base::RunLoop loop;
  proxy_->ResizeWidget(
      std::move(size),
      std::move(duration),
      base::BindOnce(
          [](base::RunLoop* loop) {
            loop->Quit();
          },
          &loop));
  loop.Run();
}








}  // glic::mojom


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