# Copyright (C) 2012-2019 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 { # Initializes the network process. InitializeNetworkProcess(struct WebKit::NetworkProcessCreationParameters processCreationParameters) # Creates a connection for communication with a WebProcess CreateNetworkConnectionToWebProcess(WebCore::ProcessIdentifier processIdentifier, PAL::SessionID sessionID) -> (Optional connectionIdentifier) Async #if USE(SOUP) SetIgnoreTLSErrors(bool ignoreTLSErrors) UserPreferredLanguagesChanged(Vector languages) SetNetworkProxySettings(struct WebCore::SoupNetworkProxySettings settings) PrefetchDNS(String hostname) #endif #if USE(CURL) SetNetworkProxySettings(PAL::SessionID sessionID, WebCore::CurlProxySettings settings) #endif ClearCachedCredentials() AddWebsiteDataStore(struct WebKit::WebsiteDataStoreParameters websiteDataStoreParameters); DestroySession(PAL::SessionID sessionID) FetchWebsiteData(PAL::SessionID sessionID, OptionSet websiteDataTypes, OptionSet fetchOptions, uint64_t callbackID) DeleteWebsiteData(PAL::SessionID sessionID, OptionSet websiteDataTypes, WallTime modifiedSince, uint64_t callbackID) DeleteWebsiteDataForOrigins(PAL::SessionID sessionID, OptionSet websiteDataTypes, Vector origins, Vector cookieHostNames, Vector HSTSCacheHostNames, uint64_t callbackID) DownloadRequest(PAL::SessionID sessionID, WebKit::DownloadID downloadID, WebCore::ResourceRequest request, String suggestedFilename) ResumeDownload(PAL::SessionID sessionID, WebKit::DownloadID downloadID, IPC::DataReference resumeData, String path, WebKit::SandboxExtension::Handle sandboxExtensionHandle) CancelDownload(WebKit::DownloadID downloadID) #if PLATFORM(COCOA) PublishDownloadProgress(WebKit::DownloadID downloadID, URL url, WebKit::SandboxExtension::Handle sandboxExtensionHandle) #endif ApplicationDidEnterBackground() ApplicationWillEnterForeground() ContinueWillSendRequest(WebKit::DownloadID downloadID, WebCore::ResourceRequest request) ContinueDecidePendingDownloadDestination(WebKit::DownloadID downloadID, String destination, WebKit::SandboxExtension::Handle sandboxExtensionHandle, bool allowOverwrite) #if PLATFORM(COCOA) SetQOS(int latencyQOS, int throughputQOS) SetStorageAccessAPIEnabled(bool enabled) #endif SetAllowsAnySSLCertificateForWebSocket(bool enabled) -> () Synchronous SyncAllCookies() AllowSpecificHTTPSCertificateForHost(WebCore::CertificateInfo certificate, String host) ClearCacheForAllOrigins(uint32_t cachesToClear) SetCacheModel(enum:uint8_t WebKit::CacheModel cacheModel) SetCacheModelSynchronouslyForTesting(enum:uint8_t WebKit::CacheModel cacheModel) -> () Synchronous ProcessDidTransitionToBackground() ProcessDidTransitionToForeground() ProcessWillSuspendImminentlyForTestingSync() -> () Synchronous PrepareToSuspend(bool isSuspensionImminent) -> () Async ProcessDidResume() #if ENABLE(RESOURCE_LOAD_STATISTICS) ClearPrevalentResource(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> () Async ClearUserInteraction(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> () Async DumpResourceLoadStatistics(PAL::SessionID sessionID) -> (String dumpedStatistics) Async SetResourceLoadStatisticsEnabled(PAL::SessionID sessionID, bool enabled) SetResourceLoadStatisticsLogTestingEvent(bool enabled) UpdatePrevalentDomainsToBlockCookiesFor(PAL::SessionID sessionID, Vector domainsToBlock) -> () Async IsGrandfathered(PAL::SessionID sessionID, WebCore::RegistrableDomain targetDomain) -> (bool isGrandfathered) Async IsPrevalentResource(PAL::SessionID sessionID, WebCore::RegistrableDomain targetDomain) -> (bool isPrevalent) Async IsVeryPrevalentResource(PAL::SessionID sessionID, WebCore::RegistrableDomain targetDomain) -> (bool isVeryPrevalent) Async SetAgeCapForClientSideCookies(PAL::SessionID sessionID, Optional seconds) -> () Async SetLastSeen(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain, Seconds seconds) -> () Async 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) -> () Async SetPrevalentResource(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> () Async SetPrevalentResourceForDebugMode(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> () Async HadUserInteraction(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> (bool hadUserInteraction) Async IsRelationshipOnlyInDatabaseOnce(PAL::SessionID sessionID, WebCore::RegistrableDomain subDomain, WebCore::RegistrableDomain topDomain) -> (bool hadUserInteraction) Async HasLocalStorage(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> (bool hadUserInteraction) Async GetAllStorageAccessEntries(PAL::SessionID sessionID) -> (Vector domains) Async IsRegisteredAsRedirectingTo(PAL::SessionID sessionID, WebCore::RegistrableDomain redirectedFromDomain, WebCore::RegistrableDomain redirectedToDomain) -> (bool isRedirectingTo) Async IsRegisteredAsSubFrameUnder(PAL::SessionID sessionID, WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain) -> (bool isSubframeUnder) Async IsRegisteredAsSubresourceUnder(PAL::SessionID sessionID, WebCore::RegistrableDomain subresourceDomain, WebCore::RegistrableDomain topFrameDomain) -> (bool isSubresourceUnder) Async 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) -> () Async RemovePrevalentDomains(PAL::SessionID sessionID, Vector domainsWithInteraction) ResetParametersToDefaultValues(PAL::SessionID sessionID) -> () Async ScheduleClearInMemoryAndPersistent(PAL::SessionID sessionID, Optional modifiedSince, enum:bool WebKit::ShouldGrandfatherStatistics shouldGrandfather) -> () Async ScheduleCookieBlockingUpdate(PAL::SessionID sessionID) -> () Async ScheduleStatisticsAndDataRecordsProcessing(PAL::SessionID sessionID) -> () Async SubmitTelemetry(PAL::SessionID sessionID) -> () Async SetCacheMaxAgeCapForPrevalentResources(PAL::SessionID sessionID, Seconds seconds) -> () Async SetGrandfathered(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain, bool isGrandfathered) -> () Async SetUseITPDatabase(PAL::SessionID sessionID, bool value) -> () Async GetResourceLoadStatisticsDataSummary(PAL::SessionID sessionID) -> (Vector thirdPartyData) Async SetGrandfatheringTime(PAL::SessionID sessionID, Seconds seconds) -> () Async SetMaxStatisticsEntries(PAL::SessionID sessionID, uint64_t maximumEntryCount) -> () Async SetMinimumTimeBetweenDataRecordsRemoval(PAL::SessionID sessionID, Seconds seconds) -> () Async SetPruneEntriesDownTo(PAL::SessionID sessionID, uint64_t maximumEntryCount) -> () Async SetShouldClassifyResourcesBeforeDataRecordsRemoval(PAL::SessionID sessionID, bool value) -> () Async SetNotifyPagesWhenDataRecordsWereScanned(PAL::SessionID sessionID, bool value) -> () Async SetIsRunningResourceLoadStatisticsTest(PAL::SessionID sessionID, bool value) -> () Async SetNotifyPagesWhenTelemetryWasCaptured(PAL::SessionID sessionID, bool value) -> () Async SetResourceLoadStatisticsDebugMode(PAL::SessionID sessionID, bool debugMode) -> () Async SetVeryPrevalentResource(PAL::SessionID sessionID, WebCore::RegistrableDomain resourceDomain) -> () Async SetSubframeUnderTopFrameDomain(PAL::SessionID sessionID, WebCore::RegistrableDomain subFrameDomain, WebCore::RegistrableDomain topFrameDomain) -> () Async SetSubresourceUnderTopFrameDomain(PAL::SessionID sessionID, WebCore::RegistrableDomain subresourceDomain, WebCore::RegistrableDomain topFrameDomain) -> () Async SetSubresourceUniqueRedirectTo(PAL::SessionID sessionID, WebCore::RegistrableDomain subresourceDomain, WebCore::RegistrableDomain redirectedToDomain) -> () Async SetSubresourceUniqueRedirectFrom(PAL::SessionID sessionID, WebCore::RegistrableDomain subresourceDomain, WebCore::RegistrableDomain redirectedFromDomain) -> () Async SetTimeToLiveUserInteraction(PAL::SessionID sessionID, Seconds seconds) -> () Async SetTopFrameUniqueRedirectTo(PAL::SessionID sessionID, WebCore::RegistrableDomain topFrameDomain, WebCore::RegistrableDomain redirectedToDomain) -> () Async SetTopFrameUniqueRedirectFrom(PAL::SessionID sessionID, WebCore::RegistrableDomain topFrameDomain, WebCore::RegistrableDomain redirectedFromDomain) -> () Async ResetCacheMaxAgeCapForPrevalentResources(PAL::SessionID sessionID) -> () Async 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) -> () Async ResetCrossSiteLoadsWithLinkDecorationForTesting(PAL::SessionID sessionID) -> () Async DeleteCookiesForTesting(PAL::SessionID sessionID, WebCore::RegistrableDomain domain, bool includeHttpOnlyCookies) -> () Async HasIsolatedSession(PAL::SessionID sessionID, WebCore::RegistrableDomain domain) -> (bool hasIsolatedSession) Async SetShouldDowngradeReferrerForTesting(bool enabled) -> () Async SetShouldBlockThirdPartyCookiesForTesting(PAL::SessionID sessionID, enum:uint8_t WebCore::ThirdPartyCookieBlockingMode blockingMode) -> () Async SetFirstPartyWebsiteDataRemovalModeForTesting(PAL::SessionID sessionID, enum:uint8_t WebCore::FirstPartyWebsiteDataRemovalMode mode) -> () Async #endif SetSessionIsControlledByAutomation(PAL::SessionID sessionID, bool controlled); RegisterURLSchemeAsSecure(String scheme) RegisterURLSchemeAsBypassingContentSecurityPolicy(String scheme) RegisterURLSchemeAsLocal(String scheme) RegisterURLSchemeAsNoAccess(String scheme) SetCacheStorageParameters(PAL::SessionID sessionID, String cacheStorageDirectory, WebKit::SandboxExtension::Handle handle); SyncLocalStorage() -> () Synchronous ClearLegacyPrivateBrowsingLocalStorage() StoreAdClickAttribution(PAL::SessionID sessionID, WebCore::AdClickAttribution adClickAttribution) DumpAdClickAttribution(PAL::SessionID sessionID) -> (String adClickAttributionState) Async ClearAdClickAttribution(PAL::SessionID sessionID) -> () Async SetAdClickAttributionOverrideTimerForTesting(PAL::SessionID sessionID, bool value) -> () Async SetAdClickAttributionConversionURLForTesting(PAL::SessionID sessionID, URL url) -> () Async MarkAdClickAttributionsAsExpiredForTesting(PAL::SessionID sessionID) -> () Async GetLocalStorageOriginDetails(PAL::SessionID sessionID) -> (Vector details) Async SetServiceWorkerFetchTimeoutForTesting(Seconds seconds) -> () Synchronous ResetServiceWorkerFetchTimeoutForTesting() -> () Synchronous ResetQuota(PAL::SessionID sessionID) -> () Async }