// chrome/browser/contextual_tasks/contextual_tasks.mojom.h 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.

#ifndef CHROME_BROWSER_CONTEXTUAL_TASKS_CONTEXTUAL_TASKS_MOJOM_H_
#define CHROME_BROWSER_CONTEXTUAL_TASKS_CONTEXTUAL_TASKS_MOJOM_H_

#include <stdint.h>

#include <limits>
#include <optional>
#include <type_traits>
#include <utility>
#include "mojo/public/cpp/bindings/clone_traits.h"
#include "mojo/public/cpp/bindings/equals_traits.h"
#include "mojo/public/cpp/bindings/struct_ptr.h"
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "mojo/public/cpp/bindings/union_traits.h"
#include "mojo/public/cpp/bindings/lib/serialization.h"

#include "third_party/perfetto/include/perfetto/tracing/traced_value_forward.h"

#include "chrome/browser/contextual_tasks/contextual_tasks.mojom-features.h"  // IWYU pragma: export
#include "chrome/browser/contextual_tasks/contextual_tasks.mojom-shared.h"  // IWYU pragma: export
#include "chrome/browser/contextual_tasks/contextual_tasks.mojom-forward.h"  // IWYU pragma: export
#include "mojo/public/mojom/base/uuid.mojom.h"
#include "mojo/public/mojom/base/unguessable_token.mojom.h"
#include "mojo/public/mojom/base/proto_wrapper.mojom.h"
#include "url/mojom/url.mojom.h"
#include "ui/base/mojom/window_open_disposition.mojom.h"
#include <string>
#include <vector>

#include "mojo/public/cpp/bindings/lib/control_message_handler.h"
#include "mojo/public/cpp/bindings/raw_ptr_impl_ref_traits.h"


#include "chrome/browser/contextual_tasks/contextual_tasks_mojom_traits.h"




namespace contextual_tasks::mojom {

class PageHandlerProxy;

template <typename ImplRefTraits>
class PageHandlerStub;

class PageHandlerRequestValidator;
class PageHandlerResponseValidator;


class PageHandler
    : public PageHandlerInterfaceBase {
 public:
  using IPCStableHashFunction = uint32_t(*)();
  static constexpr const char* Name_ = "contextual_tasks.mojom.PageHandler";
  static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
  static const char* MessageToMethodName_(mojo::Message& message);
  static constexpr uint32_t Version_ = 0;
  static constexpr bool PassesAssociatedKinds_ = false;
  static constexpr bool HasUninterruptableMethods_ = false;

  using Base_ = PageHandlerInterfaceBase;
  using Proxy_ = PageHandlerProxy;

  template <typename ImplRefTraits>
  using Stub_ = PageHandlerStub<ImplRefTraits>;

  using RequestValidator_ = PageHandlerRequestValidator;
  using ResponseValidator_ = PageHandlerResponseValidator;
  enum MethodMinVersions : uint32_t {
    kGetThreadUrlMinVersion = 0,
    kGetUrlForTaskMinVersion = 0,
    kSetTaskIdMinVersion = 0,
    kIsZeroStateMinVersion = 0,
    kIsAiPageMinVersion = 0,
    kIsPendingErrorPageMinVersion = 0,
    kIsEmbeddedPageErrorDocumentMinVersion = 0,
    kSetThreadTitleMinVersion = 0,
    kCloseSidePanelMinVersion = 0,
    kShowThreadHistoryMinVersion = 0,
    kIsShownInTabMinVersion = 0,
    kOpenMyActivityUiMinVersion = 0,
    kOpenFeedbackUiMinVersion = 0,
    kOpenOnboardingHelpUiMinVersion = 0,
    kOpenOverflowMenuHelpUiMinVersion = 0,
    kOpenUrlMinVersion = 0,
    kMoveTaskUiToNewTabMinVersion = 0,
    kOnTabClickedFromSourcesMenuMinVersion = 0,
    kOnFileClickedFromSourcesMenuMinVersion = 0,
    kOnImageClickedFromSourcesMenuMinVersion = 0,
    kOnWebviewMessageMinVersion = 0,
    kGetCommonSearchParamsMinVersion = 0,
    kOnboardingTooltipDismissedMinVersion = 0,
    kLensSearchTooltipDismissedMinVersion = 0,
    kAskGTooltipDismissedMinVersion = 0,
    kReopenTabsMinVersion = 0,
    kPinSidePanelMinVersion = 0,
    kUnpinSidePanelMinVersion = 0,
    kOnContextMenuOpenedMinVersion = 0,
    kNotifySmartTabSharingTryItIphResultMinVersion = 0,
    kNotifySmartTabSharingDefaultOnIphResultMinVersion = 0,
    kRegisterWindowMinVersion = 0,
    kCloseWindowMinVersion = 0,
    kMaybeTriggerPinningPromoMinVersion = 0,
    kShowPageInfoBubbleMinVersion = 0,
    kOnLogoPointerDownMinVersion = 0,
    kCreateNewThreadMinVersion = 0,
  };

// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
  struct GetThreadUrl_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct GetUrlForTask_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct SetTaskId_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct IsZeroState_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct IsAiPage_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct IsPendingErrorPage_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct IsEmbeddedPageErrorDocument_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct SetThreadTitle_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct CloseSidePanel_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct ShowThreadHistory_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct IsShownInTab_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OpenMyActivityUi_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OpenFeedbackUi_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OpenOnboardingHelpUi_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OpenOverflowMenuHelpUi_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OpenUrl_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct MoveTaskUiToNewTab_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnTabClickedFromSourcesMenu_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnFileClickedFromSourcesMenu_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnImageClickedFromSourcesMenu_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnWebviewMessage_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct GetCommonSearchParams_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnboardingTooltipDismissed_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct LensSearchTooltipDismissed_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct AskGTooltipDismissed_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct ReopenTabs_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct PinSidePanel_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct UnpinSidePanel_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnContextMenuOpened_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct NotifySmartTabSharingTryItIphResult_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct NotifySmartTabSharingDefaultOnIphResult_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct RegisterWindow_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct CloseWindow_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct MaybeTriggerPinningPromo_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct ShowPageInfoBubble_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnLogoPointerDown_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct CreateNewThread_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
#endif // !BUILDFLAG(IS_FUCHSIA)
  virtual ~PageHandler() = default;

  using GetThreadUrlCallback = base::OnceCallback<void(const ::GURL&)>;
  using GetThreadUrlMojoCallback = base::OnceCallback<void(const ::GURL&)>;

  virtual void GetThreadUrl(GetThreadUrlCallback callback) = 0;

  using GetUrlForTaskCallback = base::OnceCallback<void(const ::GURL&)>;
  using GetUrlForTaskMojoCallback = base::OnceCallback<void(const ::GURL&)>;

  virtual void GetUrlForTask(const ::base::Uuid& uuid, GetUrlForTaskCallback callback) = 0;

  virtual void SetTaskId(const ::base::Uuid& uuid) = 0;

  using IsZeroStateCallback = base::OnceCallback<void(bool)>;
  using IsZeroStateMojoCallback = base::OnceCallback<void(bool)>;

  virtual void IsZeroState(const ::GURL& url, IsZeroStateCallback callback) = 0;

  using IsAiPageCallback = base::OnceCallback<void(bool)>;
  using IsAiPageMojoCallback = base::OnceCallback<void(bool)>;

  virtual void IsAiPage(const ::GURL& url, IsAiPageCallback callback) = 0;

  using IsPendingErrorPageCallback = base::OnceCallback<void(bool)>;
  using IsPendingErrorPageMojoCallback = base::OnceCallback<void(bool)>;

  virtual void IsPendingErrorPage(const ::base::Uuid& task_id, IsPendingErrorPageCallback callback) = 0;

  using IsEmbeddedPageErrorDocumentCallback = base::OnceCallback<void(bool)>;
  using IsEmbeddedPageErrorDocumentMojoCallback = base::OnceCallback<void(bool)>;

  virtual void IsEmbeddedPageErrorDocument(IsEmbeddedPageErrorDocumentCallback callback) = 0;

  virtual void SetThreadTitle(const std::string& title) = 0;

  virtual void CloseSidePanel() = 0;

  virtual void ShowThreadHistory() = 0;

  using IsShownInTabCallback = base::OnceCallback<void(bool)>;
  using IsShownInTabMojoCallback = base::OnceCallback<void(bool)>;

  virtual void IsShownInTab(IsShownInTabCallback callback) = 0;

  virtual void OpenMyActivityUi() = 0;

  virtual void OpenFeedbackUi() = 0;

  virtual void OpenOnboardingHelpUi() = 0;

  virtual void OpenOverflowMenuHelpUi() = 0;

  virtual void OpenUrl(const ::GURL& url, ::WindowOpenDisposition disposition) = 0;

  virtual void MoveTaskUiToNewTab() = 0;

  virtual void OnTabClickedFromSourcesMenu(int32_t tab_id, const ::GURL& url) = 0;

  virtual void OnFileClickedFromSourcesMenu(const ::GURL& url) = 0;

  virtual void OnImageClickedFromSourcesMenu(const ::GURL& url) = 0;

  virtual void OnWebviewMessage(const std::vector<uint8_t>& message) = 0;

  using GetCommonSearchParamsCallback = base::OnceCallback<void(const base::flat_map<std::string, std::string>&)>;
  using GetCommonSearchParamsMojoCallback = base::OnceCallback<void(const base::flat_map<std::string, std::string>&)>;

  virtual void GetCommonSearchParams(bool is_dark_mode, bool is_side_panel, GetCommonSearchParamsCallback callback) = 0;

  virtual void OnboardingTooltipDismissed() = 0;

  virtual void LensSearchTooltipDismissed() = 0;

  virtual void AskGTooltipDismissed() = 0;

  virtual void ReopenTabs() = 0;

  virtual void PinSidePanel() = 0;

  virtual void UnpinSidePanel() = 0;

  virtual void OnContextMenuOpened() = 0;

  virtual void NotifySmartTabSharingTryItIphResult(bool accepted) = 0;

  virtual void NotifySmartTabSharingDefaultOnIphResult(bool accepted) = 0;

  virtual void RegisterWindow(const ::contextual_tasks::ContextualTaskId& task_id, const ::GURL& url, const ::contextual_tasks::ContextualWindowId& window_id) = 0;

  virtual void CloseWindow(const ::contextual_tasks::ContextualWindowId& window_id) = 0;

  virtual void MaybeTriggerPinningPromo() = 0;

  virtual void ShowPageInfoBubble(bool is_pointer_interaction) = 0;

  virtual void OnLogoPointerDown() = 0;

  virtual void CreateNewThread() = 0;
};

class PageProxy;

template <typename ImplRefTraits>
class PageStub;

class PageRequestValidator;


class Page
    : public PageInterfaceBase {
 public:
  using IPCStableHashFunction = uint32_t(*)();
  static constexpr const char* Name_ = "contextual_tasks.mojom.Page";
  static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
  static const char* MessageToMethodName_(mojo::Message& message);
  static constexpr uint32_t Version_ = 0;
  static constexpr bool PassesAssociatedKinds_ = false;
  static constexpr bool HasUninterruptableMethods_ = false;

  using Base_ = PageInterfaceBase;
  using Proxy_ = PageProxy;

  template <typename ImplRefTraits>
  using Stub_ = PageStub<ImplRefTraits>;

  using RequestValidator_ = PageRequestValidator;
  using ResponseValidator_ = mojo::PassThroughFilter;
  enum MethodMinVersions : uint32_t {
    kSetThreadTitleMinVersion = 0,
    kSetTaskDetailsMinVersion = 0,
    kOnSidePanelStateChangedMinVersion = 0,
    kPostAimMessageMinVersion = 0,
    kOnHandshakeCompleteMinVersion = 0,
    kSetOAuthTokenMinVersion = 0,
    kOnCookieSyncCompletedMinVersion = 0,
    kOnContextUpdatedMinVersion = 0,
    kHideInputMinVersion = 0,
    kRestoreInputMinVersion = 0,
    kEnterBasicModeMinVersion = 0,
    kExitBasicModeMinVersion = 0,
    kInjectInputMinVersion = 0,
    kRemoveInjectedInputMinVersion = 0,
    kOnZeroStateChangeMinVersion = 0,
    kSetInNlmMinVersion = 0,
    kOnAiPageStatusChangedMinVersion = 0,
    kOnLensOverlayStateChangedMinVersion = 0,
    kShowErrorPageMinVersion = 0,
    kHideErrorPageMinVersion = 0,
    kShowOauthErrorDialogMinVersion = 0,
    kUpdateComposeboxPositionMinVersion = 0,
    kLockInputMinVersion = 0,
    kUnlockInputMinVersion = 0,
    kSetShowReopenTabsMinVersion = 0,
    kOnSidePanelPinStateChangedMinVersion = 0,
    kSetExpandButtonEnabledMinVersion = 0,
    kTurnOnSmartTabSharingMinVersion = 0,
    kShowSmartTabSharingTryItIphMinVersion = 0,
    kShowSmartTabSharingDefaultOnIphMinVersion = 0,
    kOnWindowClosedMinVersion = 0,
  };

// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
  struct SetThreadTitle_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct SetTaskDetails_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnSidePanelStateChanged_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct PostAimMessage_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnHandshakeComplete_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct SetOAuthToken_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnCookieSyncCompleted_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnContextUpdated_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct HideInput_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct RestoreInput_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct EnterBasicMode_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct ExitBasicMode_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct InjectInput_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct RemoveInjectedInput_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnZeroStateChange_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct SetInNlm_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnAiPageStatusChanged_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnLensOverlayStateChanged_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct ShowErrorPage_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct HideErrorPage_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct ShowOauthErrorDialog_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct UpdateComposeboxPosition_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct LockInput_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct UnlockInput_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct SetShowReopenTabs_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnSidePanelPinStateChanged_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct SetExpandButtonEnabled_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct TurnOnSmartTabSharing_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct ShowSmartTabSharingTryItIph_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct ShowSmartTabSharingDefaultOnIph_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnWindowClosed_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
#endif // !BUILDFLAG(IS_FUCHSIA)
  virtual ~Page() = default;

  virtual void SetThreadTitle(const std::string& title) = 0;

  virtual void SetTaskDetails(const ::base::Uuid& uuid, const ::GURL& url, bool replace_navigation_entry) = 0;

  virtual void OnSidePanelStateChanged() = 0;

  virtual void PostAimMessage(const std::vector<uint8_t>& message) = 0;

  virtual void OnHandshakeComplete() = 0;

  virtual void SetOAuthToken(const std::string& oauth_token) = 0;

  virtual void OnCookieSyncCompleted() = 0;

  virtual void OnContextUpdated(std::vector<ContextInfoPtr> context) = 0;

  virtual void HideInput() = 0;

  virtual void RestoreInput() = 0;

  virtual void EnterBasicMode() = 0;

  virtual void ExitBasicMode() = 0;

  virtual void InjectInput(InjectedInputPtr input) = 0;

  virtual void RemoveInjectedInput(const ::base::UnguessableToken& file_token) = 0;

  virtual void OnZeroStateChange(bool is_zero_state) = 0;

  virtual void SetInNlm(bool in_nlm) = 0;

  virtual void OnAiPageStatusChanged(bool is_ai_page) = 0;

  virtual void OnLensOverlayStateChanged(bool is_showing, bool maybe_show_overlay_hint_text) = 0;

  virtual void ShowErrorPage() = 0;

  virtual void HideErrorPage() = 0;

  virtual void ShowOauthErrorDialog() = 0;

  virtual void UpdateComposeboxPosition(ComposeboxPositionPtr position) = 0;

  virtual void LockInput() = 0;

  virtual void UnlockInput() = 0;

  virtual void SetShowReopenTabs(bool show) = 0;

  virtual void OnSidePanelPinStateChanged(bool is_pinned) = 0;

  virtual void SetExpandButtonEnabled(bool enabled) = 0;

  virtual void TurnOnSmartTabSharing() = 0;

  virtual void ShowSmartTabSharingTryItIph() = 0;

  virtual void ShowSmartTabSharingDefaultOnIph() = 0;

  virtual void OnWindowClosed(const ::contextual_tasks::ContextualWindowId& window_id) = 0;
};

class PageHandlerFactoryProxy;

template <typename ImplRefTraits>
class PageHandlerFactoryStub;

class PageHandlerFactoryRequestValidator;


class PageHandlerFactory
    : public PageHandlerFactoryInterfaceBase {
 public:
  using IPCStableHashFunction = uint32_t(*)();
  static constexpr const char* Name_ = "contextual_tasks.mojom.PageHandlerFactory";
  static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
  static const char* MessageToMethodName_(mojo::Message& message);
  static constexpr uint32_t Version_ = 0;
  static constexpr bool PassesAssociatedKinds_ = false;
  static constexpr bool HasUninterruptableMethods_ = false;

  using Base_ = PageHandlerFactoryInterfaceBase;
  using Proxy_ = PageHandlerFactoryProxy;

  template <typename ImplRefTraits>
  using Stub_ = PageHandlerFactoryStub<ImplRefTraits>;

  using RequestValidator_ = PageHandlerFactoryRequestValidator;
  using ResponseValidator_ = mojo::PassThroughFilter;
  enum MethodMinVersions : uint32_t {
    kCreatePageHandlerMinVersion = 0,
  };

// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
  struct CreatePageHandler_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
#endif // !BUILDFLAG(IS_FUCHSIA)
  virtual ~PageHandlerFactory() = default;

  virtual void CreatePageHandler(::mojo::PendingRemote<Page> page, ::mojo::PendingReceiver<PageHandler> page_handler) = 0;
};

class ExtensionPageHandlerFactoryProxy;

template <typename ImplRefTraits>
class ExtensionPageHandlerFactoryStub;

class ExtensionPageHandlerFactoryRequestValidator;


class ExtensionPageHandlerFactory
    : public ExtensionPageHandlerFactoryInterfaceBase {
 public:
  using IPCStableHashFunction = uint32_t(*)();
  static constexpr const char* Name_ = "contextual_tasks.mojom.ExtensionPageHandlerFactory";
  static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
  static const char* MessageToMethodName_(mojo::Message& message);
  static constexpr uint32_t Version_ = 0;
  static constexpr bool PassesAssociatedKinds_ = false;
  static constexpr bool HasUninterruptableMethods_ = false;

  using Base_ = ExtensionPageHandlerFactoryInterfaceBase;
  using Proxy_ = ExtensionPageHandlerFactoryProxy;

  template <typename ImplRefTraits>
  using Stub_ = ExtensionPageHandlerFactoryStub<ImplRefTraits>;

  using RequestValidator_ = ExtensionPageHandlerFactoryRequestValidator;
  using ResponseValidator_ = mojo::PassThroughFilter;
  enum MethodMinVersions : uint32_t {
    kCreateExtensionPageHandlerMinVersion = 0,
  };

// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
  struct CreateExtensionPageHandler_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
#endif // !BUILDFLAG(IS_FUCHSIA)
  virtual ~ExtensionPageHandlerFactory() = default;

  virtual void CreateExtensionPageHandler(::mojo::PendingRemote<ExtensionPage> page, ::mojo::PendingReceiver<ExtensionPageHandler> receiver) = 0;
};

class ExtensionPageHandlerProxy;

template <typename ImplRefTraits>
class ExtensionPageHandlerStub;

class ExtensionPageHandlerRequestValidator;
class ExtensionPageHandlerResponseValidator;


class ExtensionPageHandler
    : public ExtensionPageHandlerInterfaceBase {
 public:
  using IPCStableHashFunction = uint32_t(*)();
  static constexpr const char* Name_ = "contextual_tasks.mojom.ExtensionPageHandler";
  static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
  static const char* MessageToMethodName_(mojo::Message& message);
  static constexpr uint32_t Version_ = 0;
  static constexpr bool PassesAssociatedKinds_ = false;
  static constexpr bool HasUninterruptableMethods_ = false;

  using Base_ = ExtensionPageHandlerInterfaceBase;
  using Proxy_ = ExtensionPageHandlerProxy;

  template <typename ImplRefTraits>
  using Stub_ = ExtensionPageHandlerStub<ImplRefTraits>;

  using RequestValidator_ = ExtensionPageHandlerRequestValidator;
  using ResponseValidator_ = ExtensionPageHandlerResponseValidator;
  enum MethodMinVersions : uint32_t {
    kGetHandshakeMessageMinVersion = 0,
    kOnWebviewMessageMinVersion = 0,
    kSetTaskIdMinVersion = 0,
  };

// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
  struct GetHandshakeMessage_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnWebviewMessage_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct SetTaskId_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
#endif // !BUILDFLAG(IS_FUCHSIA)
  virtual ~ExtensionPageHandler() = default;

  using GetHandshakeMessageCallback = base::OnceCallback<void(::mojo_base::ProtoWrapper)>;
  using GetHandshakeMessageMojoCallback = base::OnceCallback<void(::mojo_base::ProtoWrapper)>;

  virtual void GetHandshakeMessage(GetHandshakeMessageCallback callback) = 0;

  virtual void OnWebviewMessage(const std::vector<uint8_t>& message) = 0;

  virtual void SetTaskId(const ::base::Uuid& uuid) = 0;
};

class ExtensionPageProxy;

template <typename ImplRefTraits>
class ExtensionPageStub;

class ExtensionPageRequestValidator;


class ExtensionPage
    : public ExtensionPageInterfaceBase {
 public:
  using IPCStableHashFunction = uint32_t(*)();
  static constexpr const char* Name_ = "contextual_tasks.mojom.ExtensionPage";
  static IPCStableHashFunction MessageToMethodInfo_(mojo::Message& message);
  static const char* MessageToMethodName_(mojo::Message& message);
  static constexpr uint32_t Version_ = 0;
  static constexpr bool PassesAssociatedKinds_ = false;
  static constexpr bool HasUninterruptableMethods_ = false;

  using Base_ = ExtensionPageInterfaceBase;
  using Proxy_ = ExtensionPageProxy;

  template <typename ImplRefTraits>
  using Stub_ = ExtensionPageStub<ImplRefTraits>;

  using RequestValidator_ = ExtensionPageRequestValidator;
  using ResponseValidator_ = mojo::PassThroughFilter;
  enum MethodMinVersions : uint32_t {
    kPostAimMessageMinVersion = 0,
    kOnHandshakeCompleteMinVersion = 0,
    kHideInputMinVersion = 0,
    kRestoreInputMinVersion = 0,
    kEnterBasicModeMinVersion = 0,
    kExitBasicModeMinVersion = 0,
    kLockInputMinVersion = 0,
    kUnlockInputMinVersion = 0,
  };

// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
  struct PostAimMessage_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct OnHandshakeComplete_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct HideInput_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct RestoreInput_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct EnterBasicMode_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct ExitBasicMode_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct LockInput_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
  struct UnlockInput_Sym {
    NOINLINE static uint32_t IPCStableHash();
  };
#endif // !BUILDFLAG(IS_FUCHSIA)
  virtual ~ExtensionPage() = default;

  virtual void PostAimMessage(const std::vector<uint8_t>& message) = 0;

  virtual void OnHandshakeComplete() = 0;

  virtual void HideInput() = 0;

  virtual void RestoreInput() = 0;

  virtual void EnterBasicMode() = 0;

  virtual void ExitBasicMode() = 0;

  virtual void LockInput() = 0;

  virtual void UnlockInput() = 0;
};



class  PageHandlerProxy
    : public PageHandler {
 public:
  using InterfaceType = PageHandler;

  explicit PageHandlerProxy(mojo::MessageReceiverWithResponder* receiver);
  
  void GetThreadUrl(GetThreadUrlCallback callback) final;
  
  void GetUrlForTask(const ::base::Uuid& uuid, GetUrlForTaskCallback callback) final;
  
  void SetTaskId(const ::base::Uuid& uuid) final;
  
  void IsZeroState(const ::GURL& url, IsZeroStateCallback callback) final;
  
  void IsAiPage(const ::GURL& url, IsAiPageCallback callback) final;
  
  void IsPendingErrorPage(const ::base::Uuid& task_id, IsPendingErrorPageCallback callback) final;
  
  void IsEmbeddedPageErrorDocument(IsEmbeddedPageErrorDocumentCallback callback) final;
  
  void SetThreadTitle(const std::string& title) final;
  
  void CloseSidePanel() final;
  
  void ShowThreadHistory() final;
  
  void IsShownInTab(IsShownInTabCallback callback) final;
  
  void OpenMyActivityUi() final;
  
  void OpenFeedbackUi() final;
  
  void OpenOnboardingHelpUi() final;
  
  void OpenOverflowMenuHelpUi() final;
  
  void OpenUrl(const ::GURL& url, ::WindowOpenDisposition disposition) final;
  
  void MoveTaskUiToNewTab() final;
  
  void OnTabClickedFromSourcesMenu(int32_t tab_id, const ::GURL& url) final;
  
  void OnFileClickedFromSourcesMenu(const ::GURL& url) final;
  
  void OnImageClickedFromSourcesMenu(const ::GURL& url) final;
  
  void OnWebviewMessage(const std::vector<uint8_t>& message) final;
  
  void GetCommonSearchParams(bool is_dark_mode, bool is_side_panel, GetCommonSearchParamsCallback callback) final;
  
  void OnboardingTooltipDismissed() final;
  
  void LensSearchTooltipDismissed() final;
  
  void AskGTooltipDismissed() final;
  
  void ReopenTabs() final;
  
  void PinSidePanel() final;
  
  void UnpinSidePanel() final;
  
  void OnContextMenuOpened() final;
  
  void NotifySmartTabSharingTryItIphResult(bool accepted) final;
  
  void NotifySmartTabSharingDefaultOnIphResult(bool accepted) final;
  
  void RegisterWindow(const ::contextual_tasks::ContextualTaskId& task_id, const ::GURL& url, const ::contextual_tasks::ContextualWindowId& window_id) final;
  
  void CloseWindow(const ::contextual_tasks::ContextualWindowId& window_id) final;
  
  void MaybeTriggerPinningPromo() final;
  
  void ShowPageInfoBubble(bool is_pointer_interaction) final;
  
  void OnLogoPointerDown() final;
  
  void CreateNewThread() final;

 private:
  mojo::MessageReceiverWithResponder* receiver_;
};



class  PageProxy
    : public Page {
 public:
  using InterfaceType = Page;

  explicit PageProxy(mojo::MessageReceiverWithResponder* receiver);
  
  void SetThreadTitle(const std::string& title) final;
  
  void SetTaskDetails(const ::base::Uuid& uuid, const ::GURL& url, bool replace_navigation_entry) final;
  
  void OnSidePanelStateChanged() final;
  
  void PostAimMessage(const std::vector<uint8_t>& message) final;
  
  void OnHandshakeComplete() final;
  
  void SetOAuthToken(const std::string& oauth_token) final;
  
  void OnCookieSyncCompleted() final;
  
  void OnContextUpdated(std::vector<ContextInfoPtr> context) final;
  
  void HideInput() final;
  
  void RestoreInput() final;
  
  void EnterBasicMode() final;
  
  void ExitBasicMode() final;
  
  void InjectInput(InjectedInputPtr input) final;
  
  void RemoveInjectedInput(const ::base::UnguessableToken& file_token) final;
  
  void OnZeroStateChange(bool is_zero_state) final;
  
  void SetInNlm(bool in_nlm) final;
  
  void OnAiPageStatusChanged(bool is_ai_page) final;
  
  void OnLensOverlayStateChanged(bool is_showing, bool maybe_show_overlay_hint_text) final;
  
  void ShowErrorPage() final;
  
  void HideErrorPage() final;
  
  void ShowOauthErrorDialog() final;
  
  void UpdateComposeboxPosition(ComposeboxPositionPtr position) final;
  
  void LockInput() final;
  
  void UnlockInput() final;
  
  void SetShowReopenTabs(bool show) final;
  
  void OnSidePanelPinStateChanged(bool is_pinned) final;
  
  void SetExpandButtonEnabled(bool enabled) final;
  
  void TurnOnSmartTabSharing() final;
  
  void ShowSmartTabSharingTryItIph() final;
  
  void ShowSmartTabSharingDefaultOnIph() final;
  
  void OnWindowClosed(const ::contextual_tasks::ContextualWindowId& window_id) final;

 private:
  mojo::MessageReceiverWithResponder* receiver_;
};



class  PageHandlerFactoryProxy
    : public PageHandlerFactory {
 public:
  using InterfaceType = PageHandlerFactory;

  explicit PageHandlerFactoryProxy(mojo::MessageReceiverWithResponder* receiver);
  
  void CreatePageHandler(::mojo::PendingRemote<Page> page, ::mojo::PendingReceiver<PageHandler> page_handler) final;

 private:
  mojo::MessageReceiverWithResponder* receiver_;
};



class  ExtensionPageHandlerFactoryProxy
    : public ExtensionPageHandlerFactory {
 public:
  using InterfaceType = ExtensionPageHandlerFactory;

  explicit ExtensionPageHandlerFactoryProxy(mojo::MessageReceiverWithResponder* receiver);
  
  void CreateExtensionPageHandler(::mojo::PendingRemote<ExtensionPage> page, ::mojo::PendingReceiver<ExtensionPageHandler> receiver) final;

 private:
  mojo::MessageReceiverWithResponder* receiver_;
};



class  ExtensionPageHandlerProxy
    : public ExtensionPageHandler {
 public:
  using InterfaceType = ExtensionPageHandler;

  explicit ExtensionPageHandlerProxy(mojo::MessageReceiverWithResponder* receiver);
  
  void GetHandshakeMessage(GetHandshakeMessageCallback callback) final;
  
  void OnWebviewMessage(const std::vector<uint8_t>& message) final;
  
  void SetTaskId(const ::base::Uuid& uuid) final;

 private:
  mojo::MessageReceiverWithResponder* receiver_;
};



class  ExtensionPageProxy
    : public ExtensionPage {
 public:
  using InterfaceType = ExtensionPage;

  explicit ExtensionPageProxy(mojo::MessageReceiverWithResponder* receiver);
  
  void PostAimMessage(const std::vector<uint8_t>& message) final;
  
  void OnHandshakeComplete() final;
  
  void HideInput() final;
  
  void RestoreInput() final;
  
  void EnterBasicMode() final;
  
  void ExitBasicMode() final;
  
  void LockInput() final;
  
  void UnlockInput() final;

 private:
  mojo::MessageReceiverWithResponder* receiver_;
};
class  PageHandlerStubDispatch {
 public:
  static bool Accept(PageHandler* impl, mojo::Message* message);
  static bool AcceptWithResponder(
      PageHandler* impl,
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};

template <typename ImplRefTraits =
              mojo::RawPtrImplRefTraits<PageHandler>>
class PageHandlerStub
    : public mojo::MessageReceiverWithResponderStatus {
 public:
  using ImplPointerType = typename ImplRefTraits::PointerType;

  PageHandlerStub() = default;
  ~PageHandlerStub() override = default;

  void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
  ImplPointerType& sink() { return sink_; }

  bool Accept(mojo::Message* message) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return PageHandlerStubDispatch::Accept(
        ImplRefTraits::GetRawPointer(&sink_), message);
  }

  bool AcceptWithResponder(
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return PageHandlerStubDispatch::AcceptWithResponder(
        ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
  }

 private:
  ImplPointerType sink_;
};
class  PageStubDispatch {
 public:
  static bool Accept(Page* impl, mojo::Message* message);
  static bool AcceptWithResponder(
      Page* impl,
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};

template <typename ImplRefTraits =
              mojo::RawPtrImplRefTraits<Page>>
class PageStub
    : public mojo::MessageReceiverWithResponderStatus {
 public:
  using ImplPointerType = typename ImplRefTraits::PointerType;

  PageStub() = default;
  ~PageStub() override = default;

  void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
  ImplPointerType& sink() { return sink_; }

  bool Accept(mojo::Message* message) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return PageStubDispatch::Accept(
        ImplRefTraits::GetRawPointer(&sink_), message);
  }

  bool AcceptWithResponder(
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return PageStubDispatch::AcceptWithResponder(
        ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
  }

 private:
  ImplPointerType sink_;
};
class  PageHandlerFactoryStubDispatch {
 public:
  static bool Accept(PageHandlerFactory* impl, mojo::Message* message);
  static bool AcceptWithResponder(
      PageHandlerFactory* impl,
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};

template <typename ImplRefTraits =
              mojo::RawPtrImplRefTraits<PageHandlerFactory>>
class PageHandlerFactoryStub
    : public mojo::MessageReceiverWithResponderStatus {
 public:
  using ImplPointerType = typename ImplRefTraits::PointerType;

  PageHandlerFactoryStub() = default;
  ~PageHandlerFactoryStub() override = default;

  void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
  ImplPointerType& sink() { return sink_; }

  bool Accept(mojo::Message* message) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return PageHandlerFactoryStubDispatch::Accept(
        ImplRefTraits::GetRawPointer(&sink_), message);
  }

  bool AcceptWithResponder(
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return PageHandlerFactoryStubDispatch::AcceptWithResponder(
        ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
  }

 private:
  ImplPointerType sink_;
};
class  ExtensionPageHandlerFactoryStubDispatch {
 public:
  static bool Accept(ExtensionPageHandlerFactory* impl, mojo::Message* message);
  static bool AcceptWithResponder(
      ExtensionPageHandlerFactory* impl,
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};

template <typename ImplRefTraits =
              mojo::RawPtrImplRefTraits<ExtensionPageHandlerFactory>>
class ExtensionPageHandlerFactoryStub
    : public mojo::MessageReceiverWithResponderStatus {
 public:
  using ImplPointerType = typename ImplRefTraits::PointerType;

  ExtensionPageHandlerFactoryStub() = default;
  ~ExtensionPageHandlerFactoryStub() override = default;

  void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
  ImplPointerType& sink() { return sink_; }

  bool Accept(mojo::Message* message) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return ExtensionPageHandlerFactoryStubDispatch::Accept(
        ImplRefTraits::GetRawPointer(&sink_), message);
  }

  bool AcceptWithResponder(
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return ExtensionPageHandlerFactoryStubDispatch::AcceptWithResponder(
        ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
  }

 private:
  ImplPointerType sink_;
};
class  ExtensionPageHandlerStubDispatch {
 public:
  static bool Accept(ExtensionPageHandler* impl, mojo::Message* message);
  static bool AcceptWithResponder(
      ExtensionPageHandler* impl,
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};

template <typename ImplRefTraits =
              mojo::RawPtrImplRefTraits<ExtensionPageHandler>>
class ExtensionPageHandlerStub
    : public mojo::MessageReceiverWithResponderStatus {
 public:
  using ImplPointerType = typename ImplRefTraits::PointerType;

  ExtensionPageHandlerStub() = default;
  ~ExtensionPageHandlerStub() override = default;

  void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
  ImplPointerType& sink() { return sink_; }

  bool Accept(mojo::Message* message) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return ExtensionPageHandlerStubDispatch::Accept(
        ImplRefTraits::GetRawPointer(&sink_), message);
  }

  bool AcceptWithResponder(
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return ExtensionPageHandlerStubDispatch::AcceptWithResponder(
        ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
  }

 private:
  ImplPointerType sink_;
};
class  ExtensionPageStubDispatch {
 public:
  static bool Accept(ExtensionPage* impl, mojo::Message* message);
  static bool AcceptWithResponder(
      ExtensionPage* impl,
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};

template <typename ImplRefTraits =
              mojo::RawPtrImplRefTraits<ExtensionPage>>
class ExtensionPageStub
    : public mojo::MessageReceiverWithResponderStatus {
 public:
  using ImplPointerType = typename ImplRefTraits::PointerType;

  ExtensionPageStub() = default;
  ~ExtensionPageStub() override = default;

  void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
  ImplPointerType& sink() { return sink_; }

  bool Accept(mojo::Message* message) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return ExtensionPageStubDispatch::Accept(
        ImplRefTraits::GetRawPointer(&sink_), message);
  }

  bool AcceptWithResponder(
      mojo::Message* message,
      std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
    if (ImplRefTraits::IsNull(sink_))
      return false;
    return ExtensionPageStubDispatch::AcceptWithResponder(
        ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
  }

 private:
  ImplPointerType sink_;
};
class  PageHandlerRequestValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class  PageRequestValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class  PageHandlerFactoryRequestValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class  ExtensionPageHandlerFactoryRequestValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class  ExtensionPageHandlerRequestValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class  ExtensionPageRequestValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class  PageHandlerResponseValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};
class  ExtensionPageHandlerResponseValidator : public mojo::MessageReceiver {
 public:
  bool Accept(mojo::Message* message) override;
};











class  ComposeboxPosition {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<ComposeboxPosition, T>::value>;
  using DataView = ComposeboxPositionDataView;
  using Data_ = internal::ComposeboxPosition_Data;

  template <typename... Args>
  static ComposeboxPositionPtr New(Args&&... args) {
    return ComposeboxPositionPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static ComposeboxPositionPtr From(const U& u) {
    return mojo::TypeConverter<ComposeboxPositionPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, ComposeboxPosition>::Convert(*this);
  }


  ComposeboxPosition();

  ComposeboxPosition(
      std::optional<uint32_t> max_width,
      std::optional<uint32_t> max_height,
      std::optional<int32_t> margin_bottom,
      std::optional<int32_t> margin_left);


  ~ComposeboxPosition();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = ComposeboxPositionPtr>
  ComposeboxPositionPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, ComposeboxPosition::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, ComposeboxPosition::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, ComposeboxPosition::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        ComposeboxPosition::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        ComposeboxPosition::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        ComposeboxPosition::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::ComposeboxPosition_UnserializedMessageContext<
            UserType, ComposeboxPosition::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<ComposeboxPosition::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return ComposeboxPosition::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::ComposeboxPosition_UnserializedMessageContext<
            UserType, ComposeboxPosition::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<ComposeboxPosition::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  std::optional<uint32_t> max_width;
  
  std::optional<uint32_t> max_height;
  
  std::optional<int32_t> margin_bottom;
  
  std::optional<int32_t> margin_left;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, ComposeboxPosition::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, ComposeboxPosition::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, ComposeboxPosition::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, ComposeboxPosition::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class  ContextInfo {
 public:
  using DataView = ContextInfoDataView;
  using Data_ = internal::ContextInfo_Data;
  using Tag = Data_::ContextInfo_Tag;

  template <typename... Args>
  static ContextInfoPtr New(Args&&... args) {
    static_assert(
        sizeof...(args) < 0,
        "Do not use Union::New(); to create a union of a given subtype, use "
        "New<SubType>(), not New() followed by set_<sub_type>(). To represent "
        "an empty union, mark the field or parameter as nullable in the mojom "
        "definition.");
    return nullptr;
  }

  // Construct an instance holding |tab|.
  static ContextInfoPtr NewTab(
      TabContextPtr value);
  // Construct an instance holding |image|.
  static ContextInfoPtr NewImage(
      ImageContextPtr value);
  // Construct an instance holding |file|.
  static ContextInfoPtr NewFile(
      FileContextPtr value);

  template <typename U>
  static ContextInfoPtr From(const U& u) {
    return mojo::TypeConverter<ContextInfoPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, ContextInfo>::Convert(*this);
  }
  ~ContextInfo();

  // Delete the copy constructor and copy assignment operators because `data_`
  // contains raw pointers that must not be copied.
  ContextInfo(const ContextInfo& other) = delete;
  ContextInfo& operator=(const ContextInfo& other) = delete;

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename UnionPtrType = ContextInfoPtr>
  ContextInfoPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T,
            typename std::enable_if<std::is_same<
                T, ContextInfo>::value>::type* = nullptr>
  bool Equals(const T& other) const;

  template <typename T,
            typename std::enable_if<std::is_same<
                T, ContextInfo>::value>::type* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  Tag which() const {
    return tag_;
  }

  bool is_tab() const { return tag_ == Tag::kTab; }
  const TabContextPtr& get_tab() const {
    CHECK(tag_ == Tag::kTab);
    return data_.tab;
  }
  TabContextPtr& get_tab() {
    CHECK(tag_ == Tag::kTab);
    return data_.tab;
  }
  void set_tab(TabContextPtr tab);

  bool is_image() const { return tag_ == Tag::kImage; }
  const ImageContextPtr& get_image() const {
    CHECK(tag_ == Tag::kImage);
    return data_.image;
  }
  ImageContextPtr& get_image() {
    CHECK(tag_ == Tag::kImage);
    return data_.image;
  }
  void set_image(ImageContextPtr image);

  bool is_file() const { return tag_ == Tag::kFile; }
  const FileContextPtr& get_file() const {
    CHECK(tag_ == Tag::kFile);
    return data_.file;
  }
  FileContextPtr& get_file() {
    CHECK(tag_ == Tag::kFile);
    return data_.file;
  }
  void set_file(FileContextPtr file);

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        ContextInfo::DataView>(input);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    return mojo::internal::DeserializeImpl<ContextInfo::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

 private:
  template <typename T>
  friend class ::mojo::InlinedStructPtr;
  template <typename T>
  friend class ::mojo::StructPtr;

  union Union_ {
    Union_(
        std::in_place_index_t<static_cast<size_t>(Tag::kTab)>,
        TabContextPtr value);
    Union_(
        std::in_place_index_t<static_cast<size_t>(Tag::kImage)>,
        ImageContextPtr value);
    Union_(
        std::in_place_index_t<static_cast<size_t>(Tag::kFile)>,
        FileContextPtr value);
    // The contents of the union are explicitly destroyed by `DestroyActive()`.
    ~Union_() {}

    TabContextPtr tab;
    ImageContextPtr image;
    FileContextPtr file;
  };

  ContextInfo(
      std::in_place_index_t<static_cast<size_t>(Tag::kTab)>,
      TabContextPtr value);
  ContextInfo(
      std::in_place_index_t<static_cast<size_t>(Tag::kImage)>,
      ImageContextPtr value);
  ContextInfo(
      std::in_place_index_t<static_cast<size_t>(Tag::kFile)>,
      FileContextPtr value);

  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);

  void DestroyActive();
  Tag tag_;
  Union_ data_;
};





class  InjectedInput {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<InjectedInput, T>::value>;
  using DataView = InjectedInputDataView;
  using Data_ = internal::InjectedInput_Data;

  template <typename... Args>
  static InjectedInputPtr New(Args&&... args) {
    return InjectedInputPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static InjectedInputPtr From(const U& u) {
    return mojo::TypeConverter<InjectedInputPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, InjectedInput>::Convert(*this);
  }


  InjectedInput();

  InjectedInput(
      const std::optional<std::string>& title,
      const std::optional<std::string>& thumbnail,
      IconType icon_id,
      const std::optional<::base::UnguessableToken>& file_token,
      bool supports_unimodal,
      const std::optional<std::string>& query_text,
      bool submit_after_injection);


  ~InjectedInput();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = InjectedInputPtr>
  InjectedInputPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, InjectedInput::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, InjectedInput::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, InjectedInput::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        InjectedInput::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        InjectedInput::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        InjectedInput::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::InjectedInput_UnserializedMessageContext<
            UserType, InjectedInput::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<InjectedInput::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return InjectedInput::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::InjectedInput_UnserializedMessageContext<
            UserType, InjectedInput::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<InjectedInput::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  std::optional<std::string> title;
  
  std::optional<std::string> thumbnail;
  
  IconType icon_id;
  
  std::optional<::base::UnguessableToken> file_token;
  
  bool supports_unimodal;
  
  std::optional<std::string> query_text;
  
  bool submit_after_injection;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, InjectedInput::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, InjectedInput::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, InjectedInput::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, InjectedInput::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class  ContextualTaskId {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<ContextualTaskId, T>::value>;
  using DataView = ContextualTaskIdDataView;
  using Data_ = internal::ContextualTaskId_Data;

  template <typename... Args>
  static ContextualTaskIdPtr New(Args&&... args) {
    return ContextualTaskIdPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static ContextualTaskIdPtr From(const U& u) {
    return mojo::TypeConverter<ContextualTaskIdPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, ContextualTaskId>::Convert(*this);
  }


  ContextualTaskId();

  explicit ContextualTaskId(
      const ::base::Uuid& value);


  ~ContextualTaskId();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = ContextualTaskIdPtr>
  ContextualTaskIdPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, ContextualTaskId::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, ContextualTaskId::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, ContextualTaskId::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        ContextualTaskId::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        ContextualTaskId::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        ContextualTaskId::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::ContextualTaskId_UnserializedMessageContext<
            UserType, ContextualTaskId::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<ContextualTaskId::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return ContextualTaskId::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::ContextualTaskId_UnserializedMessageContext<
            UserType, ContextualTaskId::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<ContextualTaskId::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::base::Uuid value;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, ContextualTaskId::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, ContextualTaskId::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, ContextualTaskId::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, ContextualTaskId::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class  ContextualWindowId {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<ContextualWindowId, T>::value>;
  using DataView = ContextualWindowIdDataView;
  using Data_ = internal::ContextualWindowId_Data;

  template <typename... Args>
  static ContextualWindowIdPtr New(Args&&... args) {
    return ContextualWindowIdPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static ContextualWindowIdPtr From(const U& u) {
    return mojo::TypeConverter<ContextualWindowIdPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, ContextualWindowId>::Convert(*this);
  }


  ContextualWindowId();

  explicit ContextualWindowId(
      const ::base::UnguessableToken& value);


  ~ContextualWindowId();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = ContextualWindowIdPtr>
  ContextualWindowIdPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, ContextualWindowId::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, ContextualWindowId::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, ContextualWindowId::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        ContextualWindowId::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        ContextualWindowId::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        ContextualWindowId::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::ContextualWindowId_UnserializedMessageContext<
            UserType, ContextualWindowId::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<ContextualWindowId::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return ContextualWindowId::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::ContextualWindowId_UnserializedMessageContext<
            UserType, ContextualWindowId::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<ContextualWindowId::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::base::UnguessableToken value;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, ContextualWindowId::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, ContextualWindowId::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, ContextualWindowId::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, ContextualWindowId::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class  TabContext {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<TabContext, T>::value>;
  using DataView = TabContextDataView;
  using Data_ = internal::TabContext_Data;

  template <typename... Args>
  static TabContextPtr New(Args&&... args) {
    return TabContextPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static TabContextPtr From(const U& u) {
    return mojo::TypeConverter<TabContextPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, TabContext>::Convert(*this);
  }


  TabContext();

  TabContext(
      const ::GURL& url,
      const std::string& title,
      int32_t tab_id,
      bool has_chrome_tab_data);


  ~TabContext();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = TabContextPtr>
  TabContextPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, TabContext::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, TabContext::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, TabContext::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        TabContext::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        TabContext::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        TabContext::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::TabContext_UnserializedMessageContext<
            UserType, TabContext::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<TabContext::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return TabContext::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::TabContext_UnserializedMessageContext<
            UserType, TabContext::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<TabContext::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::GURL url;
  
  std::string title;
  
  int32_t tab_id;
  
  bool has_chrome_tab_data;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, TabContext::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, TabContext::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, TabContext::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, TabContext::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class  ImageContext {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<ImageContext, T>::value>;
  using DataView = ImageContextDataView;
  using Data_ = internal::ImageContext_Data;

  template <typename... Args>
  static ImageContextPtr New(Args&&... args) {
    return ImageContextPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static ImageContextPtr From(const U& u) {
    return mojo::TypeConverter<ImageContextPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, ImageContext>::Convert(*this);
  }


  ImageContext();

  ImageContext(
      const ::GURL& url,
      const std::string& title);


  ~ImageContext();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = ImageContextPtr>
  ImageContextPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, ImageContext::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, ImageContext::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, ImageContext::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        ImageContext::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        ImageContext::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        ImageContext::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::ImageContext_UnserializedMessageContext<
            UserType, ImageContext::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<ImageContext::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return ImageContext::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::ImageContext_UnserializedMessageContext<
            UserType, ImageContext::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<ImageContext::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::GURL url;
  
  std::string title;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, ImageContext::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, ImageContext::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, ImageContext::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, ImageContext::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}





class  FileContext {
 public:
  template <typename T>
  using EnableIfSame = std::enable_if_t<std::is_same<FileContext, T>::value>;
  using DataView = FileContextDataView;
  using Data_ = internal::FileContext_Data;

  template <typename... Args>
  static FileContextPtr New(Args&&... args) {
    return FileContextPtr(
        std::in_place, std::forward<Args>(args)...);
  }

  template <typename U>
  static FileContextPtr From(const U& u) {
    return mojo::TypeConverter<FileContextPtr, U>::Convert(u);
  }

  template <typename U>
  U To() const {
    return mojo::TypeConverter<U, FileContext>::Convert(*this);
  }


  FileContext();

  FileContext(
      const ::GURL& url,
      const std::string& title);


  ~FileContext();

  // Clone() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Clone() or copy
  // constructor/assignment are available for members.
  template <typename StructPtrType = FileContextPtr>
  FileContextPtr Clone() const;

  // Equals() is a template so it is only instantiated if it is used. Thus, the
  // bindings generator does not need to know whether Equals() or == operator
  // are available for members.
  template <typename T, FileContext::EnableIfSame<T>* = nullptr>
  bool Equals(const T& other) const;

  template <typename T, FileContext::EnableIfSame<T>* = nullptr>
  bool operator==(const T& rhs) const { return Equals(rhs); }

  template <typename T, FileContext::EnableIfSame<T>* = nullptr>
  bool operator!=(const T& rhs) const { return !operator==(rhs); }

  template <mojo::internal::SendValidation send_validation, typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        FileContext::DataView, std::vector<uint8_t>, send_validation>(input);
  }

  template <typename UserType>
  static std::vector<uint8_t> Serialize(UserType* input) {
    return mojo::internal::SerializeImpl<
        FileContext::DataView, std::vector<uint8_t>>(input);
  }

  template <typename UserType>
  static mojo::Message SerializeAsMessage(UserType* input) {
    return mojo::internal::SerializeAsMessageImpl<
        FileContext::DataView>(input);
  }

  // The returned Message is serialized only if the message is moved
  // cross-process or cross-language. Otherwise if the message is Deserialized
  // as the same UserType |input| will just be moved to |output| in
  // DeserializeFromMessage.
  template <typename UserType>
  static mojo::Message WrapAsMessage(UserType input) {
    return mojo::Message(std::make_unique<
        internal::FileContext_UnserializedMessageContext<
            UserType, FileContext::DataView>>(0, 0, std::move(input)),
        MOJO_CREATE_MESSAGE_FLAG_NONE);
  }

  template <typename UserType>
  static bool Deserialize(const void* data,
                          size_t data_num_bytes,
                          UserType* output) {
    mojo::Message message;
    return mojo::internal::DeserializeImpl<FileContext::DataView>(
        message, data, data_num_bytes, output, Validate);
  }

  template <typename UserType>
  static bool Deserialize(base::span<const uint8_t> input,
                          UserType* output) {
    return FileContext::Deserialize(
        input.empty() ? nullptr : input.data(), input.size(), output);
  }

  template <typename UserType>
  static bool DeserializeFromMessage(mojo::Message input,
                                     UserType* output) {
    auto context = input.TakeUnserializedContext<
        internal::FileContext_UnserializedMessageContext<
            UserType, FileContext::DataView>>();
    if (context) {
      *output = std::move(context->TakeData());
      return true;
    }
    input.SerializeIfNecessary();
    return mojo::internal::DeserializeImpl<FileContext::DataView>(
        input, input.payload(), input.payload_num_bytes(), output, Validate);
  }

  
  ::GURL url;
  
  std::string title;

  // Serialise this struct into a trace.
  void WriteIntoTrace(perfetto::TracedValue traced_context) const;

 private:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);
};

// The comparison operators are templates, so they are only instantiated if they
// are used. Thus, the bindings generator does not need to know whether
// comparison operators are available for members.
template <typename T, FileContext::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);

template <typename T, FileContext::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) {
  return !(rhs < lhs);
}

template <typename T, FileContext::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) {
  return rhs < lhs;
}

template <typename T, FileContext::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) {
  return !(lhs < rhs);
}


template <typename UnionPtrType>
ContextInfoPtr ContextInfo::Clone() const {
  switch (tag_) {
    case Tag::kTab:
      return NewTab(
          mojo::Clone(data_.tab));
    case Tag::kImage:
      return NewImage(
          mojo::Clone(data_.image));
    case Tag::kFile:
      return NewFile(
          mojo::Clone(data_.file));
  }
  return nullptr;
}

template <typename T,
          typename std::enable_if<std::is_same<
              T, ContextInfo>::value>::type*>
bool ContextInfo::Equals(const T& other) const {
  if (tag_ != other.which())
    return false;

  switch (tag_) {
    case Tag::kTab:
      return mojo::Equals(data_.tab, other.data_.tab);
    case Tag::kImage:
      return mojo::Equals(data_.image, other.data_.image);
    case Tag::kFile:
      return mojo::Equals(data_.file, other.data_.file);
  }

  return false;
}
template <typename StructPtrType>
InjectedInputPtr InjectedInput::Clone() const {
  return New(
      mojo::Clone(title),
      mojo::Clone(thumbnail),
      mojo::Clone(icon_id),
      mojo::Clone(file_token),
      mojo::Clone(supports_unimodal),
      mojo::Clone(query_text),
      mojo::Clone(submit_after_injection)
  );
}

template <typename T, InjectedInput::EnableIfSame<T>*>
bool InjectedInput::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->title, other_struct.title))
    return false;
  if (!mojo::Equals(this->thumbnail, other_struct.thumbnail))
    return false;
  if (!mojo::Equals(this->icon_id, other_struct.icon_id))
    return false;
  if (!mojo::Equals(this->file_token, other_struct.file_token))
    return false;
  if (!mojo::Equals(this->supports_unimodal, other_struct.supports_unimodal))
    return false;
  if (!mojo::Equals(this->query_text, other_struct.query_text))
    return false;
  if (!mojo::Equals(this->submit_after_injection, other_struct.submit_after_injection))
    return false;
  return true;
}

template <typename T, InjectedInput::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.title < rhs.title)
    return true;
  if (rhs.title < lhs.title)
    return false;
  if (lhs.thumbnail < rhs.thumbnail)
    return true;
  if (rhs.thumbnail < lhs.thumbnail)
    return false;
  if (lhs.icon_id < rhs.icon_id)
    return true;
  if (rhs.icon_id < lhs.icon_id)
    return false;
  if (lhs.file_token < rhs.file_token)
    return true;
  if (rhs.file_token < lhs.file_token)
    return false;
  if (lhs.supports_unimodal < rhs.supports_unimodal)
    return true;
  if (rhs.supports_unimodal < lhs.supports_unimodal)
    return false;
  if (lhs.query_text < rhs.query_text)
    return true;
  if (rhs.query_text < lhs.query_text)
    return false;
  if (lhs.submit_after_injection < rhs.submit_after_injection)
    return true;
  if (rhs.submit_after_injection < lhs.submit_after_injection)
    return false;
  return false;
}
template <typename StructPtrType>
ContextualTaskIdPtr ContextualTaskId::Clone() const {
  return New(
      mojo::Clone(value)
  );
}

template <typename T, ContextualTaskId::EnableIfSame<T>*>
bool ContextualTaskId::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->value, other_struct.value))
    return false;
  return true;
}

template <typename T, ContextualTaskId::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.value < rhs.value)
    return true;
  if (rhs.value < lhs.value)
    return false;
  return false;
}
template <typename StructPtrType>
ContextualWindowIdPtr ContextualWindowId::Clone() const {
  return New(
      mojo::Clone(value)
  );
}

template <typename T, ContextualWindowId::EnableIfSame<T>*>
bool ContextualWindowId::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->value, other_struct.value))
    return false;
  return true;
}

template <typename T, ContextualWindowId::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.value < rhs.value)
    return true;
  if (rhs.value < lhs.value)
    return false;
  return false;
}
template <typename StructPtrType>
TabContextPtr TabContext::Clone() const {
  return New(
      mojo::Clone(url),
      mojo::Clone(title),
      mojo::Clone(tab_id),
      mojo::Clone(has_chrome_tab_data)
  );
}

template <typename T, TabContext::EnableIfSame<T>*>
bool TabContext::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->url, other_struct.url))
    return false;
  if (!mojo::Equals(this->title, other_struct.title))
    return false;
  if (!mojo::Equals(this->tab_id, other_struct.tab_id))
    return false;
  if (!mojo::Equals(this->has_chrome_tab_data, other_struct.has_chrome_tab_data))
    return false;
  return true;
}

template <typename T, TabContext::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.url < rhs.url)
    return true;
  if (rhs.url < lhs.url)
    return false;
  if (lhs.title < rhs.title)
    return true;
  if (rhs.title < lhs.title)
    return false;
  if (lhs.tab_id < rhs.tab_id)
    return true;
  if (rhs.tab_id < lhs.tab_id)
    return false;
  if (lhs.has_chrome_tab_data < rhs.has_chrome_tab_data)
    return true;
  if (rhs.has_chrome_tab_data < lhs.has_chrome_tab_data)
    return false;
  return false;
}
template <typename StructPtrType>
ImageContextPtr ImageContext::Clone() const {
  return New(
      mojo::Clone(url),
      mojo::Clone(title)
  );
}

template <typename T, ImageContext::EnableIfSame<T>*>
bool ImageContext::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->url, other_struct.url))
    return false;
  if (!mojo::Equals(this->title, other_struct.title))
    return false;
  return true;
}

template <typename T, ImageContext::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.url < rhs.url)
    return true;
  if (rhs.url < lhs.url)
    return false;
  if (lhs.title < rhs.title)
    return true;
  if (rhs.title < lhs.title)
    return false;
  return false;
}
template <typename StructPtrType>
FileContextPtr FileContext::Clone() const {
  return New(
      mojo::Clone(url),
      mojo::Clone(title)
  );
}

template <typename T, FileContext::EnableIfSame<T>*>
bool FileContext::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->url, other_struct.url))
    return false;
  if (!mojo::Equals(this->title, other_struct.title))
    return false;
  return true;
}

template <typename T, FileContext::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.url < rhs.url)
    return true;
  if (rhs.url < lhs.url)
    return false;
  if (lhs.title < rhs.title)
    return true;
  if (rhs.title < lhs.title)
    return false;
  return false;
}
template <typename StructPtrType>
ComposeboxPositionPtr ComposeboxPosition::Clone() const {
  return New(
      mojo::Clone(max_width),
      mojo::Clone(max_height),
      mojo::Clone(margin_bottom),
      mojo::Clone(margin_left)
  );
}

template <typename T, ComposeboxPosition::EnableIfSame<T>*>
bool ComposeboxPosition::Equals(const T& other_struct) const {
  if (!mojo::Equals(this->max_width, other_struct.max_width))
    return false;
  if (!mojo::Equals(this->max_height, other_struct.max_height))
    return false;
  if (!mojo::Equals(this->margin_bottom, other_struct.margin_bottom))
    return false;
  if (!mojo::Equals(this->margin_left, other_struct.margin_left))
    return false;
  return true;
}

template <typename T, ComposeboxPosition::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) {
  if (lhs.max_width < rhs.max_width)
    return true;
  if (rhs.max_width < lhs.max_width)
    return false;
  if (lhs.max_height < rhs.max_height)
    return true;
  if (rhs.max_height < lhs.max_height)
    return false;
  if (lhs.margin_bottom < rhs.margin_bottom)
    return true;
  if (rhs.margin_bottom < lhs.margin_bottom)
    return false;
  if (lhs.margin_left < rhs.margin_left)
    return true;
  if (rhs.margin_left < lhs.margin_left)
    return false;
  return false;
}


}  // contextual_tasks::mojom

namespace mojo {


template <>
struct  StructTraits<::contextual_tasks::mojom::InjectedInput::DataView,
                                         ::contextual_tasks::mojom::InjectedInputPtr> {
  static bool IsNull(const ::contextual_tasks::mojom::InjectedInputPtr& input) { return !input; }
  static void SetToNull(::contextual_tasks::mojom::InjectedInputPtr* output) { output->reset(); }

  static const decltype(::contextual_tasks::mojom::InjectedInput::title)& title(
      const ::contextual_tasks::mojom::InjectedInputPtr& input) {
    return input->title;
  }

  static const decltype(::contextual_tasks::mojom::InjectedInput::thumbnail)& thumbnail(
      const ::contextual_tasks::mojom::InjectedInputPtr& input) {
    return input->thumbnail;
  }

  static decltype(::contextual_tasks::mojom::InjectedInput::icon_id) icon_id(
      const ::contextual_tasks::mojom::InjectedInputPtr& input) {
    return input->icon_id;
  }

  static const decltype(::contextual_tasks::mojom::InjectedInput::file_token)& file_token(
      const ::contextual_tasks::mojom::InjectedInputPtr& input) {
    return input->file_token;
  }

  static decltype(::contextual_tasks::mojom::InjectedInput::supports_unimodal) supports_unimodal(
      const ::contextual_tasks::mojom::InjectedInputPtr& input) {
    return input->supports_unimodal;
  }

  static const decltype(::contextual_tasks::mojom::InjectedInput::query_text)& query_text(
      const ::contextual_tasks::mojom::InjectedInputPtr& input) {
    return input->query_text;
  }

  static decltype(::contextual_tasks::mojom::InjectedInput::submit_after_injection) submit_after_injection(
      const ::contextual_tasks::mojom::InjectedInputPtr& input) {
    return input->submit_after_injection;
  }

  static bool Read(::contextual_tasks::mojom::InjectedInput::DataView input, ::contextual_tasks::mojom::InjectedInputPtr* output);
};


template <>
struct  StructTraits<::contextual_tasks::mojom::ContextualTaskId::DataView,
                                         ::contextual_tasks::mojom::ContextualTaskIdPtr> {
  static bool IsNull(const ::contextual_tasks::mojom::ContextualTaskIdPtr& input) { return !input; }
  static void SetToNull(::contextual_tasks::mojom::ContextualTaskIdPtr* output) { output->reset(); }

  static const decltype(::contextual_tasks::mojom::ContextualTaskId::value)& value(
      const ::contextual_tasks::mojom::ContextualTaskIdPtr& input) {
    return input->value;
  }

  static bool Read(::contextual_tasks::mojom::ContextualTaskId::DataView input, ::contextual_tasks::mojom::ContextualTaskIdPtr* output);
};


template <>
struct  StructTraits<::contextual_tasks::mojom::ContextualWindowId::DataView,
                                         ::contextual_tasks::mojom::ContextualWindowIdPtr> {
  static bool IsNull(const ::contextual_tasks::mojom::ContextualWindowIdPtr& input) { return !input; }
  static void SetToNull(::contextual_tasks::mojom::ContextualWindowIdPtr* output) { output->reset(); }

  static const decltype(::contextual_tasks::mojom::ContextualWindowId::value)& value(
      const ::contextual_tasks::mojom::ContextualWindowIdPtr& input) {
    return input->value;
  }

  static bool Read(::contextual_tasks::mojom::ContextualWindowId::DataView input, ::contextual_tasks::mojom::ContextualWindowIdPtr* output);
};


template <>
struct  StructTraits<::contextual_tasks::mojom::TabContext::DataView,
                                         ::contextual_tasks::mojom::TabContextPtr> {
  static bool IsNull(const ::contextual_tasks::mojom::TabContextPtr& input) { return !input; }
  static void SetToNull(::contextual_tasks::mojom::TabContextPtr* output) { output->reset(); }

  static const decltype(::contextual_tasks::mojom::TabContext::url)& url(
      const ::contextual_tasks::mojom::TabContextPtr& input) {
    return input->url;
  }

  static const decltype(::contextual_tasks::mojom::TabContext::title)& title(
      const ::contextual_tasks::mojom::TabContextPtr& input) {
    return input->title;
  }

  static decltype(::contextual_tasks::mojom::TabContext::tab_id) tab_id(
      const ::contextual_tasks::mojom::TabContextPtr& input) {
    return input->tab_id;
  }

  static decltype(::contextual_tasks::mojom::TabContext::has_chrome_tab_data) has_chrome_tab_data(
      const ::contextual_tasks::mojom::TabContextPtr& input) {
    return input->has_chrome_tab_data;
  }

  static bool Read(::contextual_tasks::mojom::TabContext::DataView input, ::contextual_tasks::mojom::TabContextPtr* output);
};


template <>
struct  StructTraits<::contextual_tasks::mojom::ImageContext::DataView,
                                         ::contextual_tasks::mojom::ImageContextPtr> {
  static bool IsNull(const ::contextual_tasks::mojom::ImageContextPtr& input) { return !input; }
  static void SetToNull(::contextual_tasks::mojom::ImageContextPtr* output) { output->reset(); }

  static const decltype(::contextual_tasks::mojom::ImageContext::url)& url(
      const ::contextual_tasks::mojom::ImageContextPtr& input) {
    return input->url;
  }

  static const decltype(::contextual_tasks::mojom::ImageContext::title)& title(
      const ::contextual_tasks::mojom::ImageContextPtr& input) {
    return input->title;
  }

  static bool Read(::contextual_tasks::mojom::ImageContext::DataView input, ::contextual_tasks::mojom::ImageContextPtr* output);
};


template <>
struct  StructTraits<::contextual_tasks::mojom::FileContext::DataView,
                                         ::contextual_tasks::mojom::FileContextPtr> {
  static bool IsNull(const ::contextual_tasks::mojom::FileContextPtr& input) { return !input; }
  static void SetToNull(::contextual_tasks::mojom::FileContextPtr* output) { output->reset(); }

  static const decltype(::contextual_tasks::mojom::FileContext::url)& url(
      const ::contextual_tasks::mojom::FileContextPtr& input) {
    return input->url;
  }

  static const decltype(::contextual_tasks::mojom::FileContext::title)& title(
      const ::contextual_tasks::mojom::FileContextPtr& input) {
    return input->title;
  }

  static bool Read(::contextual_tasks::mojom::FileContext::DataView input, ::contextual_tasks::mojom::FileContextPtr* output);
};


template <>
struct  StructTraits<::contextual_tasks::mojom::ComposeboxPosition::DataView,
                                         ::contextual_tasks::mojom::ComposeboxPositionPtr> {
  static bool IsNull(const ::contextual_tasks::mojom::ComposeboxPositionPtr& input) { return !input; }
  static void SetToNull(::contextual_tasks::mojom::ComposeboxPositionPtr* output) { output->reset(); }

  static decltype(::contextual_tasks::mojom::ComposeboxPosition::max_width) max_width(
      const ::contextual_tasks::mojom::ComposeboxPositionPtr& input) {
    return input->max_width;
  }

  static decltype(::contextual_tasks::mojom::ComposeboxPosition::max_height) max_height(
      const ::contextual_tasks::mojom::ComposeboxPositionPtr& input) {
    return input->max_height;
  }

  static decltype(::contextual_tasks::mojom::ComposeboxPosition::margin_bottom) margin_bottom(
      const ::contextual_tasks::mojom::ComposeboxPositionPtr& input) {
    return input->margin_bottom;
  }

  static decltype(::contextual_tasks::mojom::ComposeboxPosition::margin_left) margin_left(
      const ::contextual_tasks::mojom::ComposeboxPositionPtr& input) {
    return input->margin_left;
  }

  static bool Read(::contextual_tasks::mojom::ComposeboxPosition::DataView input, ::contextual_tasks::mojom::ComposeboxPositionPtr* output);
};


template <>
struct  UnionTraits<::contextual_tasks::mojom::ContextInfo::DataView,
                                        ::contextual_tasks::mojom::ContextInfoPtr> {
  static bool IsNull(const ::contextual_tasks::mojom::ContextInfoPtr& input) { return !input; }
  static void SetToNull(::contextual_tasks::mojom::ContextInfoPtr* output) { output->reset(); }

  static ::contextual_tasks::mojom::ContextInfo::Tag GetTag(const ::contextual_tasks::mojom::ContextInfoPtr& input) {
    return input->which();
  }

  static const ::contextual_tasks::mojom::TabContextPtr& tab(const ::contextual_tasks::mojom::ContextInfoPtr& input) {
    return input->get_tab();
  }

  static const ::contextual_tasks::mojom::ImageContextPtr& image(const ::contextual_tasks::mojom::ContextInfoPtr& input) {
    return input->get_image();
  }

  static const ::contextual_tasks::mojom::FileContextPtr& file(const ::contextual_tasks::mojom::ContextInfoPtr& input) {
    return input->get_file();
  }

  static bool Read(::contextual_tasks::mojom::ContextInfo::DataView input, ::contextual_tasks::mojom::ContextInfoPtr* output);
};

}  // namespace mojo

#endif  // CHROME_BROWSER_CONTEXTUAL_TASKS_CONTEXTUAL_TASKS_MOJOM_H_