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/FileAPI/NetworkBlobRegistry.h | 29 ++++++++++------------ 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.h') diff --git a/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.h b/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.h index 16c6adb09..40378b0bf 100644 --- a/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.h +++ b/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013 Apple Inc. All rights reserved. + * Copyright (C) 2013-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,17 +23,16 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef NetworkBlobRegistry_h -#define NetworkBlobRegistry_h - -#if ENABLE(BLOB) && ENABLE(NETWORK_PROCESS) +#pragma once #include +#include #include #include namespace WebCore { -class BlobData; +class BlobDataFileReference; +class BlobPart; } namespace WebKit { @@ -45,28 +44,26 @@ class NetworkBlobRegistry { WTF_MAKE_NONCOPYABLE(NetworkBlobRegistry); public: NetworkBlobRegistry(); - static NetworkBlobRegistry& shared(); + static NetworkBlobRegistry& singleton(); - void registerBlobURL(NetworkConnectionToWebProcess*, const WebCore::URL&, std::unique_ptr, const Vector>&); + void registerFileBlobURL(NetworkConnectionToWebProcess*, const WebCore::URL&, const String& path, RefPtr&&, const String& contentType); + void registerBlobURL(NetworkConnectionToWebProcess*, const WebCore::URL&, Vector&&, const String& contentType); void registerBlobURL(NetworkConnectionToWebProcess*, const WebCore::URL&, const WebCore::URL& srcURL); + void registerBlobURLOptionallyFileBacked(NetworkConnectionToWebProcess*, const WebCore::URL&, const WebCore::URL& srcURL, const String& fileBackedPath, const String& contentType); + void registerBlobURLForSlice(NetworkConnectionToWebProcess*, const WebCore::URL&, const WebCore::URL& srcURL, int64_t start, int64_t end); void unregisterBlobURL(NetworkConnectionToWebProcess*, const WebCore::URL&); + uint64_t blobSize(NetworkConnectionToWebProcess*, const WebCore::URL&); + void writeBlobsToTemporaryFiles(const Vector& blobURLs, Function&)>&& completionHandler); void connectionToWebProcessDidClose(NetworkConnectionToWebProcess*); - const Vector> sandboxExtensions(const WebCore::URL&); + Vector> filesInBlob(NetworkConnectionToWebProcess&, const WebCore::URL&); private: ~NetworkBlobRegistry(); - typedef HashMap>> SandboxExtensionMap; - SandboxExtensionMap m_sandboxExtensions; - typedef HashMap> BlobForConnectionMap; BlobForConnectionMap m_blobsForConnection; }; } - -#endif // ENABLE(BLOB) && ENABLE(NETWORK_PROCESS) - -#endif // NetworkBlobRegistry_h -- cgit v1.2.1