// ui/webui/resources/cr_components/composebox/composebox.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 "ui/webui/resources/cr_components/composebox/composebox.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 "ui/webui/resources/cr_components/composebox/composebox.mojom-params-data.h"
#include "ui/webui/resources/cr_components/composebox/composebox.mojom-shared-message-ids.h"

#include "ui/webui/resources/cr_components/composebox/composebox.mojom-import-headers.h"
#include "ui/webui/resources/cr_components/composebox/composebox.mojom-test-utils.h"


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

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

void PageHandlerFactoryProxy::CreatePageHandler(
    ::mojo::PendingReceiver<PageHandler> in_handler, ::mojo::PendingRemote<::searchbox::mojom::Page> in_searchbox_page, ::mojo::PendingReceiver<::searchbox::mojom::PageHandler> in_searchbox_handler) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send composebox::mojom::PageHandlerFactory::CreatePageHandler", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("handler"), in_handler,
                        "<value of type ::mojo::PendingReceiver<PageHandler>>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("searchbox_page"), in_searchbox_page,
                        "<value of type ::mojo::PendingRemote<::searchbox::mojom::Page>>");
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("searchbox_handler"), in_searchbox_handler,
                        "<value of type ::mojo::PendingReceiver<::searchbox::mojom::PageHandler>>");
   });
#endif

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

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

  const size_t estimated_payload_size =
    0;
  mojo::Message message(
      std::to_underlying(messages::PageHandlerFactory::kCreatePageHandler), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::composebox::mojom::internal::PageHandlerFactory_CreatePageHandler_Params_Data> params(
          message);
  params.Allocate();

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

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

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

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

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

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

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

// static
bool PageHandlerFactoryStubDispatch::Accept(
    PageHandlerFactory* impl,
    mojo::Message* message) {
  switch (static_cast<messages::PageHandlerFactory>(message->header()->name)) {
    case messages::PageHandlerFactory::kCreatePageHandler: {
      DCHECK(message->is_serialized());
      internal::PageHandlerFactory_CreatePageHandler_Params_Data* params =
          reinterpret_cast<internal::PageHandlerFactory_CreatePageHandler_Params_Data*>(
              message->mutable_payload());
      

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

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

bool PageHandlerFactoryRequestValidator::Accept(mojo::Message* message) {
  return mojo::internal::ValidateRequestGenericPacked(
    message,
    ::composebox::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::kFocusChanged: {
      return &PageHandler::FocusChanged_Sym::IPCStableHash;
    }
    case messages::PageHandler::kStartPlatformVoiceRecognition: {
      return &PageHandler::StartPlatformVoiceRecognition_Sym::IPCStableHash;
    }
    case messages::PageHandler::kHandleLensButtonClick: {
      return &PageHandler::HandleLensButtonClick_Sym::IPCStableHash;
    }
    case messages::PageHandler::kHandleFileUpload: {
      return &PageHandler::HandleFileUpload_Sym::IPCStableHash;
    }
    case messages::PageHandler::kNavigateUrl: {
      return &PageHandler::NavigateUrl_Sym::IPCStableHash;
    }
    case messages::PageHandler::kCloseLensOverlayFromWebUI: {
      return &PageHandler::CloseLensOverlayFromWebUI_Sym::IPCStableHash;
    }
    case messages::PageHandler::kSetSmartTabSharingActive: {
      return &PageHandler::SetSmartTabSharingActive_Sym::IPCStableHash;
    }
    case messages::PageHandler::kGetSmartTabSharingActive: {
      return &PageHandler::GetSmartTabSharingActive_Sym::IPCStableHash;
    }
    case messages::PageHandler::kOnContextMenuOpened: {
      return &PageHandler::OnContextMenuOpened_Sym::IPCStableHash;
    }
    case messages::PageHandler::kNotifyComposeboxQuerySubmittedWithContext: {
      return &PageHandler::NotifyComposeboxQuerySubmittedWithContext_Sym::IPCStableHash;
    }
    case messages::PageHandler::kCanShowNextboxAnimation: {
      return &PageHandler::CanShowNextboxAnimation_Sym::IPCStableHash;
    }
    case messages::PageHandler::kRecordNextboxAnimationImpression: {
      return &PageHandler::RecordNextboxAnimationImpression_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::kFocusChanged:
            return "Receive composebox::mojom::PageHandler::FocusChanged";
      case messages::PageHandler::kStartPlatformVoiceRecognition:
            return "Receive composebox::mojom::PageHandler::StartPlatformVoiceRecognition";
      case messages::PageHandler::kHandleLensButtonClick:
            return "Receive composebox::mojom::PageHandler::HandleLensButtonClick";
      case messages::PageHandler::kHandleFileUpload:
            return "Receive composebox::mojom::PageHandler::HandleFileUpload";
      case messages::PageHandler::kNavigateUrl:
            return "Receive composebox::mojom::PageHandler::NavigateUrl";
      case messages::PageHandler::kCloseLensOverlayFromWebUI:
            return "Receive composebox::mojom::PageHandler::CloseLensOverlayFromWebUI";
      case messages::PageHandler::kSetSmartTabSharingActive:
            return "Receive composebox::mojom::PageHandler::SetSmartTabSharingActive";
      case messages::PageHandler::kGetSmartTabSharingActive:
            return "Receive composebox::mojom::PageHandler::GetSmartTabSharingActive";
      case messages::PageHandler::kOnContextMenuOpened:
            return "Receive composebox::mojom::PageHandler::OnContextMenuOpened";
      case messages::PageHandler::kNotifyComposeboxQuerySubmittedWithContext:
            return "Receive composebox::mojom::PageHandler::NotifyComposeboxQuerySubmittedWithContext";
      case messages::PageHandler::kCanShowNextboxAnimation:
            return "Receive composebox::mojom::PageHandler::CanShowNextboxAnimation";
      case messages::PageHandler::kRecordNextboxAnimationImpression:
            return "Receive composebox::mojom::PageHandler::RecordNextboxAnimationImpression";
    }
  } else {
    switch (static_cast<messages::PageHandler>(message.name())) {
      case messages::PageHandler::kFocusChanged:
            return "Receive reply composebox::mojom::PageHandler::FocusChanged";
      case messages::PageHandler::kStartPlatformVoiceRecognition:
            return "Receive reply composebox::mojom::PageHandler::StartPlatformVoiceRecognition";
      case messages::PageHandler::kHandleLensButtonClick:
            return "Receive reply composebox::mojom::PageHandler::HandleLensButtonClick";
      case messages::PageHandler::kHandleFileUpload:
            return "Receive reply composebox::mojom::PageHandler::HandleFileUpload";
      case messages::PageHandler::kNavigateUrl:
            return "Receive reply composebox::mojom::PageHandler::NavigateUrl";
      case messages::PageHandler::kCloseLensOverlayFromWebUI:
            return "Receive reply composebox::mojom::PageHandler::CloseLensOverlayFromWebUI";
      case messages::PageHandler::kSetSmartTabSharingActive:
            return "Receive reply composebox::mojom::PageHandler::SetSmartTabSharingActive";
      case messages::PageHandler::kGetSmartTabSharingActive:
            return "Receive reply composebox::mojom::PageHandler::GetSmartTabSharingActive";
      case messages::PageHandler::kOnContextMenuOpened:
            return "Receive reply composebox::mojom::PageHandler::OnContextMenuOpened";
      case messages::PageHandler::kNotifyComposeboxQuerySubmittedWithContext:
            return "Receive reply composebox::mojom::PageHandler::NotifyComposeboxQuerySubmittedWithContext";
      case messages::PageHandler::kCanShowNextboxAnimation:
            return "Receive reply composebox::mojom::PageHandler::CanShowNextboxAnimation";
      case messages::PageHandler::kRecordNextboxAnimationImpression:
            return "Receive reply composebox::mojom::PageHandler::RecordNextboxAnimationImpression";
    }
  }
  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::FocusChanged_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 = 0x5e7931ad;  // IPCStableHash for composebox::mojom::PageHandler::FocusChanged
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::StartPlatformVoiceRecognition_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 = 0x9af6e272;  // IPCStableHash for composebox::mojom::PageHandler::StartPlatformVoiceRecognition
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::HandleLensButtonClick_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 = 0x42ef4f4d;  // IPCStableHash for composebox::mojom::PageHandler::HandleLensButtonClick
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::HandleFileUpload_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 = 0x7288fa09;  // IPCStableHash for composebox::mojom::PageHandler::HandleFileUpload
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::NavigateUrl_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 = 0x405866b2;  // IPCStableHash for composebox::mojom::PageHandler::NavigateUrl
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::CloseLensOverlayFromWebUI_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 = 0xfd5a31be;  // IPCStableHash for composebox::mojom::PageHandler::CloseLensOverlayFromWebUI
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::SetSmartTabSharingActive_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 = 0x4f60412e;  // IPCStableHash for composebox::mojom::PageHandler::SetSmartTabSharingActive
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::GetSmartTabSharingActive_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 = 0x8d1db4a3;  // IPCStableHash for composebox::mojom::PageHandler::GetSmartTabSharingActive
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::OnContextMenuOpened_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 = 0xc4a0b475;  // IPCStableHash for composebox::mojom::PageHandler::OnContextMenuOpened
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::NotifyComposeboxQuerySubmittedWithContext_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 = 0x12286ba7;  // IPCStableHash for composebox::mojom::PageHandler::NotifyComposeboxQuerySubmittedWithContext
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::CanShowNextboxAnimation_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 = 0x6573b504;  // IPCStableHash for composebox::mojom::PageHandler::CanShowNextboxAnimation
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
uint32_t PageHandler::RecordNextboxAnimationImpression_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 = 0x64d0c3c0;  // IPCStableHash for composebox::mojom::PageHandler::RecordNextboxAnimationImpression
  const uint32_t hash = kHash;
  base::debug::Alias(&hash);
  return hash;
}
# endif // !BUILDFLAG(IS_FUCHSIA)

class PageHandler_GetSmartTabSharingActive_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_GetSmartTabSharingActive_ForwardToCallback(
      PageHandler::GetSmartTabSharingActiveCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

class PageHandler_CanShowNextboxAnimation_ForwardToCallback
    : public mojo::MessageReceiver {
 public:
  PageHandler_CanShowNextboxAnimation_ForwardToCallback(
      PageHandler::CanShowNextboxAnimationCallback callback
      ) : callback_(std::move(callback)) {
  }

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

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

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

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

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

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

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

  params->focused = in_focused;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("FocusChanged");
#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::StartPlatformVoiceRecognition(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send composebox::mojom::PageHandler::StartPlatformVoiceRecognition");
#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::kStartPlatformVoiceRecognition), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::composebox::mojom::internal::PageHandler_StartPlatformVoiceRecognition_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("StartPlatformVoiceRecognition");
#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::HandleLensButtonClick(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send composebox::mojom::PageHandler::HandleLensButtonClick");
#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::kHandleLensButtonClick), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::composebox::mojom::internal::PageHandler_HandleLensButtonClick_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("HandleLensButtonClick");
#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::HandleFileUpload(
    bool in_is_image) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send composebox::mojom::PageHandler::HandleFileUpload", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("is_image"), in_is_image,
                        "<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::kHandleFileUpload), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::composebox::mojom::internal::PageHandler_HandleFileUpload_Params_Data> params(
          message);
  params.Allocate();

  params->is_image = in_is_image;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("HandleFileUpload");
#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::NavigateUrl(
    const ::GURL& in_url) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send composebox::mojom::PageHandler::NavigateUrl", "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::kNavigateUrl), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::composebox::mojom::internal::PageHandler_NavigateUrl_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.NavigateUrl request");

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("NavigateUrl");
#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::CloseLensOverlayFromWebUI(
    LensOverlayDismissalSource in_dismissal_source) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send composebox::mojom::PageHandler::CloseLensOverlayFromWebUI", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("dismissal_source"), in_dismissal_source,
                        "<value of type LensOverlayDismissalSource>");
   });
#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::kCloseLensOverlayFromWebUI), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::composebox::mojom::internal::PageHandler_CloseLensOverlayFromWebUI_Params_Data> params(
          message);
  params.Allocate();

  
  mojo::internal::Serialize<::composebox::mojom::LensOverlayDismissalSource>(
    in_dismissal_source,
    &params->dismissal_source);

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("CloseLensOverlayFromWebUI");
#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::SetSmartTabSharingActive(
    bool in_active) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send composebox::mojom::PageHandler::SetSmartTabSharingActive", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("active"), in_active,
                        "<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::kSetSmartTabSharingActive), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::composebox::mojom::internal::PageHandler_SetSmartTabSharingActive_Params_Data> params(
          message);
  params.Allocate();

  params->active = in_active;

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("SetSmartTabSharingActive");
#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::GetSmartTabSharingActive(
    GetSmartTabSharingActiveCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send composebox::mojom::PageHandler::GetSmartTabSharingActive");
#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::kGetSmartTabSharingActive), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::composebox::mojom::internal::PageHandler_GetSmartTabSharingActive_Params_Data> params(
          message);
  params.Allocate();

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

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

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("OnContextMenuOpened");
#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::NotifyComposeboxQuerySubmittedWithContext(
    ) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send composebox::mojom::PageHandler::NotifyComposeboxQuerySubmittedWithContext");
#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::kNotifyComposeboxQuerySubmittedWithContext), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::composebox::mojom::internal::PageHandler_NotifyComposeboxQuerySubmittedWithContext_Params_Data> params(
          message);
  params.Allocate();

#if defined(ENABLE_IPC_FUZZER)
  message.set_interface_name(PageHandler::Name_);
  message.set_method_name("NotifyComposeboxQuerySubmittedWithContext");
#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::CanShowNextboxAnimation(
    CanShowNextboxAnimationCallback callback) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT0("mojom", "Send composebox::mojom::PageHandler::CanShowNextboxAnimation");
#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::kCanShowNextboxAnimation), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::composebox::mojom::internal::PageHandler_CanShowNextboxAnimation_Params_Data> params(
          message);
  params.Allocate();

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

void PageHandlerProxy::RecordNextboxAnimationImpression(
    bool in_shown) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send composebox::mojom::PageHandler::RecordNextboxAnimationImpression", "input_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("shown"), in_shown,
                        "<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::kRecordNextboxAnimationImpression), kFlags, estimated_payload_size);
  mojo::internal::MessageFragment<
      ::composebox::mojom::internal::PageHandler_RecordNextboxAnimationImpression_Params_Data> params(
          message);
  params.Allocate();

  params->shown = in_shown;

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

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

  void Run(
      bool in_active);
};

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

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

void PageHandler_GetSmartTabSharingActive_ProxyToResponder::Run(
    bool in_active) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply composebox::mojom::PageHandler::GetSmartTabSharingActive", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("active"), in_active,
                        "<value of type bool>");
   });
#endif

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

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

  params->active = in_active;

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

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

  void Run(
      bool in_can_show);
};

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

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

void PageHandler_CanShowNextboxAnimation_ProxyToResponder::Run(
    bool in_can_show) {
#if BUILDFLAG(MOJO_TRACE_ENABLED)
  TRACE_EVENT1(
    "mojom", "Send reply composebox::mojom::PageHandler::CanShowNextboxAnimation", "async_response_parameters",
    [&](perfetto::TracedValue context){
      auto dict = std::move(context).WriteDictionary();
      perfetto::WriteIntoTracedValueWithFallback(
           dict.AddItem("can_show"), in_can_show,
                        "<value of type bool>");
   });
#endif

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

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

  params->can_show = in_can_show;

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

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

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

      // Validation for PageHandler.2
      bool success = true;
      PageHandler_HandleLensButtonClick_ParamsDataView input_data_view(params, message);
      
      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->HandleLensButtonClick(        );
      return true;
    }
    case messages::PageHandler::kHandleFileUpload: {
      DCHECK(message->is_serialized());
      internal::PageHandler_HandleFileUpload_Params_Data* params =
          reinterpret_cast<internal::PageHandler_HandleFileUpload_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.3
      bool success = true;
      bool p_is_image{};
      PageHandler_HandleFileUpload_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_is_image = input_data_view.is_image();
      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->HandleFileUpload(        
        std::move(p_is_image));
      return true;
    }
    case messages::PageHandler::kNavigateUrl: {
      DCHECK(message->is_serialized());
      internal::PageHandler_NavigateUrl_Params_Data* params =
          reinterpret_cast<internal::PageHandler_NavigateUrl_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.4
      bool success = true;
      ::GURL p_url{};
      PageHandler_NavigateUrl_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_, 4, false);
        return false;
      }
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->NavigateUrl(        
        std::move(p_url));
      return true;
    }
    case messages::PageHandler::kCloseLensOverlayFromWebUI: {
      DCHECK(message->is_serialized());
      internal::PageHandler_CloseLensOverlayFromWebUI_Params_Data* params =
          reinterpret_cast<internal::PageHandler_CloseLensOverlayFromWebUI_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.5
      bool success = true;
      LensOverlayDismissalSource p_dismissal_source{};
      PageHandler_CloseLensOverlayFromWebUI_ParamsDataView input_data_view(params, message);
      
      if (success && !input_data_view.ReadDismissalSource(&p_dismissal_source))
        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->CloseLensOverlayFromWebUI(        
        std::move(p_dismissal_source));
      return true;
    }
    case messages::PageHandler::kSetSmartTabSharingActive: {
      DCHECK(message->is_serialized());
      internal::PageHandler_SetSmartTabSharingActive_Params_Data* params =
          reinterpret_cast<internal::PageHandler_SetSmartTabSharingActive_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.6
      bool success = true;
      bool p_active{};
      PageHandler_SetSmartTabSharingActive_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_active = input_data_view.active();
      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->SetSmartTabSharingActive(        
        std::move(p_active));
      return true;
    }
    case messages::PageHandler::kGetSmartTabSharingActive: {
      break;
    }
    case messages::PageHandler::kOnContextMenuOpened: {
      DCHECK(message->is_serialized());
      internal::PageHandler_OnContextMenuOpened_Params_Data* params =
          reinterpret_cast<internal::PageHandler_OnContextMenuOpened_Params_Data*>(
              message->mutable_payload());
      

      // Validation for PageHandler.8
      bool success = true;
      PageHandler_OnContextMenuOpened_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->OnContextMenuOpened(        );
      return true;
    }
    case messages::PageHandler::kNotifyComposeboxQuerySubmittedWithContext: {
      DCHECK(message->is_serialized());
      internal::PageHandler_NotifyComposeboxQuerySubmittedWithContext_Params_Data* params =
          reinterpret_cast<internal::PageHandler_NotifyComposeboxQuerySubmittedWithContext_Params_Data*>(
              message->mutable_payload());
      

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

      // Validation for PageHandler.11
      bool success = true;
      bool p_shown{};
      PageHandler_RecordNextboxAnimationImpression_ParamsDataView input_data_view(params, message);
      
      if (success)
        p_shown = input_data_view.shown();
      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->RecordNextboxAnimationImpression(        
        std::move(p_shown));
      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::kFocusChanged: {
      break;
    }
    case messages::PageHandler::kStartPlatformVoiceRecognition: {
      break;
    }
    case messages::PageHandler::kHandleLensButtonClick: {
      break;
    }
    case messages::PageHandler::kHandleFileUpload: {
      break;
    }
    case messages::PageHandler::kNavigateUrl: {
      break;
    }
    case messages::PageHandler::kCloseLensOverlayFromWebUI: {
      break;
    }
    case messages::PageHandler::kSetSmartTabSharingActive: {
      break;
    }
    case messages::PageHandler::kGetSmartTabSharingActive: {
      internal::PageHandler_GetSmartTabSharingActive_Params_Data* params =
          reinterpret_cast<
              internal::PageHandler_GetSmartTabSharingActive_Params_Data*>(
                  message->mutable_payload());
      

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

      // Validation for PageHandler.10
      bool success = true;
      PageHandler_CanShowNextboxAnimation_ParamsDataView input_data_view(params, message);
      
      if (!success) {
        ReportValidationErrorForMessage(
            message,
            mojo::internal::VALIDATION_ERROR_DESERIALIZATION_FAILED,
            PageHandler::Name_, 10, false);
        return false;
      }
      auto callback =
          PageHandler_CanShowNextboxAnimation_ProxyToResponder::CreateCallback(
              *message, std::move(responder));
      // A null |impl| means no implementation was bound.
      DCHECK(impl);
      impl->CanShowNextboxAnimation(std::move(callback));
      return true;
    }
    case messages::PageHandler::kRecordNextboxAnimationImpression: {
      break;
    }
  }
  return false;
}
namespace {
}  // namespace
static const mojo::internal::GenericValidationInfo kPageHandlerValidationInfo[] = {
    { &internal::PageHandler_FocusChanged_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_StartPlatformVoiceRecognition_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_HandleLensButtonClick_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_HandleFileUpload_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_NavigateUrl_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_CloseLensOverlayFromWebUI_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_SetSmartTabSharingActive_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_GetSmartTabSharingActive_Params_Data::Validate,
     &internal::PageHandler_GetSmartTabSharingActive_ResponseParams_Data::Validate},
    { &internal::PageHandler_OnContextMenuOpened_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_NotifyComposeboxQuerySubmittedWithContext_Params_Data::Validate,
     nullptr /* no response */},
    { &internal::PageHandler_CanShowNextboxAnimation_Params_Data::Validate,
     &internal::PageHandler_CanShowNextboxAnimation_ResponseParams_Data::Validate},
    { &internal::PageHandler_RecordNextboxAnimationImpression_Params_Data::Validate,
     nullptr /* no response */},
};

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

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


}  // composebox::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 composebox::mojom {


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

PageHandlerFactoryAsyncWaiter::~PageHandlerFactoryAsyncWaiter() = default;





void PageHandlerInterceptorForTesting::FocusChanged(bool focused) {
  GetForwardingInterface()->FocusChanged(
    std::move(focused)
    );
}
void PageHandlerInterceptorForTesting::StartPlatformVoiceRecognition() {
  GetForwardingInterface()->StartPlatformVoiceRecognition();
}
void PageHandlerInterceptorForTesting::HandleLensButtonClick() {
  GetForwardingInterface()->HandleLensButtonClick();
}
void PageHandlerInterceptorForTesting::HandleFileUpload(bool is_image) {
  GetForwardingInterface()->HandleFileUpload(
    std::move(is_image)
    );
}
void PageHandlerInterceptorForTesting::NavigateUrl(const ::GURL& url) {
  GetForwardingInterface()->NavigateUrl(
    std::move(url)
    );
}
void PageHandlerInterceptorForTesting::CloseLensOverlayFromWebUI(LensOverlayDismissalSource dismissal_source) {
  GetForwardingInterface()->CloseLensOverlayFromWebUI(
    std::move(dismissal_source)
    );
}
void PageHandlerInterceptorForTesting::SetSmartTabSharingActive(bool active) {
  GetForwardingInterface()->SetSmartTabSharingActive(
    std::move(active)
    );
}
void PageHandlerInterceptorForTesting::GetSmartTabSharingActive(GetSmartTabSharingActiveCallback callback) {
  GetForwardingInterface()->GetSmartTabSharingActive(std::move(callback));
}
void PageHandlerInterceptorForTesting::OnContextMenuOpened() {
  GetForwardingInterface()->OnContextMenuOpened();
}
void PageHandlerInterceptorForTesting::NotifyComposeboxQuerySubmittedWithContext() {
  GetForwardingInterface()->NotifyComposeboxQuerySubmittedWithContext();
}
void PageHandlerInterceptorForTesting::CanShowNextboxAnimation(CanShowNextboxAnimationCallback callback) {
  GetForwardingInterface()->CanShowNextboxAnimation(std::move(callback));
}
void PageHandlerInterceptorForTesting::RecordNextboxAnimationImpression(bool shown) {
  GetForwardingInterface()->RecordNextboxAnimationImpression(
    std::move(shown)
    );
}
PageHandlerAsyncWaiter::PageHandlerAsyncWaiter(
    PageHandler* proxy) : proxy_(proxy) {}

PageHandlerAsyncWaiter::~PageHandlerAsyncWaiter() = default;


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

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

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

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






}  // composebox::mojom


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