// This file is generated by TypeBuilder_h.template.

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef content_protocol_Preload_h
#define content_protocol_Preload_h

#include "content/common/content_export.h"
#include "content/browser/devtools/protocol/protocol.h"
// For each imported domain we generate a ValueConversions struct instead of a full domain definition
// and include Domain::API version from there.

namespace content {
namespace protocol {
namespace Preload {
using SpeculationAction = String;
using SpeculationTargetHint = String;
class PreloadingAttemptKey;
using PreloadPipelineId = String;
using PrerenderFinalStatus = String;
using PreloadingStatus = String;
using PrefetchStatus = String;
class PrerenderMismatchedHeaders;

// ------------- Forward and enum declarations.

namespace SpeculationActionEnum {
inline constexpr char Prefetch[] = "Prefetch";
inline constexpr char Prerender[] = "Prerender";
inline constexpr char PrerenderUntilScript[] = "PrerenderUntilScript";
} // namespace SpeculationActionEnum

namespace SpeculationTargetHintEnum {
inline constexpr char Blank[] = "Blank";
inline constexpr char Self[] = "Self";
} // namespace SpeculationTargetHintEnum

namespace PrerenderFinalStatusEnum {
inline constexpr char Activated[] = "Activated";
inline constexpr char Destroyed[] = "Destroyed";
inline constexpr char LowEndDevice[] = "LowEndDevice";
inline constexpr char InvalidSchemeRedirect[] = "InvalidSchemeRedirect";
inline constexpr char InvalidSchemeNavigation[] = "InvalidSchemeNavigation";
inline constexpr char NavigationRequestBlockedByCsp[] = "NavigationRequestBlockedByCsp";
inline constexpr char MojoBinderPolicy[] = "MojoBinderPolicy";
inline constexpr char RendererProcessCrashed[] = "RendererProcessCrashed";
inline constexpr char RendererProcessKilled[] = "RendererProcessKilled";
inline constexpr char Download[] = "Download";
inline constexpr char TriggerDestroyed[] = "TriggerDestroyed";
inline constexpr char NavigationNotCommitted[] = "NavigationNotCommitted";
inline constexpr char NavigationBadHttpStatus[] = "NavigationBadHttpStatus";
inline constexpr char ClientCertRequested[] = "ClientCertRequested";
inline constexpr char NavigationRequestNetworkError[] = "NavigationRequestNetworkError";
inline constexpr char CancelAllHostsForTesting[] = "CancelAllHostsForTesting";
inline constexpr char DidFailLoad[] = "DidFailLoad";
inline constexpr char Stop[] = "Stop";
inline constexpr char SslCertificateError[] = "SslCertificateError";
inline constexpr char LoginAuthRequested[] = "LoginAuthRequested";
inline constexpr char UaChangeRequiresReload[] = "UaChangeRequiresReload";
inline constexpr char BlockedByClient[] = "BlockedByClient";
inline constexpr char AudioOutputDeviceRequested[] = "AudioOutputDeviceRequested";
inline constexpr char MixedContent[] = "MixedContent";
inline constexpr char TriggerBackgrounded[] = "TriggerBackgrounded";
inline constexpr char MemoryLimitExceeded[] = "MemoryLimitExceeded";
inline constexpr char DataSaverEnabled[] = "DataSaverEnabled";
inline constexpr char TriggerUrlHasEffectiveUrl[] = "TriggerUrlHasEffectiveUrl";
inline constexpr char ActivatedBeforeStarted[] = "ActivatedBeforeStarted";
inline constexpr char InactivePageRestriction[] = "InactivePageRestriction";
inline constexpr char StartFailed[] = "StartFailed";
inline constexpr char TimeoutBackgrounded[] = "TimeoutBackgrounded";
inline constexpr char CrossSiteRedirectInInitialNavigation[] = "CrossSiteRedirectInInitialNavigation";
inline constexpr char CrossSiteNavigationInInitialNavigation[] = "CrossSiteNavigationInInitialNavigation";
inline constexpr char SameSiteCrossOriginRedirectNotOptInInInitialNavigation[] = "SameSiteCrossOriginRedirectNotOptInInInitialNavigation";
inline constexpr char SameSiteCrossOriginNavigationNotOptInInInitialNavigation[] = "SameSiteCrossOriginNavigationNotOptInInInitialNavigation";
inline constexpr char ActivationNavigationParameterMismatch[] = "ActivationNavigationParameterMismatch";
inline constexpr char ActivatedInBackground[] = "ActivatedInBackground";
inline constexpr char EmbedderHostDisallowed[] = "EmbedderHostDisallowed";
inline constexpr char ActivationNavigationDestroyedBeforeSuccess[] = "ActivationNavigationDestroyedBeforeSuccess";
inline constexpr char TabClosedByUserGesture[] = "TabClosedByUserGesture";
inline constexpr char TabClosedWithoutUserGesture[] = "TabClosedWithoutUserGesture";
inline constexpr char PrimaryMainFrameRendererProcessCrashed[] = "PrimaryMainFrameRendererProcessCrashed";
inline constexpr char PrimaryMainFrameRendererProcessKilled[] = "PrimaryMainFrameRendererProcessKilled";
inline constexpr char ActivationFramePolicyNotCompatible[] = "ActivationFramePolicyNotCompatible";
inline constexpr char PreloadingDisabled[] = "PreloadingDisabled";
inline constexpr char BatterySaverEnabled[] = "BatterySaverEnabled";
inline constexpr char ActivatedDuringMainFrameNavigation[] = "ActivatedDuringMainFrameNavigation";
inline constexpr char PreloadingUnsupportedByWebContents[] = "PreloadingUnsupportedByWebContents";
inline constexpr char CrossSiteRedirectInMainFrameNavigation[] = "CrossSiteRedirectInMainFrameNavigation";
inline constexpr char CrossSiteNavigationInMainFrameNavigation[] = "CrossSiteNavigationInMainFrameNavigation";
inline constexpr char SameSiteCrossOriginRedirectNotOptInInMainFrameNavigation[] = "SameSiteCrossOriginRedirectNotOptInInMainFrameNavigation";
inline constexpr char SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation[] = "SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation";
inline constexpr char MemoryPressureOnTrigger[] = "MemoryPressureOnTrigger";
inline constexpr char MemoryPressureAfterTriggered[] = "MemoryPressureAfterTriggered";
inline constexpr char PrerenderingDisabledByDevTools[] = "PrerenderingDisabledByDevTools";
inline constexpr char SpeculationRuleRemoved[] = "SpeculationRuleRemoved";
inline constexpr char ActivatedWithAuxiliaryBrowsingContexts[] = "ActivatedWithAuxiliaryBrowsingContexts";
inline constexpr char MaxNumOfRunningEagerPrerendersExceeded[] = "MaxNumOfRunningEagerPrerendersExceeded";
inline constexpr char MaxNumOfRunningNonEagerPrerendersExceeded[] = "MaxNumOfRunningNonEagerPrerendersExceeded";
inline constexpr char MaxNumOfRunningEmbedderPrerendersExceeded[] = "MaxNumOfRunningEmbedderPrerendersExceeded";
inline constexpr char PrerenderingUrlHasEffectiveUrl[] = "PrerenderingUrlHasEffectiveUrl";
inline constexpr char RedirectedPrerenderingUrlHasEffectiveUrl[] = "RedirectedPrerenderingUrlHasEffectiveUrl";
inline constexpr char ActivationUrlHasEffectiveUrl[] = "ActivationUrlHasEffectiveUrl";
inline constexpr char JavaScriptInterfaceAdded[] = "JavaScriptInterfaceAdded";
inline constexpr char JavaScriptInterfaceRemoved[] = "JavaScriptInterfaceRemoved";
inline constexpr char AllPrerenderingCanceled[] = "AllPrerenderingCanceled";
inline constexpr char WindowClosed[] = "WindowClosed";
inline constexpr char SlowNetwork[] = "SlowNetwork";
inline constexpr char OtherPrerenderedPageActivated[] = "OtherPrerenderedPageActivated";
inline constexpr char V8OptimizerDisabled[] = "V8OptimizerDisabled";
inline constexpr char PrerenderFailedDuringPrefetch[] = "PrerenderFailedDuringPrefetch";
inline constexpr char BrowsingDataRemoved[] = "BrowsingDataRemoved";
inline constexpr char PrerenderHostReused[] = "PrerenderHostReused";
inline constexpr char FormSubmitWhenPrerendering[] = "FormSubmitWhenPrerendering";
inline constexpr char CrossDocumentRestart[] = "CrossDocumentRestart";
} // namespace PrerenderFinalStatusEnum

namespace PreloadingStatusEnum {
inline constexpr char Pending[] = "Pending";
inline constexpr char Running[] = "Running";
inline constexpr char Ready[] = "Ready";
inline constexpr char Success[] = "Success";
inline constexpr char Failure[] = "Failure";
inline constexpr char NotSupported[] = "NotSupported";
} // namespace PreloadingStatusEnum

namespace PrefetchStatusEnum {
inline constexpr char PrefetchAllowed[] = "PrefetchAllowed";
inline constexpr char PrefetchFailedIneligibleRedirect[] = "PrefetchFailedIneligibleRedirect";
inline constexpr char PrefetchFailedInvalidRedirect[] = "PrefetchFailedInvalidRedirect";
inline constexpr char PrefetchFailedMIMENotSupported[] = "PrefetchFailedMIMENotSupported";
inline constexpr char PrefetchFailedNetError[] = "PrefetchFailedNetError";
inline constexpr char PrefetchFailedNon2XX[] = "PrefetchFailedNon2XX";
inline constexpr char PrefetchEvictedAfterBrowsingDataRemoved[] = "PrefetchEvictedAfterBrowsingDataRemoved";
inline constexpr char PrefetchEvictedAfterCandidateRemoved[] = "PrefetchEvictedAfterCandidateRemoved";
inline constexpr char PrefetchEvictedForNewerPrefetch[] = "PrefetchEvictedForNewerPrefetch";
inline constexpr char PrefetchHeldback[] = "PrefetchHeldback";
inline constexpr char PrefetchIneligibleRetryAfter[] = "PrefetchIneligibleRetryAfter";
inline constexpr char PrefetchIsPrivacyDecoy[] = "PrefetchIsPrivacyDecoy";
inline constexpr char PrefetchIsStale[] = "PrefetchIsStale";
inline constexpr char PrefetchNotEligibleBlockedByConnectionAllowlist[] = "PrefetchNotEligibleBlockedByConnectionAllowlist";
inline constexpr char PrefetchNotEligibleBrowserContextOffTheRecord[] = "PrefetchNotEligibleBrowserContextOffTheRecord";
inline constexpr char PrefetchNotEligibleCrossOrigin[] = "PrefetchNotEligibleCrossOrigin";
inline constexpr char PrefetchNotEligibleDataSaverEnabled[] = "PrefetchNotEligibleDataSaverEnabled";
inline constexpr char PrefetchNotEligibleExistingProxy[] = "PrefetchNotEligibleExistingProxy";
inline constexpr char PrefetchNotEligibleHostIsNonUnique[] = "PrefetchNotEligibleHostIsNonUnique";
inline constexpr char PrefetchNotEligibleNonDefaultStoragePartition[] = "PrefetchNotEligibleNonDefaultStoragePartition";
inline constexpr char PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy[] = "PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy";
inline constexpr char PrefetchNotEligibleSchemeIsNotHttps[] = "PrefetchNotEligibleSchemeIsNotHttps";
inline constexpr char PrefetchNotEligibleUserHasCookies[] = "PrefetchNotEligibleUserHasCookies";
inline constexpr char PrefetchNotEligibleUserHasServiceWorker[] = "PrefetchNotEligibleUserHasServiceWorker";
inline constexpr char PrefetchNotEligibleUserHasServiceWorkerNoFetchHandler[] = "PrefetchNotEligibleUserHasServiceWorkerNoFetchHandler";
inline constexpr char PrefetchNotEligibleRedirectFromServiceWorker[] = "PrefetchNotEligibleRedirectFromServiceWorker";
inline constexpr char PrefetchNotEligibleRedirectToServiceWorker[] = "PrefetchNotEligibleRedirectToServiceWorker";
inline constexpr char PrefetchNotEligibleBatterySaverEnabled[] = "PrefetchNotEligibleBatterySaverEnabled";
inline constexpr char PrefetchNotEligiblePreloadingDisabled[] = "PrefetchNotEligiblePreloadingDisabled";
inline constexpr char PrefetchNotFinishedInTime[] = "PrefetchNotFinishedInTime";
inline constexpr char PrefetchNotStarted[] = "PrefetchNotStarted";
inline constexpr char PrefetchNotUsedCookiesChanged[] = "PrefetchNotUsedCookiesChanged";
inline constexpr char PrefetchProxyNotAvailable[] = "PrefetchProxyNotAvailable";
inline constexpr char PrefetchResponseUsed[] = "PrefetchResponseUsed";
inline constexpr char PrefetchSuccessfulButNotUsed[] = "PrefetchSuccessfulButNotUsed";
inline constexpr char PrefetchNotUsedProbeFailed[] = "PrefetchNotUsedProbeFailed";
inline constexpr char PrefetchCancelledOnUserNavigation[] = "PrefetchCancelledOnUserNavigation";
} // namespace PrefetchStatusEnum

// ------------- Type and builder declarations.

class CONTENT_EXPORT PreloadingAttemptKey : public ::crdtp::ProtocolObject<PreloadingAttemptKey> {
public:
    ~PreloadingAttemptKey() override;  // Defined below

    String GetLoaderId() { return m_loaderId; }
    void SetLoaderId(const String& value);  // Defined below

    String GetAction() { return m_action; }
    void SetAction(const String& value);  // Defined below

    String GetUrl() { return m_url; }
    void SetUrl(const String& value);  // Defined below

    bool HasFormSubmission() { return !!m_formSubmission; }
    bool GetFormSubmission(bool defaultValue) const {
       return m_formSubmission.value_or(defaultValue);
    }
    const std::optional<bool>& GetFormSubmission() const {
       return m_formSubmission;
    }
    void SetFormSubmission(bool value);  // Defined below

    bool HasTargetHint() { return !!m_targetHint; }
    String GetTargetHint(const String& defaultValue) const {
       return m_targetHint.value_or(defaultValue);
    }
    const std::optional<String>& GetTargetHint() const {
       return m_targetHint;
    }
    void SetTargetHint(const String& value);  // Defined below

    template<int STATE>
    class PreloadingAttemptKeyBuilder {
    public:
        enum {
            NoFieldsSet = 0,
            LoaderIdSet = 1 << 1,
            ActionSet = 1 << 2,
            UrlSet = 1 << 3,
            AllFieldsSet = (LoaderIdSet | ActionSet | UrlSet | 0)};


        PreloadingAttemptKeyBuilder<STATE | LoaderIdSet>& SetLoaderId(const String& value);  // Defined below

        PreloadingAttemptKeyBuilder<STATE | ActionSet>& SetAction(const String& value);  // Defined below

        PreloadingAttemptKeyBuilder<STATE | UrlSet>& SetUrl(const String& value);  // Defined below

        PreloadingAttemptKeyBuilder<STATE>& SetFormSubmission(bool value);  // Defined below

        PreloadingAttemptKeyBuilder<STATE>& SetTargetHint(const String& value);  // Defined below

        std::unique_ptr<PreloadingAttemptKey> Build()
        {
            static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
            return std::move(m_result);
        }

    private:
        friend class PreloadingAttemptKey;
        PreloadingAttemptKeyBuilder() : m_result(new PreloadingAttemptKey()) { }

        template<int STEP> PreloadingAttemptKeyBuilder<STATE | STEP>& castState()
        {
            return *reinterpret_cast<PreloadingAttemptKeyBuilder<STATE | STEP>*>(this);
        }

        std::unique_ptr<protocol::Preload::PreloadingAttemptKey> m_result;
    };

    static PreloadingAttemptKeyBuilder<0> Create()
    {
        return PreloadingAttemptKeyBuilder<0>();
    }

private:
    DECLARE_SERIALIZATION_SUPPORT();

    PreloadingAttemptKey();  // Defined below

    String m_loaderId;
    String m_action;
    String m_url;
    std::optional<bool> m_formSubmission;
    std::optional<String> m_targetHint;
};


class CONTENT_EXPORT PrerenderMismatchedHeaders : public ::crdtp::ProtocolObject<PrerenderMismatchedHeaders> {
public:
    ~PrerenderMismatchedHeaders() override;  // Defined below

    String GetHeaderName() { return m_headerName; }
    void SetHeaderName(const String& value);  // Defined below

    bool HasInitialValue() { return !!m_initialValue; }
    String GetInitialValue(const String& defaultValue) const {
       return m_initialValue.value_or(defaultValue);
    }
    const std::optional<String>& GetInitialValue() const {
       return m_initialValue;
    }
    void SetInitialValue(const String& value);  // Defined below

    bool HasActivationValue() { return !!m_activationValue; }
    String GetActivationValue(const String& defaultValue) const {
       return m_activationValue.value_or(defaultValue);
    }
    const std::optional<String>& GetActivationValue() const {
       return m_activationValue;
    }
    void SetActivationValue(const String& value);  // Defined below

    template<int STATE>
    class PrerenderMismatchedHeadersBuilder {
    public:
        enum {
            NoFieldsSet = 0,
            HeaderNameSet = 1 << 1,
            AllFieldsSet = (HeaderNameSet | 0)};


        PrerenderMismatchedHeadersBuilder<STATE | HeaderNameSet>& SetHeaderName(const String& value);  // Defined below

        PrerenderMismatchedHeadersBuilder<STATE>& SetInitialValue(const String& value);  // Defined below

        PrerenderMismatchedHeadersBuilder<STATE>& SetActivationValue(const String& value);  // Defined below

        std::unique_ptr<PrerenderMismatchedHeaders> Build()
        {
            static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
            return std::move(m_result);
        }

    private:
        friend class PrerenderMismatchedHeaders;
        PrerenderMismatchedHeadersBuilder() : m_result(new PrerenderMismatchedHeaders()) { }

        template<int STEP> PrerenderMismatchedHeadersBuilder<STATE | STEP>& castState()
        {
            return *reinterpret_cast<PrerenderMismatchedHeadersBuilder<STATE | STEP>*>(this);
        }

        std::unique_ptr<protocol::Preload::PrerenderMismatchedHeaders> m_result;
    };

    static PrerenderMismatchedHeadersBuilder<0> Create()
    {
        return PrerenderMismatchedHeadersBuilder<0>();
    }

private:
    DECLARE_SERIALIZATION_SUPPORT();

    PrerenderMismatchedHeaders();  // Defined below

    String m_headerName;
    std::optional<String> m_initialValue;
    std::optional<String> m_activationValue;
};


// ------------- Type and builder method definitions.
//
// These methods separate from the type declaration because of
// https://github.com/llvm/llvm-project/issues/59966. The DevTools protocol has
// mutually recursive types, so we cannot simply reorder the types.
inline PreloadingAttemptKey::~PreloadingAttemptKey() = default;
inline void PreloadingAttemptKey::SetLoaderId(const String& value) { m_loaderId = value; }
inline void PreloadingAttemptKey::SetAction(const String& value) { m_action = value; }
inline void PreloadingAttemptKey::SetUrl(const String& value) { m_url = value; }
inline void PreloadingAttemptKey::SetFormSubmission(bool value) { m_formSubmission = value; }
inline void PreloadingAttemptKey::SetTargetHint(const String& value) { m_targetHint = value; }

template<int STATE>
inline PreloadingAttemptKey::PreloadingAttemptKeyBuilder<STATE | PreloadingAttemptKey::PreloadingAttemptKeyBuilder<STATE>::LoaderIdSet>&
PreloadingAttemptKey::PreloadingAttemptKeyBuilder<STATE>::SetLoaderId(const String& value) {
  static_assert(!(STATE & LoaderIdSet), "property loaderId should not be set yet");
  m_result->SetLoaderId(value);
  return castState<LoaderIdSet>();
}
template<int STATE>
inline PreloadingAttemptKey::PreloadingAttemptKeyBuilder<STATE | PreloadingAttemptKey::PreloadingAttemptKeyBuilder<STATE>::ActionSet>&
PreloadingAttemptKey::PreloadingAttemptKeyBuilder<STATE>::SetAction(const String& value) {
  static_assert(!(STATE & ActionSet), "property action should not be set yet");
  m_result->SetAction(value);
  return castState<ActionSet>();
}
template<int STATE>
inline PreloadingAttemptKey::PreloadingAttemptKeyBuilder<STATE | PreloadingAttemptKey::PreloadingAttemptKeyBuilder<STATE>::UrlSet>&
PreloadingAttemptKey::PreloadingAttemptKeyBuilder<STATE>::SetUrl(const String& value) {
  static_assert(!(STATE & UrlSet), "property url should not be set yet");
  m_result->SetUrl(value);
  return castState<UrlSet>();
}
template<int STATE>
inline PreloadingAttemptKey::PreloadingAttemptKeyBuilder<STATE>& PreloadingAttemptKey::PreloadingAttemptKeyBuilder<STATE>::SetFormSubmission(bool value) {
  m_result->SetFormSubmission(value);
  return *this;
}
template<int STATE>
inline PreloadingAttemptKey::PreloadingAttemptKeyBuilder<STATE>& PreloadingAttemptKey::PreloadingAttemptKeyBuilder<STATE>::SetTargetHint(const String& value) {
  m_result->SetTargetHint(value);
  return *this;
}

inline PreloadingAttemptKey::PreloadingAttemptKey() {
}
inline PrerenderMismatchedHeaders::~PrerenderMismatchedHeaders() = default;
inline void PrerenderMismatchedHeaders::SetHeaderName(const String& value) { m_headerName = value; }
inline void PrerenderMismatchedHeaders::SetInitialValue(const String& value) { m_initialValue = value; }
inline void PrerenderMismatchedHeaders::SetActivationValue(const String& value) { m_activationValue = value; }

template<int STATE>
inline PrerenderMismatchedHeaders::PrerenderMismatchedHeadersBuilder<STATE | PrerenderMismatchedHeaders::PrerenderMismatchedHeadersBuilder<STATE>::HeaderNameSet>&
PrerenderMismatchedHeaders::PrerenderMismatchedHeadersBuilder<STATE>::SetHeaderName(const String& value) {
  static_assert(!(STATE & HeaderNameSet), "property headerName should not be set yet");
  m_result->SetHeaderName(value);
  return castState<HeaderNameSet>();
}
template<int STATE>
inline PrerenderMismatchedHeaders::PrerenderMismatchedHeadersBuilder<STATE>& PrerenderMismatchedHeaders::PrerenderMismatchedHeadersBuilder<STATE>::SetInitialValue(const String& value) {
  m_result->SetInitialValue(value);
  return *this;
}
template<int STATE>
inline PrerenderMismatchedHeaders::PrerenderMismatchedHeadersBuilder<STATE>& PrerenderMismatchedHeaders::PrerenderMismatchedHeadersBuilder<STATE>::SetActivationValue(const String& value) {
  m_result->SetActivationValue(value);
  return *this;
}

inline PrerenderMismatchedHeaders::PrerenderMismatchedHeaders() {
}

// ------------- Backend interface.

class CONTENT_EXPORT Backend {
public:
    virtual ~Backend() { }

    virtual DispatchResponse Enable() = 0;
    virtual DispatchResponse Disable() = 0;

};

// ------------- Frontend interface.

class CONTENT_EXPORT Frontend {
public:
  explicit Frontend(FrontendChannel* frontend_channel) : frontend_channel_(frontend_channel) {}
    void PreloadEnabledStateUpdated(bool disabledByPreference, bool disabledByDataSaver, bool disabledByBatterySaver, bool disabledByHoldbackPrefetchSpeculationRules, bool disabledByHoldbackPrerenderSpeculationRules);
    void PrefetchStatusUpdated(std::unique_ptr<protocol::Preload::PreloadingAttemptKey> key, const String& pipelineId, const String& initiatingFrameId, const String& prefetchUrl, const String& status, const String& prefetchStatus, const String& requestId);
    void PrerenderStatusUpdated(std::unique_ptr<protocol::Preload::PreloadingAttemptKey> key, const String& pipelineId, const String& status, std::optional<String> prerenderStatus = {}, std::optional<String> disallowedMojoInterface = {}, std::unique_ptr<protocol::Array<protocol::Preload::PrerenderMismatchedHeaders>> mismatchedHeaders = {});

  void flush();
  void sendRawNotification(std::unique_ptr<Serializable>);
 private:
  FrontendChannel* frontend_channel_;
};

// ------------- Dispatcher.

class CONTENT_EXPORT Dispatcher {
public:
    static void wire(UberDispatcher*, Backend*);

private:
    Dispatcher() { }
};

// ------------- Metainfo.

class CONTENT_EXPORT Metainfo {
public:
    using BackendClass = Backend;
    using FrontendClass = Frontend;
    using DispatcherClass = Dispatcher;
    static const char domainName[];
    static const char commandPrefix[];
    static const char version[];
};

} // namespace Preload
} // namespace content
} // namespace protocol

#endif // !defined(content_protocol_Preload_h)
