# Copyright (C) 2012-2020 Apple Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. messages -> NetworkProcess LegacyReceiver { InitializeNetworkProcess(struct WebKit::NetworkProcessCreationParameters processCreationParameters) -> () CreateNetworkConnectionToWebProcess(WebCore::ProcessIdentifier processIdentifier, PAL::SessionID sessionID) -> (std::optional connectionIdentifier, enum:uint8_t WebCore::HTTPCookieAcceptPolicy cookieAcceptPolicy) #if USE(SOUP) SetIgnoreTLSErrors(PAL::SessionID sessionID, bool ignoreTLSErrors) UserPreferredLanguagesChanged(Vector languages) SetNetworkProxySettings(PAL::SessionID sessionID, struct WebCore::SoupNetworkProxySettings settings) PrefetchDNS(String hostname) SetPersistentCredentialStorageEnabled(PAL::SessionID sessionID, bool enabled) #endif #if USE(CURL) SetNetworkProxySettings(PAL::SessionID sessionID, WebCore::CurlProxySettings settings) #endif ClearCachedCredentials(PAL::SessionID sessionID) AddWebsiteDataStore(struct WebKit::WebsiteDataStoreParameters websiteDataStoreParameters); DestroySession(PAL::SessionID sessionID) FetchWebsiteData(PAL::SessionID sessionID, OptionSet websiteDataTypes, OptionSet fetchOptions) -> (struct WebKit::WebsiteData websiteData) DeleteWebsiteData(PAL::SessionID sessionID, OptionSet websiteDataTypes, WallTime modifiedSince) -> () DeleteWebsiteDataForOrigins(PAL::SessionID sessionID, OptionSet websiteDataTypes, Vector origins, Vector cookieHostNames, Vector HSTSCacheHostNames, Vector registrableDomains) -> () RenameOriginInWebsiteData(PAL::SessionID sessionID, URL oldDomain, URL newDomain, OptionSet websiteDataTypes) -> () WebsiteDataOriginDirectoryForTesting(PAL::SessionID sessionID, URL origin, URL topOrigin, enum:uint32_t WebKit::WebsiteDataType websiteDataType) -> (String directory) DownloadRequest(PAL::SessionID sessionID, WebKit::DownloadID downloadID, WebCore::ResourceRequest request, enum:bool std::optional isNavigatingToAppBoundDomain, String suggestedFilename) ResumeDownload(PAL::SessionID sessionID, WebKit::DownloadID downloadID, IPC::DataReference resumeData, String path, WebKit::SandboxExtension::Handle sandboxExtensionHandle, enum:bool WebKit::CallDownloadDidStart callDownloadDidStart) CancelDownload(WebKit::DownloadID downloadID) -> (IPC::DataReference resumeData) #if PLATFORM(COCOA) PublishDownloadProgress(WebKit::DownloadID downloadID, URL url, WebKit::SandboxExtension::Handle sandboxExtensionHandle) #endif DataTaskWithRequest(WebKit::WebPageProxyIdentifier pageID, PAL::SessionID sessionID, WebCore::ResourceRequest request, IPC::FormDataReference requestBody) -> (WebKit::DataTaskIdentifier taskIdentifier) CancelDataTask(WebKit::DataTaskIdentifier taskIdentifier, PAL::SessionID sessionID) ApplicationDidEnterBackground() ApplicationWillEnterForeground() ContinueWillSendRequest(WebKit::DownloadID downloadID, WebCore::ResourceRequest request) SetAllowsAnySSLCertificateForWebSocket(bool enabled) -> () Synchronous FlushCookies(PAL::SessionID sessionID) -> () AllowSpecificHTTPSCertificateForHost(WebCore::CertificateInfo certificate, String host) AllowTLSCertificateChainForLocalPCMTesting(PAL::SessionID sessionID, WebCore::CertificateInfo certificate) SetCacheModel(enum:uint8_t WebKit::CacheModel cacheModel) SetCacheModelSynchronouslyForTesting(enum:uint8_t WebKit::CacheModel cacheModel) -> () Synchronous ProcessWillSuspendImminentlyForTestingSync() -> () Synchronous PrepareToSuspend(bool isSuspensionImminent, MonotonicTime estimatedSuspendTime) -> () ProcessDidResume(bool forForegroundActivity) PreconnectTo(PAL::SessionID sessionID, WebKit::WebPageProxyIdentifier webPageProxyID, WebCore::PageIdentifier webPageID, URL url, String userAgent, enum:uint8_t WebCore::StoredCredentialsPolicy storedCredentialsPolicy, enum:bool std::optional isNavigatingToAppBoundDomain, enum:bool WebKit::LastNavigationWasAppInitiated lastNavigationWasAppInitiated); #if ENABLE(INTELLIGENT_TRACKING_PREVENTION) ClearPrevalentResource(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> () ClearUserInteraction(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> () DumpResourceLoadStatistics(PAL::SessionID sessionID) -> (String dumpedStatistics) SetResourceLoadStatisticsEnabled(PAL::SessionID sessionID, bool enabled) SetResourceLoadStatisticsLogTestingEvent(bool enabled) UpdatePrevalentDomainsToBlockCookiesFor(PAL::SessionID sessionID, Vector domainsToBlock) -> () IsGrandfathered(PAL::SessionID sessionID, WebCore::RegistrableDomain targetDomain) -> (bool isGrandfathered) IsPrevalentResource(PAL::SessionID sessionID, WebCore::RegistrableDomain targetDomain) -> (bool isPrevalent) IsVeryPrevalentResource(PAL::SessionID sessionID, WebCore::RegistrableDomain targetDomain) -> (bool isVeryPrevalent) SetLastSeen(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain, Seconds seconds) -> () MergeStatisticForTesting(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain, WebCore::RegistrableDomain topFrameDomain1, WebCore::RegistrableDomain topFrameDomain2, Seconds lastSeen, bool hadUserInteraction, Seconds mostRecentUserInteraction, bool isGrandfathered, bool isPrevalent, bool isVeryPrevalent, uint64_t dataRecordsRemoved) -> () InsertExpiredStatisticForTesting(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain, uint64_t numberOfOperatingDaysPassed, bool hadUserInteraction, bool isScheduledForAllButCookieDataRemoval, bool isPrevalent) -> () SetPrevalentResource(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> () SetPrevalentResourceForDebugMode(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> () IsResourceLoadStatisticsEphemeral(PAL::SessionID sessionID) -> (bool isEphemeral) HadUserInteraction(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> (bool hadUserInteraction) IsRelationshipOnlyInDatabaseOnce(PAL::SessionID sessionID, WebCore::RegistrableDomain subDomain, WebCore::RegistrableDomain topDomain) -> (bool hadUserInteraction) HasLocalStorage(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> (bool hadUserInteraction) GetAllStorageAccessEntries(PAL::SessionID sessionID) -> (Vector domains) IsRegisteredAsRedirectingTo(PAL::SessionID sessionID, WebCore::RegistrableDomain redirectedFromDomain, WebCore::RegistrableDomain redirectedToDomain) -> (bool isRedirectingTo) IsRegisteredAsSubFrameUnder(PAL::SessionID sessionID, WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain) -> (bool isSubframeUnder) IsRegisteredAsSubresourceUnder(PAL::SessionID sessionID, WebCore::RegistrableDomain subresourceDomain, WebCore::RegistrableDomain topFrameDomain) -> (bool isSubresourceUnder) DomainIDExistsInDatabase(PAL::SessionID sessionID, int domainID) -> (bool exists) LogFrameNavigation(PAL::SessionID sessionID, WebCore::RegistrableDomain targetDomain, WebCore::RegistrableDomain topFrameDomain, WebCore::RegistrableDomain sourceDomain, bool isRedirect, bool isMainFrame, Seconds delayAfterMainFrameDocumentLoad, bool wasPotentiallyInitiatedByUser) LogUserInteraction(PAL::SessionID sessionID, WebCore::RegistrableDomain topFrameDomain) -> () ResetParametersToDefaultValues(PAL::SessionID sessionID) -> () ScheduleClearInMemoryAndPersistent(PAL::SessionID sessionID, std::optional modifiedSince, enum:bool WebKit::ShouldGrandfatherStatistics shouldGrandfather) -> () ScheduleCookieBlockingUpdate(PAL::SessionID sessionID) -> () ScheduleStatisticsAndDataRecordsProcessing(PAL::SessionID sessionID) -> () StatisticsDatabaseHasAllTables(PAL::SessionID sessionID) -> (bool hasAllTables) SetCacheMaxAgeCapForPrevalentResources(PAL::SessionID sessionID, Seconds seconds) -> () SetGrandfathered(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain, bool isGrandfathered) -> () GetResourceLoadStatisticsDataSummary(PAL::SessionID sessionID) -> (Vector thirdPartyData) SetGrandfatheringTime(PAL::SessionID sessionID, Seconds seconds) -> () SetMaxStatisticsEntries(PAL::SessionID sessionID, uint64_t maximumEntryCount) -> () SetMinimumTimeBetweenDataRecordsRemoval(PAL::SessionID sessionID, Seconds seconds) -> () SetPruneEntriesDownTo(PAL::SessionID sessionID, uint64_t maximumEntryCount) -> () SetShouldClassifyResourcesBeforeDataRecordsRemoval(PAL::SessionID sessionID, bool value) -> () SetNotifyPagesWhenDataRecordsWereScanned(PAL::SessionID sessionID, bool value) -> () SetIsRunningResourceLoadStatisticsTest(PAL::SessionID sessionID, bool value) -> () SetResourceLoadStatisticsDebugMode(PAL::SessionID sessionID, bool debugMode) -> () SetVeryPrevalentResource(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> () SetSubframeUnderTopFrameDomain(PAL::SessionID sessionID, WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain) -> () SetSubresourceUnderTopFrameDomain(PAL::SessionID sessionID, WebCore::RegistrableDomain subresourceDomain, WebCore::RegistrableDomain topFrameDomain) -> () SetSubresourceUniqueRedirectTo(PAL::SessionID sessionID, WebCore::RegistrableDomain subresourceDomain, WebCore::RegistrableDomain redirectedToDomain) -> () SetSubresourceUniqueRedirectFrom(PAL::SessionID sessionID, WebCore::RegistrableDomain subresourceDomain, WebCore::RegistrableDomain redirectedFromDomain) -> () SetTimeToLiveUserInteraction(PAL::SessionID sessionID, Seconds seconds) -> () SetTopFrameUniqueRedirectTo(PAL::SessionID sessionID, WebCore::RegistrableDomain topFrameDomain, WebCore::RegistrableDomain redirectedToDomain) -> () SetTopFrameUniqueRedirectFrom(PAL::SessionID sessionID, WebCore::RegistrableDomain topFrameDomain, WebCore::RegistrableDomain redirectedFromDomain) -> () ResetCacheMaxAgeCapForPrevalentResources(PAL::SessionID sessionID) -> () DidCommitCrossSiteLoadWithDataTransfer(PAL::SessionID sessionID, WebCore::RegistrableDomain fromDomain, WebCore::RegistrableDomain toDomain, OptionSet navigationDataTransfer, WebKit::WebPageProxyIdentifier webPageProxyID, WebCore::PageIdentifier webPageID) SetCrossSiteLoadWithLinkDecorationForTesting(PAL::SessionID sessionID, WebCore::RegistrableDomain fromDomain, WebCore::RegistrableDomain toDomain) -> () ResetCrossSiteLoadsWithLinkDecorationForTesting(PAL::SessionID sessionID) -> () DeleteCookiesForTesting(PAL::SessionID sessionID, WebCore::RegistrableDomain domain, bool includeHttpOnlyCookies) -> () HasIsolatedSession(PAL::SessionID sessionID, WebCore::RegistrableDomain domain) -> (bool hasIsolatedSession) CloseITPDatabase(PAL::SessionID sessionID) -> () #if ENABLE(APP_BOUND_DOMAINS) SetAppBoundDomainsForResourceLoadStatistics(PAL::SessionID sessionID, HashSet appBoundDomains) -> () #endif SetShouldDowngradeReferrerForTesting(bool enabled) -> () SetThirdPartyCookieBlockingMode(PAL::SessionID sessionID, enum:uint8_t WebCore::ThirdPartyCookieBlockingMode blockingMode) -> () SetShouldEnbleSameSiteStrictEnforcementForTesting(PAL::SessionID sessionID, enum:bool WebCore::SameSiteStrictEnforcementEnabled enabled) -> () SetFirstPartyWebsiteDataRemovalModeForTesting(PAL::SessionID sessionID, enum:uint8_t WebCore::FirstPartyWebsiteDataRemovalMode mode) -> () SetToSameSiteStrictCookiesForTesting(PAL::SessionID sessionID, WebCore::RegistrableDomain domain) -> () SetFirstPartyHostCNAMEDomainForTesting(PAL::SessionID sessionID, String firstPartyHost, WebCore::RegistrableDomain cnameDomain) -> () SetThirdPartyCNAMEDomainForTesting(PAL::SessionID sessionID, WebCore::RegistrableDomain domain) -> () #endif SetPrivateClickMeasurementDebugMode(PAL::SessionID sessionID, bool debugMode) SetSessionIsControlledByAutomation(PAL::SessionID sessionID, bool controlled); RegisterURLSchemeAsSecure(String scheme) RegisterURLSchemeAsBypassingContentSecurityPolicy(String scheme) RegisterURLSchemeAsLocal(String scheme) RegisterURLSchemeAsNoAccess(String scheme) SyncLocalStorage() -> () StorePrivateClickMeasurement(PAL::SessionID sessionID, WebCore::PrivateClickMeasurement privateClickMeasurement) DumpPrivateClickMeasurement(PAL::SessionID sessionID) -> (String privateClickMeasurementState) ClearPrivateClickMeasurement(PAL::SessionID sessionID) -> () SetPrivateClickMeasurementOverrideTimerForTesting(PAL::SessionID sessionID, bool value) -> () MarkAttributedPrivateClickMeasurementsAsExpiredForTesting(PAL::SessionID sessionID) -> () SetPrivateClickMeasurementEphemeralMeasurementForTesting(PAL::SessionID sessionID, bool value) -> () SimulatePrivateClickMeasurementSessionRestart(PAL::SessionID sessionID) -> () SetPrivateClickMeasurementTokenPublicKeyURLForTesting(PAL::SessionID sessionID, URL url) -> () SetPrivateClickMeasurementTokenSignatureURLForTesting(PAL::SessionID sessionID, URL url) -> () SetPrivateClickMeasurementAttributionReportURLsForTesting(PAL::SessionID sessionID, URL sourceURL, URL destinationURL) -> () MarkPrivateClickMeasurementsAsExpiredForTesting(PAL::SessionID sessionID) -> () SetPCMFraudPreventionValuesForTesting(PAL::SessionID sessionID, String secretToken, String unlinkableToken, String signature, String keyID) -> () SetPrivateClickMeasurementAppBundleIDForTesting(PAL::SessionID sessionID, String appBundleIDForTesting) -> () ClosePCMDatabase(PAL::SessionID sessionID) -> () SetServiceWorkerFetchTimeoutForTesting(Seconds seconds) -> () Synchronous ResetServiceWorkerFetchTimeoutForTesting() -> () Synchronous ResetQuota(PAL::SessionID sessionID) -> () ClearStorage(PAL::SessionID sessionID) -> () DidIncreaseQuota(PAL::SessionID sessionID, struct WebCore::ClientOrigin origin, WebKit::QuotaIncreaseRequestIdentifier identifier, std::optional newQuota) #if ENABLE(APP_BOUND_DOMAINS) HasAppBoundSession(PAL::SessionID sessionID) -> (bool hasAppBoundSession) ClearAppBoundSession(PAL::SessionID sessionID) -> () #endif #if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST) DisableServiceWorkerEntitlement() ClearServiceWorkerEntitlementOverride() -> () #endif UpdateBundleIdentifier(String bundleIdentifier) -> () ClearBundleIdentifier() -> () #if PLATFORM(COCOA) AppPrivacyReportTestingData(PAL::SessionID sessionID) -> (struct WebKit::AppPrivacyReportTestingData data) ClearAppPrivacyReportTestingData(PAL::SessionID sessionID) -> () #endif AddWebPageNetworkParameters(PAL::SessionID sessionID, WebKit::WebPageProxyIdentifier pageID, WebKit::WebPageNetworkParameters parameters) RemoveWebPageNetworkParameters(PAL::SessionID sessionID, WebKit::WebPageProxyIdentifier pageID) CountNonDefaultSessionSets(PAL::SessionID sessionID) -> (size_t count) #if ENABLE(CFPREFS_DIRECT_MODE) NotifyPreferencesChanged(String domain, String key, std::optional encodedValue) #endif TerminateRemoteWorkerContextConnectionWhenPossible(enum:bool WebKit::RemoteWorkerType workerType, PAL::SessionID sessionID, WebCore::RegistrableDomain registrableDomain, WebCore::ProcessIdentifier processIdentifier); #if ENABLE(SERVICE_WORKER) GetPendingPushMessages(PAL::SessionID sessionID) -> (Vector messages) ProcessPushMessage(PAL::SessionID sessionID, struct WebKit::WebPushMessage pushMessage, enum:uint8_t WebCore::PushPermissionState pushPermissionState) -> (bool didSucceed) ProcessNotificationEvent(struct WebCore::NotificationData data, enum:bool WebCore::NotificationEventType eventType) -> (bool didSucceed) #endif DeletePushAndNotificationRegistration(PAL::SessionID sessionID, struct WebCore::SecurityOriginData origin) -> (String errorMessage) GetOriginsWithPushAndNotificationPermissions(PAL::SessionID sessionID) -> (Vector origins) HasPushSubscriptionForTesting(PAL::SessionID sessionID, URL scopeURL) -> (bool hasSubscription) }