chromium/out/Default/gen/content/browser/devtools/protocol/preload.cc

// This file is generated by TypeBuilder_cpp.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.

#include "content/browser/devtools/protocol/preload.h"

#include "content/browser/devtools/protocol/protocol.h"

#include "third_party/inspector_protocol/crdtp/cbor.h"
#include "third_party/inspector_protocol/crdtp/find_by_first.h"
#include "third_party/inspector_protocol/crdtp/span.h"

namespace content {
namespace protocol {
namespace Preload {

DeserializerState;
ProtocolTypeTraits;

// ------------- Enum values from types.

const char Metainfo::domainName[] =;
const char Metainfo::commandPrefix[] =;
const char Metainfo::version[] =;

namespace SpeculationActionEnum {
const char Prefetch[] =;
const char Prerender[] =;
} // namespace SpeculationActionEnum


namespace SpeculationTargetHintEnum {
const char Blank[] =;
const char Self[] =;
} // namespace SpeculationTargetHintEnum


CRDTP_BEGIN_DESERIALIZER()

CRDTP_BEGIN_SERIALIZER();


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


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


namespace PrefetchStatusEnum {
const char PrefetchAllowed[] =;
const char PrefetchFailedIneligibleRedirect[] =;
const char PrefetchFailedInvalidRedirect[] =;
const char PrefetchFailedMIMENotSupported[] =;
const char PrefetchFailedNetError[] =;
const char PrefetchFailedNon2XX[] =;
const char PrefetchEvictedAfterCandidateRemoved[] =;
const char PrefetchEvictedForNewerPrefetch[] =;
const char PrefetchHeldback[] =;
const char PrefetchIneligibleRetryAfter[] =;
const char PrefetchIsPrivacyDecoy[] =;
const char PrefetchIsStale[] =;
const char PrefetchNotEligibleBrowserContextOffTheRecord[] =;
const char PrefetchNotEligibleDataSaverEnabled[] =;
const char PrefetchNotEligibleExistingProxy[] =;
const char PrefetchNotEligibleHostIsNonUnique[] =;
const char PrefetchNotEligibleNonDefaultStoragePartition[] =;
const char PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy[] =;
const char PrefetchNotEligibleSchemeIsNotHttps[] =;
const char PrefetchNotEligibleUserHasCookies[] =;
const char PrefetchNotEligibleUserHasServiceWorker[] =;
const char PrefetchNotEligibleBatterySaverEnabled[] =;
const char PrefetchNotEligiblePreloadingDisabled[] =;
const char PrefetchNotFinishedInTime[] =;
const char PrefetchNotStarted[] =;
const char PrefetchNotUsedCookiesChanged[] =;
const char PrefetchProxyNotAvailable[] =;
const char PrefetchResponseUsed[] =;
const char PrefetchSuccessfulButNotUsed[] =;
const char PrefetchNotUsedProbeFailed[] =;
} // namespace PrefetchStatusEnum


CRDTP_BEGIN_DESERIALIZER()

CRDTP_BEGIN_SERIALIZER();


// ------------- Enum values from params.


// ------------- Frontend notifications.

void Frontend::PreloadEnabledStateUpdated(bool disabledByPreference, bool disabledByDataSaver, bool disabledByBatterySaver, bool disabledByHoldbackPrefetchSpeculationRules, bool disabledByHoldbackPrerenderSpeculationRules)
{}

void Frontend::PrefetchStatusUpdated(std::unique_ptr<protocol::Preload::PreloadingAttemptKey> key, const String& initiatingFrameId, const String& prefetchUrl, const String& status, const String& prefetchStatus, const String& requestId)
{}

void Frontend::PrerenderStatusUpdated(std::unique_ptr<protocol::Preload::PreloadingAttemptKey> key, const String& status, Maybe<String> prerenderStatus, Maybe<String> disallowedMojoInterface, Maybe<protocol::Array<protocol::Preload::PrerenderMismatchedHeaders>> mismatchedHeaders)
{}

void Frontend::flush()
{}

void Frontend::sendRawNotification(std::unique_ptr<Serializable> notification)
{}

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

class DomainDispatcherImpl : public protocol::DomainDispatcher {};

namespace {
// This helper method with a static map of command methods (instance methods
// of DomainDispatcherImpl declared just above) by their name is used immediately below,
// in the DomainDispatcherImpl::Dispatch method.
DomainDispatcherImpl::CallHandler CommandByName(crdtp::span<uint8_t> command_name) {}
}  // namespace

std::function<void(const crdtp::Dispatchable&)> DomainDispatcherImpl::Dispatch(crdtp::span<uint8_t> command_name) {}


namespace {


}  // namespace

void DomainDispatcherImpl::enable(const crdtp::Dispatchable& dispatchable)
{}

namespace {


}  // namespace

void DomainDispatcherImpl::disable(const crdtp::Dispatchable& dispatchable)
{}

namespace {
// This helper method (with a static map of redirects) is used from Dispatcher::wire
// immediately below.
const std::vector<std::pair<crdtp::span<uint8_t>, crdtp::span<uint8_t>>>& SortedRedirects() {}
}  // namespace

// static
void Dispatcher::wire(UberDispatcher* uber, Backend* backend)
{}

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