// Copyright 2023 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import type * as Common from '../../../../core/common/common.js'; import * as i18n from '../../../../core/i18n/i18n.js'; import * as Platform from '../../../../core/platform/platform.js'; import {assertNotNullOrUndefined} from '../../../../core/platform/platform.js'; import * as SDK from '../../../../core/sdk/sdk.js'; import * as Protocol from '../../../../generated/protocol.js'; import * as Bindings from '../../../../models/bindings/bindings.js'; const UIStrings = { /** * @description Description text for Prefetch status PrefetchFailedIneligibleRedirect. */ PrefetchFailedIneligibleRedirect: 'The prefetch was redirected, but the redirect URL is not eligible for prefetch.', /** * @description Description text for Prefetch status PrefetchFailedInvalidRedirect. */ PrefetchFailedInvalidRedirect: 'The prefetch was redirected, but there was a problem with the redirect.', /** * @description Description text for Prefetch status PrefetchFailedMIMENotSupported. */ PrefetchFailedMIMENotSupported: 'The prefetch failed because the response\'s Content-Type header was not supported.', /** * @description Description text for Prefetch status PrefetchFailedNetError. */ PrefetchFailedNetError: 'The prefetch failed because of a network error.', /** * @description Description text for Prefetch status PrefetchFailedNon2XX. */ PrefetchFailedNon2XX: 'The prefetch failed because of a non-2xx HTTP response status code.', /** * @description Description text for Prefetch status PrefetchFailedNon2XX when the HTTP status code is known. * @example {404} PH1 */ PrefetchFailedNon2XXWithStatusCode: 'The prefetch failed because of a non-2xx HTTP response status code ({PH1}).', /** * @description Description text for Prefetch status PrefetchIneligibleRetryAfter. */ PrefetchIneligibleRetryAfter: 'A previous prefetch to the origin got a HTTP 503 response with an Retry-After header that has not elapsed yet.', /** * @description Description text for Prefetch status PrefetchIsPrivacyDecoy. */ PrefetchIsPrivacyDecoy: 'The URL was not eligible to be prefetched because there was a registered service worker or cross-site cookies for that origin, but the prefetch was put on the network anyways and not used, to disguise that the user had some kind of previous relationship with the origin.', /** * @description Description text for Prefetch status PrefetchIsStale. */ PrefetchIsStale: 'Too much time elapsed between the prefetch and usage, so the prefetch was discarded.', /** * @description Description text for Prefetch status PrefetchNotEligibleBrowserContextOffTheRecord. */ PrefetchNotEligibleBrowserContextOffTheRecord: 'The prefetch was not performed because the browser is in Incognito or Guest mode.', /** * @description Description text for Prefetch status PrefetchNotEligibleDataSaverEnabled. */ PrefetchNotEligibleDataSaverEnabled: 'The prefetch was not performed because the operating system is in Data Saver mode.', /** * @description Description text for Prefetch status PrefetchNotEligibleExistingProxy. */ PrefetchNotEligibleExistingProxy: 'The URL is not eligible to be prefetched, because in the default network context it is configured to use a proxy server.', /** * @description Description text for Prefetch status PrefetchNotEligibleHostIsNonUnique. */ PrefetchNotEligibleHostIsNonUnique: 'The URL was not eligible to be prefetched because its host was not unique (e.g., a non publicly routable IP address or a hostname which is not registry-controlled), but the prefetch was required to be proxied.', /** * @description Description text for Prefetch status PrefetchNotEligibleNonDefaultStoragePartition. */ PrefetchNotEligibleNonDefaultStoragePartition: 'The URL was not eligible to be prefetched because it uses a non-default storage partition.', /** * @description Description text for Prefetch status PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy. */ PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy: 'The URL was not eligible to be prefetched because the default network context cannot be configured to use the prefetch proxy for a same-site cross-origin prefetch request.', /** * @description Description text for Prefetch status PrefetchNotEligibleSchemeIsNotHttps. */ PrefetchNotEligibleSchemeIsNotHttps: 'The URL was not eligible to be prefetched because its scheme was not https:.', /** * @description Description text for Prefetch status PrefetchNotEligibleUserHasCookies. */ PrefetchNotEligibleUserHasCookies: 'The URL was not eligible to be prefetched because it was cross-site, but the user had cookies for that origin.', /** * @description Description text for Prefetch status PrefetchNotEligibleUserHasServiceWorker. */ PrefetchNotEligibleUserHasServiceWorker: 'The URL was not eligible to be prefetched because there was a registered service worker for that origin, which is currently not supported.', /** * @description Description text for Prefetch status PrefetchNotUsedCookiesChanged. */ PrefetchNotUsedCookiesChanged: 'The prefetch was not used because it was a cross-site prefetch, and cookies were added for that URL while the prefetch was ongoing, so the prefetched response is now out-of-date.', /** * @description Description text for Prefetch status PrefetchProxyNotAvailable. */ PrefetchProxyNotAvailable: 'A network error was encountered when trying to set up a connection to the prefetching proxy.', /** * @description Description text for Prefetch status PrefetchNotUsedProbeFailed. */ PrefetchNotUsedProbeFailed: 'The prefetch was blocked by your Internet Service Provider or network administrator.', /** * @description Description text for Prefetch status PrefetchEvictedForNewerPrefetch. */ PrefetchEvictedForNewerPrefetch: 'The prefetch was discarded because the initiating page has too many prefetches ongoing, and this was one of the oldest.', /** * @description Description text for Prefetch status PrefetchEvictedAfterCandidateRemoved. */ PrefetchEvictedAfterCandidateRemoved: 'The prefetch was discarded because no speculation rule in the initating page triggers a prefetch for this URL anymore.', /** * @description Description text for Prefetch status PrefetchNotEligibleBatterySaverEnabled. */ PrefetchNotEligibleBatterySaverEnabled: 'The prefetch was not performed because the Battery Saver setting was enabled.', /** * @description Description text for Prefetch status PrefetchNotEligiblePreloadingDisabled. */ PrefetchNotEligiblePreloadingDisabled: 'The prefetch was not performed because speculative loading was disabled.', /** * @description Description text for Prefetch status PrefetchEvictedAfterBrowsingDataRemoved. */ PrefetchEvictedAfterBrowsingDataRemoved: 'The prefetch was discarded because browsing data was removed.', /** * Description text for PrerenderFinalStatus::kLowEndDevice. */ prerenderFinalStatusLowEndDevice: 'The prerender was not performed because this device does not have enough total system memory to support prerendering.', /** * Description text for PrerenderFinalStatus::kInvalidSchemeRedirect. */ prerenderFinalStatusInvalidSchemeRedirect: 'The prerendering navigation failed because it redirected to a URL whose scheme was not http: or https:.', /** * Description text for PrerenderFinalStatus::kInvalidSchemeNavigation. */ prerenderFinalStatusInvalidSchemeNavigation: 'The URL was not eligible to be prerendered because its scheme was not http: or https:.', /** * Description text for PrerenderFinalStatus::kNavigationRequestBlockedByCsp. */ prerenderFinalStatusNavigationRequestBlockedByCsp: 'The prerendering navigation was blocked by a Content Security Policy.', /** * @description Description text for PrerenderFinalStatus::kMojoBinderPolicy. * @example {device.mojom.GamepadMonitor} PH1 */ prerenderFinalStatusMojoBinderPolicy: 'The prerendered page used a forbidden JavaScript API that is currently not supported. (Internal Mojo interface: {PH1})', /** * Description text for PrerenderFinalStatus::kRendererProcessCrashed. */ prerenderFinalStatusRendererProcessCrashed: 'The prerendered page crashed.', /** * Description text for PrerenderFinalStatus::kRendererProcessKilled. */ prerenderFinalStatusRendererProcessKilled: 'The prerendered page was killed.', /** * Description text for PrerenderFinalStatus::kDownload. */ prerenderFinalStatusDownload: 'The prerendered page attempted to initiate a download, which is currently not supported.', /** * Description text for PrerenderFinalStatus::kNavigationBadHttpStatus. */ prerenderFinalStatusNavigationBadHttpStatus: 'The prerendering navigation failed because of a non-2xx HTTP response status code.', /** * Description text for PrerenderFinalStatus::kClientCertRequested. */ prerenderFinalStatusClientCertRequested: 'The prerendering navigation required a HTTP client certificate.', /** * Description text for PrerenderFinalStatus::kNavigationRequestNetworkError. */ prerenderFinalStatusNavigationRequestNetworkError: 'The prerendering navigation encountered a network error.', /** * Description text for PrerenderFinalStatus::kSslCertificateError. */ prerenderFinalStatusSslCertificateError: 'The prerendering navigation failed because of an invalid SSL certificate.', /** * Description text for PrerenderFinalStatus::kLoginAuthRequested. */ prerenderFinalStatusLoginAuthRequested: 'The prerendering navigation required HTTP authentication, which is currently not supported.', /** * Description text for PrerenderFinalStatus::kUaChangeRequiresReload. */ prerenderFinalStatusUaChangeRequiresReload: 'Changing User Agent occurred in prerendering navigation.', /** * Description text for PrerenderFinalStatus::kBlockedByClient. */ prerenderFinalStatusBlockedByClient: 'Some resource load was blocked.', /** * Description text for PrerenderFinalStatus::kAudioOutputDeviceRequested. */ prerenderFinalStatusAudioOutputDeviceRequested: 'The prerendered page requested audio output, which is currently not supported.', /** * Description text for PrerenderFinalStatus::kMixedContent. */ prerenderFinalStatusMixedContent: 'The prerendered page contained mixed content.', /** * Description text for PrerenderFinalStatus::kTriggerBackgrounded. */ prerenderFinalStatusTriggerBackgrounded: 'The initiating page was backgrounded, so the prerendered page was discarded.', /** * Description text for PrerenderFinalStatus::kMemoryLimitExceeded. */ prerenderFinalStatusMemoryLimitExceeded: 'The prerender was not performed because the browser exceeded the prerendering memory limit.', /** * Description text for PrerenderFinalStatus::kDataSaverEnabled. */ prerenderFinalStatusDataSaverEnabled: 'The prerender was not performed because the user requested that the browser use less data.', /** * Description text for PrerenderFinalStatus::TriggerUrlHasEffectiveUrl. */ prerenderFinalStatusHasEffectiveUrl: 'The initiating page cannot perform prerendering, because it has an effective URL that is different from its normal URL. (For example, the New Tab Page, or hosted apps.)', /** * Description text for PrerenderFinalStatus::kTimeoutBackgrounded. */ prerenderFinalStatusTimeoutBackgrounded: 'The initiating page was backgrounded for a long time, so the prerendered page was discarded.', /** * Description text for PrerenderFinalStatus::kCrossSiteRedirectInInitialNavigation. */ prerenderFinalStatusCrossSiteRedirectInInitialNavigation: 'The prerendering navigation failed because the prerendered URL redirected to a cross-site URL.', /** * Description text for PrerenderFinalStatus::kCrossSiteNavigationInInitialNavigation. */ prerenderFinalStatusCrossSiteNavigationInInitialNavigation: 'The prerendering navigation failed because it targeted a cross-site URL.', /** * Description text for PrerenderFinalStatus::kSameSiteCrossOriginRedirectNotOptInInInitialNavigation. */ prerenderFinalStatusSameSiteCrossOriginRedirectNotOptInInInitialNavigation: 'The prerendering navigation failed because the prerendered URL redirected to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header.', /** * Description text for PrerenderFinalStatus::kSameSiteCrossOriginNavigationNotOptInInInitialNavigation. */ prerenderFinalStatusSameSiteCrossOriginNavigationNotOptInInInitialNavigation: 'The prerendering navigation failed because it was to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header.', /** * Description text for PrerenderFinalStatus::kActivationNavigationParameterMismatch. */ prerenderFinalStatusActivationNavigationParameterMismatch: 'The prerender was not used because during activation time, different navigation parameters (e.g., HTTP headers) were calculated than during the original prerendering navigation request.', /** * Description text for PrerenderFinalStatus::kPrimaryMainFrameRendererProcessCrashed. */ prerenderFinalStatusPrimaryMainFrameRendererProcessCrashed: 'The initiating page crashed.', /** * Description text for PrerenderFinalStatus::kPrimaryMainFrameRendererProcessKilled. */ prerenderFinalStatusPrimaryMainFrameRendererProcessKilled: 'The initiating page was killed.', /** * Description text for PrerenderFinalStatus::kActivationFramePolicyNotCompatible. */ prerenderFinalStatusActivationFramePolicyNotCompatible: 'The prerender was not used because the sandboxing flags or permissions policy of the initiating page was not compatible with those of the prerendering page.', /** * Description text for PrerenderFinalStatus::kPreloadingDisabled. */ prerenderFinalStatusPreloadingDisabled: 'The prerender was not performed because the user disabled preloading in their browser settings.', /** * Description text for PrerenderFinalStatus::kBatterySaverEnabled. */ prerenderFinalStatusBatterySaverEnabled: 'The prerender was not performed because the user requested that the browser use less battery.', /** * Description text for PrerenderFinalStatus::kActivatedDuringMainFrameNavigation. */ prerenderFinalStatusActivatedDuringMainFrameNavigation: 'Prerendered page activated during initiating page\'s main frame navigation.', /** * Description text for PrerenderFinalStatus::kCrossSiteRedirectInMainFrameNavigation. */ prerenderFinalStatusCrossSiteRedirectInMainFrameNavigation: 'The prerendered page navigated to a URL which redirected to a cross-site URL.', /** * Description text for PrerenderFinalStatus::kCrossSiteNavigationInMainFrameNavigation. */ prerenderFinalStatusCrossSiteNavigationInMainFrameNavigation: 'The prerendered page navigated to a cross-site URL.', /** * Description text for PrerenderFinalStatus::kSameSiteCrossOriginRedirectNotOptInInMainFrameNavigation. */ prerenderFinalStatusSameSiteCrossOriginRedirectNotOptInInMainFrameNavigation: 'The prerendered page navigated to a URL which redirected to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header.', /** * Description text for PrerenderFinalStatus::kSameSiteCrossOriginNavigationNotOptInInMainFrameNavigation. */ prerenderFinalStatusSameSiteCrossOriginNavigationNotOptInInMainFrameNavigation: 'The prerendered page navigated to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header.', /** * Description text for PrerenderFinalStatus::kMemoryPressureOnTrigger. */ prerenderFinalStatusMemoryPressureOnTrigger: 'The prerender was not performed because the browser was under critical memory pressure.', /** * Description text for PrerenderFinalStatus::kMemoryPressureAfterTriggered. */ prerenderFinalStatusMemoryPressureAfterTriggered: 'The prerendered page was unloaded because the browser came under critical memory pressure.', /** * Description text for PrerenderFinalStatus::kPrerenderingDisabledByDevTools. */ prerenderFinalStatusPrerenderingDisabledByDevTools: 'The prerender was not performed because DevTools has been used to disable prerendering.', /** * Description text for PrerenderFinalStatus::kSpeculationRuleRemoved. */ prerenderFinalStatusSpeculationRuleRemoved: 'The prerendered page was unloaded because the initiating page removed the corresponding prerender rule from