From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- .../NetworkProcess/NetworkConnectionToWebProcess.h | 94 +++++++++++++--------- 1 file changed, 57 insertions(+), 37 deletions(-) (limited to 'Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h') diff --git a/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h b/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h index 3981fa5eb..9729314d6 100644 --- a/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h +++ b/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 Apple Inc. All rights reserved. + * Copyright (C) 2012-2016 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,82 +23,102 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef NetworkConnectionToWebProcess_h -#define NetworkConnectionToWebProcess_h - -#if ENABLE(NETWORK_PROCESS) +#pragma once #include "BlockingResponseMap.h" #include "Connection.h" +#include "DownloadID.h" #include "NetworkConnectionToWebProcessMessages.h" +#include "NetworkRTCProvider.h" + #include -#include #include namespace WebCore { +class BlobDataFileReference; class ResourceRequest; } namespace WebKit { -class BlobRegistrationData; class NetworkConnectionToWebProcess; class NetworkResourceLoader; class SyncNetworkResourceLoader; typedef uint64_t ResourceLoadIdentifier; +namespace NetworkCache { +struct DataKey; +} + class NetworkConnectionToWebProcess : public RefCounted, IPC::Connection::Client { public: - static PassRefPtr create(IPC::Connection::Identifier); + static Ref create(IPC::Connection::Identifier); virtual ~NetworkConnectionToWebProcess(); - IPC::Connection* connection() const { return m_connection.get(); } + IPC::Connection& connection() { return m_connection.get(); } + + void didCleanupResourceLoader(NetworkResourceLoader&); - bool isSerialLoadingEnabled() const { return m_serialLoadingEnabled; } + RefPtr getBlobDataFileReferenceForPath(const String& path); private: NetworkConnectionToWebProcess(IPC::Connection::Identifier); // IPC::Connection::Client - virtual void didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&); - virtual void didReceiveSyncMessage(IPC::Connection*, IPC::MessageDecoder&, std::unique_ptr&); - virtual void didClose(IPC::Connection*); - virtual void didReceiveInvalidMessage(IPC::Connection*, IPC::StringReference messageReceiverName, IPC::StringReference messageName); + void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override; + void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr&) override; + void didClose(IPC::Connection&) override; + void didReceiveInvalidMessage(IPC::Connection&, IPC::StringReference messageReceiverName, IPC::StringReference messageName) override; // Message handlers. - void didReceiveNetworkConnectionToWebProcessMessage(IPC::Connection*, IPC::MessageDecoder&); - void didReceiveSyncNetworkConnectionToWebProcessMessage(IPC::Connection*, IPC::MessageDecoder&, std::unique_ptr&); - + void didReceiveNetworkConnectionToWebProcessMessage(IPC::Connection&, IPC::Decoder&); + void didReceiveSyncNetworkConnectionToWebProcessMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr&); + void scheduleResourceLoad(const NetworkResourceLoadParameters&); - void performSynchronousLoad(const NetworkResourceLoadParameters&, PassRefPtr); + void performSynchronousLoad(const NetworkResourceLoadParameters&, Ref&&); + void loadPing(const NetworkResourceLoadParameters&); + void prefetchDNS(const String&); void removeLoadIdentifier(ResourceLoadIdentifier); + void setDefersLoading(ResourceLoadIdentifier, bool); void crossOriginRedirectReceived(ResourceLoadIdentifier, const WebCore::URL& redirectURL); - void servePendingRequests(uint32_t resourceLoadPriority); - void setSerialLoadingEnabled(bool); - void startDownload(uint64_t sessionID, uint64_t downloadID, const WebCore::ResourceRequest&); - void convertMainResourceLoadToDownload(uint64_t mainResourceLoadIdentifier, uint64_t downloadID, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&); - - void cookiesForDOM(uint64_t sessionID, const WebCore::URL& firstParty, const WebCore::URL&, String& result); - void setCookiesFromDOM(uint64_t sessionID, const WebCore::URL& firstParty, const WebCore::URL&, const String&); - void cookiesEnabled(uint64_t sessionID, const WebCore::URL& firstParty, const WebCore::URL&, bool& result); - void cookieRequestHeaderFieldValue(uint64_t sessionID, const WebCore::URL& firstParty, const WebCore::URL&, String& result); - void getRawCookies(uint64_t sessionID, const WebCore::URL& firstParty, const WebCore::URL&, Vector&); - void deleteCookie(uint64_t sessionID, const WebCore::URL&, const String& cookieName); - - void registerBlobURL(const WebCore::URL&, const BlobRegistrationData&); + void startDownload(WebCore::SessionID, DownloadID, const WebCore::ResourceRequest&, const String& suggestedName = { }); + void convertMainResourceLoadToDownload(WebCore::SessionID, uint64_t mainResourceLoadIdentifier, DownloadID, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&); + + void cookiesForDOM(WebCore::SessionID, const WebCore::URL& firstParty, const WebCore::URL&, String& result); + void setCookiesFromDOM(WebCore::SessionID, const WebCore::URL& firstParty, const WebCore::URL&, const String&); + void cookiesEnabled(WebCore::SessionID, const WebCore::URL& firstParty, const WebCore::URL&, bool& result); + void cookieRequestHeaderFieldValue(WebCore::SessionID, const WebCore::URL& firstParty, const WebCore::URL&, String& result); + void getRawCookies(WebCore::SessionID, const WebCore::URL& firstParty, const WebCore::URL&, Vector&); + void deleteCookie(WebCore::SessionID, const WebCore::URL&, const String& cookieName); + void addCookie(WebCore::SessionID, const WebCore::URL&, const WebCore::Cookie&); + + void registerFileBlobURL(const WebCore::URL&, const String& path, const SandboxExtension::Handle&, const String& contentType); + void registerBlobURL(const WebCore::URL&, Vector&&, const String& contentType); void registerBlobURLFromURL(const WebCore::URL&, const WebCore::URL& srcURL); + void preregisterSandboxExtensionsForOptionallyFileBackedBlob(const Vector& fileBackedPath, const SandboxExtension::HandleArray&); + void registerBlobURLOptionallyFileBacked(const WebCore::URL&, const WebCore::URL& srcURL, const String& fileBackedPath, const String& contentType); + void registerBlobURLForSlice(const WebCore::URL&, const WebCore::URL& srcURL, int64_t start, int64_t end); + void blobSize(const WebCore::URL&, uint64_t& resultSize); void unregisterBlobURL(const WebCore::URL&); + void writeBlobsToTemporaryFiles(const Vector& blobURLs, uint64_t requestIdentifier); + + void storeDerivedDataToCache(const WebKit::NetworkCache::DataKey&, const IPC::DataReference&); + + void ensureLegacyPrivateBrowsingSession(); - RefPtr m_connection; +#if USE(LIBWEBRTC) + NetworkRTCProvider& rtcProvider(); +#endif + + Ref m_connection; HashMap> m_networkResourceLoaders; + HashMap> m_blobDataFileReferences; - bool m_serialLoadingEnabled; +#if USE(LIBWEBRTC) + RefPtr m_rtcProvider; +#endif }; } // namespace WebKit - -#endif // ENABLE(NETWORK_PROCESS) - -#endif // NetworkConnectionToWebProcess_h -- cgit v1.2.1