Changeset 223730 in webkit
- Timestamp:
- Oct 19, 2017 5:09:38 PM (7 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r223726 r223730 1 2017-10-19 Alex Christensen <achristensen@webkit.org> 2 3 Modernize API::DownloadClient 4 https://bugs.webkit.org/show_bug.cgi?id=178547 5 6 Reviewed by Andy Estes. 7 8 Use more C++ references instead of pointers because they're never null. 9 10 Remove canAuthenticateAgainstProtectionSpace because there are no implementations 11 except the default implementation which always returns true and we don't intend to 12 add this to the SPI because that's just a legacy call anyways from when NSURLConnection 13 hadn't fully evolved, and we're moving away from NSURLConnection, especially in our API design. 14 15 Separate the NetworkSession-only and pre-NetworkSession-only callbacks. All the synchronous 16 IPC messages are only used in the pre-NetworkSession code, so once we remove it we can remove them! 17 18 Make API::DownloadClient calls that NetworkSession uses use a completion handler so we will be able to 19 design an asynchronous API. 20 21 * NetworkProcess/Downloads/DownloadManager.cpp: 22 (WebKit::DownloadManager::continueCanAuthenticateAgainstProtectionSpace): Deleted. 23 * NetworkProcess/Downloads/DownloadManager.h: 24 * NetworkProcess/Downloads/PendingDownload.cpp: 25 (WebKit::PendingDownload::canAuthenticateAgainstProtectionSpaceAsync): 26 (WebKit::PendingDownload::continueCanAuthenticateAgainstProtectionSpace): Deleted. 27 * NetworkProcess/Downloads/PendingDownload.h: 28 * NetworkProcess/NetworkProcess.cpp: 29 (WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpaceDownload): Deleted. 30 * NetworkProcess/NetworkProcess.h: 31 * NetworkProcess/NetworkProcess.messages.in: 32 * UIProcess/API/APIDownloadClient.h: 33 (API::DownloadClient::didStart): 34 (API::DownloadClient::didReceiveAuthenticationChallenge): 35 (API::DownloadClient::didReceiveResponse): 36 (API::DownloadClient::didReceiveData): 37 (API::DownloadClient::shouldDecodeSourceDataOfMIMEType): 38 (API::DownloadClient::decideDestinationWithSuggestedFilename): 39 (API::DownloadClient::didCreateDestination): 40 (API::DownloadClient::didFinish): 41 (API::DownloadClient::didFail): 42 (API::DownloadClient::didCancel): 43 (API::DownloadClient::processDidCrash): 44 (API::DownloadClient::willSendRequest): 45 (API::DownloadClient::canAuthenticateAgainstProtectionSpace): Deleted. 46 * UIProcess/API/C/WKContext.cpp: 47 (WKContextSetDownloadClient): 48 * UIProcess/API/glib/WebKitDownloadClient.cpp: 49 * UIProcess/Cocoa/DownloadClient.h: 50 * UIProcess/Cocoa/DownloadClient.mm: 51 (WebKit::DownloadClient::didStart): 52 (WebKit::DownloadClient::didReceiveResponse): 53 (WebKit::DownloadClient::didReceiveData): 54 (WebKit::DownloadClient::decideDestinationWithSuggestedFilename): 55 (WebKit::DownloadClient::didFinish): 56 (WebKit::DownloadClient::didFail): 57 (WebKit::DownloadClient::didCancel): 58 (WebKit::DownloadClient::willSendRequest): 59 * UIProcess/Downloads/DownloadProxy.cpp: 60 (WebKit::DownloadProxy::processDidClose): 61 (WebKit::DownloadProxy::didStart): 62 (WebKit::DownloadProxy::didReceiveAuthenticationChallenge): 63 (WebKit::DownloadProxy::willSendRequest): 64 (WebKit::DownloadProxy::didReceiveResponse): 65 (WebKit::DownloadProxy::didReceiveData): 66 (WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType): 67 (WebKit::DownloadProxy::decideDestinationWithSuggestedFilenameAsync): 68 (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename): 69 (WebKit::DownloadProxy::didCreateDestination): 70 (WebKit::DownloadProxy::didFinish): 71 (WebKit::DownloadProxy::didFail): 72 (WebKit::DownloadProxy::didCancel): 73 (WebKit::DownloadProxy::canAuthenticateAgainstProtectionSpace): Deleted. 74 * UIProcess/Downloads/DownloadProxy.h: 75 * UIProcess/Downloads/DownloadProxy.messages.in: 76 1 77 2017-10-19 Nan Wang <n_wang@apple.com> 2 78 -
trunk/Source/WebKit/NetworkProcess/Downloads/Download.cpp
r223431 r223730 161 161 } 162 162 163 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)164 m_challenge = challenge;165 m_challengeCompletionHandler = WTFMove(completionHandler);166 send(Messages::DownloadProxy::CanAuthenticateAgainstProtectionSpace(challenge.protectionSpace()));167 #else168 163 NetworkProcess::singleton().authenticationManager().didReceiveAuthenticationChallenge(*this, challenge, WTFMove(completionHandler)); 169 #endif 170 } 171 172 #if USE(PROTECTION_SPACE_AUTH_CALLBACK) 173 void Download::continueCanAuthenticateAgainstProtectionSpace(bool canAuthenticate) 174 { 175 ASSERT(m_challengeCompletionHandler); 176 auto completionHandler = std::exchange(m_challengeCompletionHandler, nullptr); 177 if (!canAuthenticate) { 178 if (NetworkSession::allowsSpecificHTTPSCertificateForHost(*m_challenge)) 179 completionHandler(AuthenticationChallengeDisposition::UseCredential, serverTrustCredential(*m_challenge)); 180 else 181 completionHandler(AuthenticationChallengeDisposition::RejectProtectionSpace, { }); 182 return; 183 } 184 185 NetworkProcess::singleton().authenticationManager().didReceiveAuthenticationChallenge(*this, *m_challenge, WTFMove(completionHandler)); 186 } 187 #endif // USE(PROTECTION_SPACE_AUTH_CALLBACK) 164 } 188 165 #endif // USE(NETWORK_SESSION) 189 166 -
trunk/Source/WebKit/NetworkProcess/Downloads/Download.h
r223431 r223730 24 24 */ 25 25 26 #ifndef Download_h 27 #define Download_h 26 #pragma once 28 27 29 28 #include "DownloadID.h" … … 105 104 void setSandboxExtension(RefPtr<SandboxExtension>&& sandboxExtension) { m_sandboxExtension = WTFMove(sandboxExtension); } 106 105 void didReceiveChallenge(const WebCore::AuthenticationChallenge&, ChallengeCompletionHandler&&); 107 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)108 void continueCanAuthenticateAgainstProtectionSpace(bool canAuthenticate);109 #endif110 106 #else 111 107 const WebCore::ResourceRequest& request() const { return m_request; } … … 153 149 #endif 154 150 PAL::SessionID m_sessionID; 155 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)156 std::optional<WebCore::AuthenticationChallenge> m_challenge;157 ChallengeCompletionHandler m_challengeCompletionHandler;158 #endif159 151 #else // USE(NETWORK_SESSION) 160 152 WebCore::ResourceRequest m_request; … … 175 167 176 168 } // namespace WebKit 177 178 #endif // Download_h -
trunk/Source/WebKit/NetworkProcess/Downloads/DownloadManager.cpp
r223431 r223730 87 87 } 88 88 89 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)90 void DownloadManager::continueCanAuthenticateAgainstProtectionSpace(DownloadID downloadID, bool canAuthenticate)91 {92 if (auto* pendingDownload = m_pendingDownloads.get(downloadID)) {93 pendingDownload->continueCanAuthenticateAgainstProtectionSpace(canAuthenticate);94 return;95 }96 if (auto* download = m_downloads.get(downloadID)) {97 download->continueCanAuthenticateAgainstProtectionSpace(canAuthenticate);98 return;99 }100 ASSERT_NOT_REACHED();101 }102 #endif103 104 89 void DownloadManager::continueWillSendRequest(DownloadID downloadID, WebCore::ResourceRequest&& request) 105 90 { -
trunk/Source/WebKit/NetworkProcess/Downloads/DownloadManager.h
r220857 r223730 24 24 */ 25 25 26 #ifndef DownloadManager_h 27 #define DownloadManager_h 26 #pragma once 28 27 29 28 #include "DownloadID.h" … … 82 81 #if USE(NETWORK_SESSION) 83 82 void dataTaskBecameDownloadTask(DownloadID, std::unique_ptr<Download>&&); 84 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)85 void continueCanAuthenticateAgainstProtectionSpace(DownloadID, bool canAuthenticate);86 #endif87 83 void continueWillSendRequest(DownloadID, WebCore::ResourceRequest&&); 88 84 void willDecidePendingDownloadDestination(NetworkDataTask&, ResponseCompletionHandler&&); … … 118 114 119 115 } // namespace WebKit 120 121 #endif // DownloadManager_h -
trunk/Source/WebKit/NetworkProcess/Downloads/PendingDownload.cpp
r208521 r223730 78 78 void PendingDownload::canAuthenticateAgainstProtectionSpaceAsync(const WebCore::ProtectionSpace& protectionSpace) 79 79 { 80 send(Messages::DownloadProxy::CanAuthenticateAgainstProtectionSpace(protectionSpace)); 81 } 82 83 void PendingDownload::continueCanAuthenticateAgainstProtectionSpace(bool canAuthenticate) 84 { 85 m_networkLoad->continueCanAuthenticateAgainstProtectionSpace(canAuthenticate); 80 m_networkLoad->continueCanAuthenticateAgainstProtectionSpace(true); 86 81 } 87 82 #endif -
trunk/Source/WebKit/NetworkProcess/Downloads/PendingDownload.h
r212993 r223730 50 50 51 51 void continueWillSendRequest(WebCore::ResourceRequest&&); 52 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)53 void continueCanAuthenticateAgainstProtectionSpace(bool canAuthenticate);54 #endif55 52 void cancel(); 56 53 -
trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp
r223720 r223730 550 550 551 551 #if USE(NETWORK_SESSION) 552 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)553 void NetworkProcess::continueCanAuthenticateAgainstProtectionSpaceDownload(DownloadID downloadID, bool canAuthenticate)554 {555 downloadManager().continueCanAuthenticateAgainstProtectionSpace(downloadID, canAuthenticate);556 }557 #endif558 559 552 void NetworkProcess::continueWillSendRequest(DownloadID downloadID, WebCore::ResourceRequest&& request) 560 553 { -
trunk/Source/WebKit/NetworkProcess/NetworkProcess.h
r223179 r223730 207 207 #endif 208 208 #if USE(NETWORK_SESSION) 209 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)210 void continueCanAuthenticateAgainstProtectionSpaceDownload(DownloadID, bool canAuthenticate);211 #endif212 209 void continueWillSendRequest(DownloadID, WebCore::ResourceRequest&&); 213 210 #endif -
trunk/Source/WebKit/NetworkProcess/NetworkProcess.messages.in
r222613 r223730 52 52 #endif 53 53 #if USE(NETWORK_SESSION) 54 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)55 ContinueCanAuthenticateAgainstProtectionSpaceDownload(WebKit::DownloadID downloadID, bool canAuthenticate)56 #endif57 54 ContinueWillSendRequest(WebKit::DownloadID downloadID, WebCore::ResourceRequest request) 58 55 #endif -
trunk/Source/WebKit/UIProcess/API/APIDownloadClient.h
r221749 r223730 24 24 */ 25 25 26 #ifndef APIDownloadClient_h 27 #define APIDownloadClient_h 26 #pragma once 28 27 29 28 #include <wtf/Function.h> … … 41 40 class WebProcessPool; 42 41 class WebProtectionSpace; 42 43 enum class AllowOverwrite { No, Yes }; 43 44 } 44 45 … … 49 50 virtual ~DownloadClient() { } 50 51 51 virtual void didStart(WebKit::WebProcessPool*, WebKit::DownloadProxy*) { } 52 virtual void didReceiveAuthenticationChallenge(WebKit::WebProcessPool*, WebKit::DownloadProxy*, WebKit::AuthenticationChallengeProxy*) { } 53 virtual void didReceiveResponse(WebKit::WebProcessPool*, WebKit::DownloadProxy*, const WebCore::ResourceResponse&) { } 54 virtual void didReceiveData(WebKit::WebProcessPool*, WebKit::DownloadProxy*, uint64_t) { } 55 virtual bool shouldDecodeSourceDataOfMIMEType(WebKit::WebProcessPool*, WebKit::DownloadProxy*, const WTF::String&) { return true; } 56 virtual WTF::String decideDestinationWithSuggestedFilename(WebKit::WebProcessPool*, WebKit::DownloadProxy*, const WTF::String&, bool&) { return { }; } 57 virtual void didCreateDestination(WebKit::WebProcessPool*, WebKit::DownloadProxy*, const WTF::String&) { } 58 virtual void didFinish(WebKit::WebProcessPool*, WebKit::DownloadProxy*) { } 59 virtual void didFail(WebKit::WebProcessPool*, WebKit::DownloadProxy*, const WebCore::ResourceError&) { } 60 virtual void didCancel(WebKit::WebProcessPool*, WebKit::DownloadProxy*) { } 61 virtual void processDidCrash(WebKit::WebProcessPool*, WebKit::DownloadProxy*) { } 62 virtual bool canAuthenticateAgainstProtectionSpace(WebKit::WebProtectionSpace*) { return true; } 63 virtual void willSendRequest(WebKit::WebProcessPool*, WebKit::DownloadProxy*, const WebCore::ResourceRequest& request, const WebCore::ResourceResponse&, WTF::Function<void(const WebCore::ResourceRequest&)>&& callback) { callback(request); } 52 virtual void didStart(WebKit::WebProcessPool&, WebKit::DownloadProxy&) { } 53 virtual void didReceiveAuthenticationChallenge(WebKit::WebProcessPool&, WebKit::DownloadProxy&, WebKit::AuthenticationChallengeProxy&) { } 54 virtual void didReceiveResponse(WebKit::WebProcessPool&, WebKit::DownloadProxy&, const WebCore::ResourceResponse&) { } 55 virtual void didReceiveData(WebKit::WebProcessPool&, WebKit::DownloadProxy&, uint64_t) { } 56 #if !USE(NETWORK_SESSION) 57 virtual bool shouldDecodeSourceDataOfMIMEType(WebKit::WebProcessPool&, WebKit::DownloadProxy&, const WTF::String&) { return true; } 58 #endif 59 virtual void decideDestinationWithSuggestedFilename(WebKit::WebProcessPool&, WebKit::DownloadProxy&, const WTF::String&, Function<void(WebKit::AllowOverwrite, WTF::String)>&& completionHandler) { completionHandler(WebKit::AllowOverwrite::No, { }); } 60 virtual void didCreateDestination(WebKit::WebProcessPool&, WebKit::DownloadProxy&, const WTF::String&) { } 61 virtual void didFinish(WebKit::WebProcessPool&, WebKit::DownloadProxy&) { } 62 virtual void didFail(WebKit::WebProcessPool&, WebKit::DownloadProxy&, const WebCore::ResourceError&) { } 63 virtual void didCancel(WebKit::WebProcessPool&, WebKit::DownloadProxy&) { } 64 virtual void processDidCrash(WebKit::WebProcessPool&, WebKit::DownloadProxy&) { } 65 virtual void willSendRequest(WebKit::WebProcessPool&, WebKit::DownloadProxy&, WebCore::ResourceRequest&& request, const WebCore::ResourceResponse&, Function<void(WebCore::ResourceRequest&&)>&& completionHandler) { completionHandler(WTFMove(request)); } 64 66 }; 65 67 66 68 } // namespace API 67 68 #endif // APIDownloadClient_h -
trunk/Source/WebKit/UIProcess/API/C/WKContext.cpp
r222664 r223730 173 173 } 174 174 private: 175 void didStart(WebProcessPool * processPool, DownloadProxy* downloadProxy) override175 void didStart(WebProcessPool& processPool, DownloadProxy& downloadProxy) final 176 176 { 177 177 if (!m_client.didStart) 178 178 return; 179 179 180 m_client.didStart(toAPI( processPool), toAPI(downloadProxy), m_client.base.clientInfo);181 } 182 183 void didReceiveAuthenticationChallenge(WebProcessPool * processPool, DownloadProxy* downloadProxy, AuthenticationChallengeProxy* authenticationChallengeProxy) override180 m_client.didStart(toAPI(&processPool), toAPI(&downloadProxy), m_client.base.clientInfo); 181 } 182 183 void didReceiveAuthenticationChallenge(WebProcessPool& processPool, DownloadProxy& downloadProxy, AuthenticationChallengeProxy& authenticationChallengeProxy) final 184 184 { 185 185 if (!m_client.didReceiveAuthenticationChallenge) 186 186 return; 187 187 188 m_client.didReceiveAuthenticationChallenge(toAPI( processPool), toAPI(downloadProxy), toAPI(authenticationChallengeProxy), m_client.base.clientInfo);189 } 190 191 void didReceiveResponse(WebProcessPool * processPool, DownloadProxy* downloadProxy, const ResourceResponse& response) override188 m_client.didReceiveAuthenticationChallenge(toAPI(&processPool), toAPI(&downloadProxy), toAPI(&authenticationChallengeProxy), m_client.base.clientInfo); 189 } 190 191 void didReceiveResponse(WebProcessPool& processPool, DownloadProxy& downloadProxy, const ResourceResponse& response) final 192 192 { 193 193 if (!m_client.didReceiveResponse) 194 194 return; 195 195 196 m_client.didReceiveResponse(toAPI( processPool), toAPI(downloadProxy), toAPI(API::URLResponse::create(response).ptr()), m_client.base.clientInfo);197 } 198 199 void didReceiveData(WebProcessPool * processPool, DownloadProxy* downloadProxy, uint64_t length) override196 m_client.didReceiveResponse(toAPI(&processPool), toAPI(&downloadProxy), toAPI(API::URLResponse::create(response).ptr()), m_client.base.clientInfo); 197 } 198 199 void didReceiveData(WebProcessPool& processPool, DownloadProxy& downloadProxy, uint64_t length) final 200 200 { 201 201 if (!m_client.didReceiveData) 202 202 return; 203 203 204 m_client.didReceiveData(toAPI(processPool), toAPI(downloadProxy), length, m_client.base.clientInfo); 205 } 206 207 bool shouldDecodeSourceDataOfMIMEType(WebProcessPool* processPool, DownloadProxy* downloadProxy, const String& mimeType) override 204 m_client.didReceiveData(toAPI(&processPool), toAPI(&downloadProxy), length, m_client.base.clientInfo); 205 } 206 207 #if !USE(NETWORK_SESSION) 208 bool shouldDecodeSourceDataOfMIMEType(WebProcessPool& processPool, DownloadProxy& downloadProxy, const String& mimeType) final 208 209 { 209 210 if (!m_client.shouldDecodeSourceDataOfMIMEType) 210 211 return true; 211 212 212 return m_client.shouldDecodeSourceDataOfMIMEType(toAPI(processPool), toAPI(downloadProxy), toAPI(mimeType.impl()), m_client.base.clientInfo); 213 } 214 215 String decideDestinationWithSuggestedFilename(WebProcessPool* processPool, DownloadProxy* downloadProxy, const String& filename, bool& allowOverwrite) override 213 return m_client.shouldDecodeSourceDataOfMIMEType(toAPI(&processPool), toAPI(&downloadProxy), toAPI(mimeType.impl()), m_client.base.clientInfo); 214 } 215 #endif 216 217 void decideDestinationWithSuggestedFilename(WebProcessPool& processPool, DownloadProxy& downloadProxy, const String& filename, Function<void(AllowOverwrite, WTF::String)>&& completionHandler) final 216 218 { 217 219 if (!m_client.decideDestinationWithSuggestedFilename) 218 return String(); 219 220 WKRetainPtr<WKStringRef> destination(AdoptWK, m_client.decideDestinationWithSuggestedFilename(toAPI(processPool), toAPI(downloadProxy), toAPI(filename.impl()), &allowOverwrite, m_client.base.clientInfo)); 221 return toWTFString(destination.get()); 222 } 223 224 void didCreateDestination(WebProcessPool* processPool, DownloadProxy* downloadProxy, const String& path) override 220 return completionHandler(AllowOverwrite::No, { }); 221 222 bool allowOverwrite = false; 223 WKRetainPtr<WKStringRef> destination(AdoptWK, m_client.decideDestinationWithSuggestedFilename(toAPI(&processPool), toAPI(&downloadProxy), toAPI(filename.impl()), &allowOverwrite, m_client.base.clientInfo)); 224 completionHandler(allowOverwrite ? AllowOverwrite::Yes : AllowOverwrite::No, toWTFString(destination.get())); 225 } 226 227 void didCreateDestination(WebProcessPool& processPool, DownloadProxy& downloadProxy, const String& path) final 225 228 { 226 229 if (!m_client.didCreateDestination) 227 230 return; 228 231 229 m_client.didCreateDestination(toAPI( processPool), toAPI(downloadProxy), toAPI(path.impl()), m_client.base.clientInfo);230 } 231 232 void didFinish(WebProcessPool * processPool, DownloadProxy* downloadProxy) override232 m_client.didCreateDestination(toAPI(&processPool), toAPI(&downloadProxy), toAPI(path.impl()), m_client.base.clientInfo); 233 } 234 235 void didFinish(WebProcessPool& processPool, DownloadProxy& downloadProxy) final 233 236 { 234 237 if (!m_client.didFinish) 235 238 return; 236 239 237 m_client.didFinish(toAPI( processPool), toAPI(downloadProxy), m_client.base.clientInfo);238 } 239 240 void didFail(WebProcessPool * processPool, DownloadProxy* downloadProxy, const ResourceError& error) override240 m_client.didFinish(toAPI(&processPool), toAPI(&downloadProxy), m_client.base.clientInfo); 241 } 242 243 void didFail(WebProcessPool& processPool, DownloadProxy& downloadProxy, const ResourceError& error) final 241 244 { 242 245 if (!m_client.didFail) 243 246 return; 244 247 245 m_client.didFail(toAPI( processPool), toAPI(downloadProxy), toAPI(error), m_client.base.clientInfo);248 m_client.didFail(toAPI(&processPool), toAPI(&downloadProxy), toAPI(error), m_client.base.clientInfo); 246 249 } 247 250 248 void didCancel(WebProcessPool * processPool, DownloadProxy* downloadProxy) override251 void didCancel(WebProcessPool& processPool, DownloadProxy& downloadProxy) final 249 252 { 250 253 if (!m_client.didCancel) 251 254 return; 252 255 253 m_client.didCancel(toAPI( processPool), toAPI(downloadProxy), m_client.base.clientInfo);256 m_client.didCancel(toAPI(&processPool), toAPI(&downloadProxy), m_client.base.clientInfo); 254 257 } 255 258 256 void processDidCrash(WebProcessPool * processPool, DownloadProxy* downloadProxy) override259 void processDidCrash(WebProcessPool& processPool, DownloadProxy& downloadProxy) final 257 260 { 258 261 if (!m_client.processDidCrash) 259 262 return; 260 263 261 m_client.processDidCrash(toAPI( processPool), toAPI(downloadProxy), m_client.base.clientInfo);262 } 263 264 void willSendRequest(WebProcessPool * processPool, DownloadProxy* downloadProxy, const ResourceRequest& request, const ResourceResponse&, WTF::Function<void(const ResourceRequest&)>&& callback) override264 m_client.processDidCrash(toAPI(&processPool), toAPI(&downloadProxy), m_client.base.clientInfo); 265 } 266 267 void willSendRequest(WebProcessPool& processPool, DownloadProxy& downloadProxy, ResourceRequest&& request, const ResourceResponse&, Function<void(ResourceRequest&&)>&& callback) final 265 268 { 266 269 if (m_client.didReceiveServerRedirect) 267 m_client.didReceiveServerRedirect(toAPI( processPool), toAPI(downloadProxy), toURLRef(request.url().string().impl()), m_client.base.clientInfo);268 269 callback( request);270 m_client.didReceiveServerRedirect(toAPI(&processPool), toAPI(&downloadProxy), toURLRef(request.url().string().impl()), m_client.base.clientInfo); 271 272 callback(WTFMove(request)); 270 273 } 271 274 -
trunk/Source/WebKit/UIProcess/API/glib/WebKitDownloadClient.cpp
r218487 r223730 41 41 42 42 private: 43 void didStart(WebProcessPool *, DownloadProxy*downloadProxy) override43 void didStart(WebProcessPool&, DownloadProxy& downloadProxy) override 44 44 { 45 GRefPtr<WebKitDownload> download = webkitWebContextGetOrCreateDownload( downloadProxy);45 GRefPtr<WebKitDownload> download = webkitWebContextGetOrCreateDownload(&downloadProxy); 46 46 webkitWebContextDownloadStarted(m_webContext, download.get()); 47 47 } 48 48 49 void didReceiveAuthenticationChallenge(WebProcessPool *, DownloadProxy* downloadProxy, AuthenticationChallengeProxy*authenticationChallenge) override49 void didReceiveAuthenticationChallenge(WebProcessPool&, DownloadProxy& downloadProxy, AuthenticationChallengeProxy& authenticationChallenge) override 50 50 { 51 GRefPtr<WebKitDownload> download = webkitWebContextGetOrCreateDownload( downloadProxy);51 GRefPtr<WebKitDownload> download = webkitWebContextGetOrCreateDownload(&downloadProxy); 52 52 if (webkitDownloadIsCancelled(download.get())) 53 53 return; … … 55 55 // FIXME: Add API to handle authentication of downloads without a web view associted. 56 56 if (auto* webView = webkit_download_get_web_view(download.get())) 57 webkitWebViewHandleAuthenticationChallenge(webView, authenticationChallenge);57 webkitWebViewHandleAuthenticationChallenge(webView, &authenticationChallenge); 58 58 } 59 59 60 void didReceiveResponse(WebProcessPool *, DownloadProxy*downloadProxy, const ResourceResponse& resourceResponse) override60 void didReceiveResponse(WebProcessPool&, DownloadProxy& downloadProxy, const ResourceResponse& resourceResponse) override 61 61 { 62 GRefPtr<WebKitDownload> download = webkitWebContextGetOrCreateDownload( downloadProxy);62 GRefPtr<WebKitDownload> download = webkitWebContextGetOrCreateDownload(&downloadProxy); 63 63 if (webkitDownloadIsCancelled(download.get())) 64 64 return; … … 68 68 } 69 69 70 void didReceiveData(WebProcessPool *, DownloadProxy*downloadProxy, uint64_t length) override70 void didReceiveData(WebProcessPool&, DownloadProxy& downloadProxy, uint64_t length) override 71 71 { 72 GRefPtr<WebKitDownload> download = webkitWebContextGetOrCreateDownload( downloadProxy);72 GRefPtr<WebKitDownload> download = webkitWebContextGetOrCreateDownload(&downloadProxy); 73 73 webkitDownloadNotifyProgress(download.get(), length); 74 74 } 75 75 76 String decideDestinationWithSuggestedFilename(WebProcessPool*, DownloadProxy* downloadProxy, const String& filename, bool& allowOverwrite) override76 void decideDestinationWithSuggestedFilename(WebProcessPool&, DownloadProxy& downloadProxy, const String& filename, Function<void(AllowOverwrite, String)>&& completionHandler) override 77 77 { 78 GRefPtr<WebKitDownload> download = webkitWebContextGetOrCreateDownload(downloadProxy); 79 return webkitDownloadDecideDestinationWithSuggestedFilename(download.get(), filename.utf8(), allowOverwrite); 78 GRefPtr<WebKitDownload> download = webkitWebContextGetOrCreateDownload(&downloadProxy); 79 bool allowOverwrite = false; 80 String destination = webkitDownloadDecideDestinationWithSuggestedFilename(download.get(), filename.utf8(), allowOverwrite); 81 completionHandler(allowOverwrite ? AllowOverwrite::Yes : AllowOverwrite::No, destination); 80 82 } 81 83 82 void didCreateDestination(WebProcessPool *, DownloadProxy*downloadProxy, const String& path) override84 void didCreateDestination(WebProcessPool&, DownloadProxy& downloadProxy, const String& path) override 83 85 { 84 GRefPtr<WebKitDownload> download = webkitWebContextGetOrCreateDownload( downloadProxy);86 GRefPtr<WebKitDownload> download = webkitWebContextGetOrCreateDownload(&downloadProxy); 85 87 webkitDownloadDestinationCreated(download.get(), path); 86 88 } 87 89 88 void didFail(WebProcessPool *, DownloadProxy*downloadProxy, const ResourceError& error) override90 void didFail(WebProcessPool&, DownloadProxy& downloadProxy, const ResourceError& error) override 89 91 { 90 GRefPtr<WebKitDownload> download = webkitWebContextGetOrCreateDownload( downloadProxy);92 GRefPtr<WebKitDownload> download = webkitWebContextGetOrCreateDownload(&downloadProxy); 91 93 if (webkitDownloadIsCancelled(download.get())) { 92 94 // Cancellation takes precedence over other errors. … … 94 96 } else 95 97 webkitDownloadFailed(download.get(), error); 96 webkitWebContextRemoveDownload( downloadProxy);98 webkitWebContextRemoveDownload(&downloadProxy); 97 99 } 98 100 99 void didCancel(WebProcessPool *, DownloadProxy*downloadProxy) override101 void didCancel(WebProcessPool&, DownloadProxy& downloadProxy) override 100 102 { 101 GRefPtr<WebKitDownload> download = webkitWebContextGetOrCreateDownload( downloadProxy);103 GRefPtr<WebKitDownload> download = webkitWebContextGetOrCreateDownload(&downloadProxy); 102 104 webkitDownloadCancelled(download.get()); 103 webkitWebContextRemoveDownload( downloadProxy);105 webkitWebContextRemoveDownload(&downloadProxy); 104 106 } 105 107 106 void didFinish(WebProcessPool *, DownloadProxy*downloadProxy) override108 void didFinish(WebProcessPool&, DownloadProxy& downloadProxy) override 107 109 { 108 GRefPtr<WebKitDownload> download = webkitWebContextGetOrCreateDownload( downloadProxy);110 GRefPtr<WebKitDownload> download = webkitWebContextGetOrCreateDownload(&downloadProxy); 109 111 webkitDownloadFinished(download.get()); 110 webkitWebContextRemoveDownload( downloadProxy);112 webkitWebContextRemoveDownload(&downloadProxy); 111 113 } 112 114 -
trunk/Source/WebKit/UIProcess/Cocoa/DownloadClient.h
r221749 r223730 24 24 */ 25 25 26 #ifndef DownloadClient_h 27 #define DownloadClient_h 26 #pragma once 28 27 29 28 #import "WKFoundation.h" … … 42 41 43 42 namespace WebKit { 44 43 45 44 class DownloadClient final : public API::DownloadClient { 46 45 public: … … 49 48 private: 50 49 // From API::DownloadClient 51 void didStart(WebProcessPool *, DownloadProxy*) final;52 void didReceiveResponse(WebProcessPool *, DownloadProxy*, const WebCore::ResourceResponse&) final;53 void didReceiveData(WebProcessPool *, DownloadProxy*, uint64_t length) final;54 String decideDestinationWithSuggestedFilename(WebProcessPool*, DownloadProxy*, const String& filename, bool& allowOverwriteParam) final;55 void didFinish(WebProcessPool *, DownloadProxy*) final;56 void didFail(WebProcessPool *, DownloadProxy*, const WebCore::ResourceError&) final;57 void didCancel(WebProcessPool *, DownloadProxy*) final;58 void willSendRequest(WebProcessPool *, DownloadProxy*, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&, WTF::Function<void(const WebCore::ResourceRequest&)>&&) final;50 void didStart(WebProcessPool&, DownloadProxy&) final; 51 void didReceiveResponse(WebProcessPool&, DownloadProxy&, const WebCore::ResourceResponse&) final; 52 void didReceiveData(WebProcessPool&, DownloadProxy&, uint64_t length) final; 53 void decideDestinationWithSuggestedFilename(WebProcessPool&, DownloadProxy&, const String& suggestedFilename, Function<void(AllowOverwrite, String)>&&) final; 54 void didFinish(WebProcessPool&, DownloadProxy&) final; 55 void didFail(WebProcessPool&, DownloadProxy&, const WebCore::ResourceError&) final; 56 void didCancel(WebProcessPool&, DownloadProxy&) final; 57 void willSendRequest(WebProcessPool&, DownloadProxy&, WebCore::ResourceRequest&&, const WebCore::ResourceResponse&, Function<void(WebCore::ResourceRequest&&)>&&) final; 59 58 60 59 WeakObjCPtr<id <_WKDownloadDelegate>> m_delegate; … … 75 74 76 75 #endif 77 78 #endif // DownloadClient_h -
trunk/Source/WebKit/UIProcess/Cocoa/DownloadClient.mm
r221749 r223730 57 57 } 58 58 59 void DownloadClient::didStart(WebProcessPool *, DownloadProxy*downloadProxy)59 void DownloadClient::didStart(WebProcessPool&, DownloadProxy& downloadProxy) 60 60 { 61 61 if (m_delegateMethods.downloadDidStart) 62 [m_delegate.get() _downloadDidStart:wrapper( *downloadProxy)];62 [m_delegate.get() _downloadDidStart:wrapper(downloadProxy)]; 63 63 } 64 64 65 void DownloadClient::didReceiveResponse(WebProcessPool *, DownloadProxy*downloadProxy, const WebCore::ResourceResponse& response)65 void DownloadClient::didReceiveResponse(WebProcessPool&, DownloadProxy& downloadProxy, const WebCore::ResourceResponse& response) 66 66 { 67 67 if (m_delegateMethods.downloadDidReceiveResponse) 68 [m_delegate.get() _download:wrapper( *downloadProxy) didReceiveResponse:response.nsURLResponse()];68 [m_delegate.get() _download:wrapper(downloadProxy) didReceiveResponse:response.nsURLResponse()]; 69 69 } 70 70 71 void DownloadClient::didReceiveData(WebProcessPool *, DownloadProxy*downloadProxy, uint64_t length)71 void DownloadClient::didReceiveData(WebProcessPool&, DownloadProxy& downloadProxy, uint64_t length) 72 72 { 73 73 if (m_delegateMethods.downloadDidReceiveData) 74 [m_delegate.get() _download:wrapper( *downloadProxy) didReceiveData:length];74 [m_delegate.get() _download:wrapper(downloadProxy) didReceiveData:length]; 75 75 } 76 76 77 String DownloadClient::decideDestinationWithSuggestedFilename(WebProcessPool*, DownloadProxy* downloadProxy, const String& filename, bool& allowOverwriteParam)77 void DownloadClient::decideDestinationWithSuggestedFilename(WebProcessPool&, DownloadProxy& downloadProxy, const String& filename, Function<void(AllowOverwrite, String)>&& completionHandler) 78 78 { 79 79 if (!m_delegateMethods.downloadDecideDestinationWithSuggestedFilenameAllowOverwrite) 80 return String();81 80 return completionHandler(AllowOverwrite::No, { }); 81 82 82 BOOL allowOverwrite = NO; 83 NSString *destination = [m_delegate.get() _download:wrapper(*downloadProxy) decideDestinationWithSuggestedFilename:filename allowOverwrite:&allowOverwrite]; 84 allowOverwriteParam = allowOverwrite; 85 return destination; 83 NSString *destination = [m_delegate.get() _download:wrapper(downloadProxy) decideDestinationWithSuggestedFilename:filename allowOverwrite:&allowOverwrite]; 84 completionHandler(allowOverwrite ? AllowOverwrite::Yes : AllowOverwrite::No, destination); 86 85 } 87 86 88 void DownloadClient::didFinish(WebProcessPool *, DownloadProxy*downloadProxy)87 void DownloadClient::didFinish(WebProcessPool&, DownloadProxy& downloadProxy) 89 88 { 90 89 if (m_delegateMethods.downloadDidFinish) 91 [m_delegate.get() _downloadDidFinish:wrapper( *downloadProxy)];90 [m_delegate.get() _downloadDidFinish:wrapper(downloadProxy)]; 92 91 } 93 92 94 void DownloadClient::didFail(WebProcessPool *, DownloadProxy*downloadProxy, const WebCore::ResourceError& error)93 void DownloadClient::didFail(WebProcessPool&, DownloadProxy& downloadProxy, const WebCore::ResourceError& error) 95 94 { 96 95 if (m_delegateMethods.downloadDidFail) 97 [m_delegate.get() _download:wrapper( *downloadProxy) didFailWithError:error.nsError()];96 [m_delegate.get() _download:wrapper(downloadProxy) didFailWithError:error.nsError()]; 98 97 } 99 98 100 void DownloadClient::didCancel(WebProcessPool *, DownloadProxy*downloadProxy)99 void DownloadClient::didCancel(WebProcessPool&, DownloadProxy& downloadProxy) 101 100 { 102 101 if (m_delegateMethods.downloadDidCancel) 103 [m_delegate.get() _downloadDidCancel:wrapper( *downloadProxy)];102 [m_delegate.get() _downloadDidCancel:wrapper(downloadProxy)]; 104 103 } 105 104 106 void DownloadClient::willSendRequest(WebProcessPool *, DownloadProxy* downloadProxy, const WebCore::ResourceRequest& request, const WebCore::ResourceResponse&, WTF::Function<void(const WebCore::ResourceRequest&)>&& callback)105 void DownloadClient::willSendRequest(WebProcessPool&, DownloadProxy& downloadProxy, WebCore::ResourceRequest&& request, const WebCore::ResourceResponse&, Function<void(WebCore::ResourceRequest&&)>&& callback) 107 106 { 108 107 if (m_delegateMethods.downloadDidReceiveServerRedirectToURL) 109 [m_delegate.get() _download:wrapper( *downloadProxy) didReceiveServerRedirectToURL:[NSURL _web_URLWithWTFString:request.url().string()]];108 [m_delegate.get() _download:wrapper(downloadProxy) didReceiveServerRedirectToURL:[NSURL _web_URLWithWTFString:request.url().string()]]; 110 109 111 callback( request);110 callback(WTFMove(request)); 112 111 } 113 112 -
trunk/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp
r222308 r223730 90 90 return; 91 91 92 m_processPool->downloadClient().processDidCrash( m_processPool.get(),this);92 m_processPool->downloadClient().processDidCrash(*m_processPool, *this); 93 93 } 94 94 … … 114 114 return; 115 115 116 m_processPool->downloadClient().didStart( m_processPool.get(),this);116 m_processPool->downloadClient().didStart(*m_processPool, *this); 117 117 } 118 118 … … 122 122 return; 123 123 124 RefPtr<AuthenticationChallengeProxy> authenticationChallengeProxy = AuthenticationChallengeProxy::create(authenticationChallenge, challengeID, m_processPool->networkingProcessConnection()); 125 126 m_processPool->downloadClient().didReceiveAuthenticationChallenge(m_processPool.get(), this, authenticationChallengeProxy.get()); 127 } 128 129 #if USE(NETWORK_SESSION) && USE(PROTECTION_SPACE_AUTH_CALLBACK) 130 void DownloadProxy::canAuthenticateAgainstProtectionSpace(const ProtectionSpace& protectionSpace) 131 { 132 if (!m_processPool) 133 return; 134 135 auto* networkProcessProxy = m_processPool->networkProcess(); 136 if (!networkProcessProxy) 137 return; 138 139 bool result = m_processPool->downloadClient().canAuthenticateAgainstProtectionSpace(getPtr(WebProtectionSpace::create(protectionSpace))); 140 141 networkProcessProxy->send(Messages::NetworkProcess::ContinueCanAuthenticateAgainstProtectionSpaceDownload(m_downloadID, result), 0); 142 } 143 #endif 144 145 void DownloadProxy::willSendRequest(const ResourceRequest& proposedRequest, const ResourceResponse& redirectResponse) 146 { 147 if (!m_processPool) 148 return; 149 150 m_processPool->downloadClient().willSendRequest(m_processPool.get(), this, proposedRequest, redirectResponse, [this, protectedThis = makeRef(*this)](const ResourceRequest& newRequest) { 124 auto authenticationChallengeProxy = AuthenticationChallengeProxy::create(authenticationChallenge, challengeID, m_processPool->networkingProcessConnection()); 125 126 m_processPool->downloadClient().didReceiveAuthenticationChallenge(*m_processPool, *this, authenticationChallengeProxy.get()); 127 } 128 129 void DownloadProxy::willSendRequest(ResourceRequest&& proposedRequest, const ResourceResponse& redirectResponse) 130 { 131 if (!m_processPool) 132 return; 133 134 m_processPool->downloadClient().willSendRequest(*m_processPool, *this, WTFMove(proposedRequest), redirectResponse, [this, protectedThis = makeRef(*this)](ResourceRequest&& newRequest) { 151 135 m_redirectChain.append(newRequest.url()); 152 136 … … 176 160 #endif 177 161 178 m_processPool->downloadClient().didReceiveResponse( m_processPool.get(),this, response);162 m_processPool->downloadClient().didReceiveResponse(*m_processPool, *this, response); 179 163 } 180 164 … … 184 168 return; 185 169 186 m_processPool->downloadClient().didReceiveData(m_processPool.get(), this, length); 187 } 188 170 m_processPool->downloadClient().didReceiveData(*m_processPool, *this, length); 171 } 172 173 #if !USE(NETWORK_SESSION) 189 174 void DownloadProxy::shouldDecodeSourceDataOfMIMEType(const String& mimeType, bool& result) 190 175 { … … 194 179 return; 195 180 196 result = m_processPool->downloadClient().shouldDecodeSourceDataOfMIMEType(m_processPool.get(), this, mimeType); 197 } 181 result = m_processPool->downloadClient().shouldDecodeSourceDataOfMIMEType(*m_processPool, *this, mimeType); 182 } 183 #endif 198 184 199 185 void DownloadProxy::decideDestinationWithSuggestedFilenameAsync(DownloadID downloadID, const String& suggestedFilename) 200 186 { 201 bool allowOverwrite = false; 187 if (!m_processPool) 188 return; 202 189 203 if (!m_processPool) 204 return; 205 206 String destination = m_processPool->downloadClient().decideDestinationWithSuggestedFilename(m_processPool.get(), this, suggestedFilename, allowOverwrite); 207 208 SandboxExtension::Handle sandboxExtensionHandle; 209 if (!destination.isNull()) 210 SandboxExtension::createHandle(destination, SandboxExtension::Type::ReadWrite, sandboxExtensionHandle); 211 212 if (NetworkProcessProxy* networkProcess = m_processPool->networkProcess()) 213 networkProcess->send(Messages::NetworkProcess::ContinueDecidePendingDownloadDestination(downloadID, destination, sandboxExtensionHandle, allowOverwrite), 0); 190 m_processPool->downloadClient().decideDestinationWithSuggestedFilename(*m_processPool, *this, suggestedFilename, [this, protectedThis = makeRef(*this), downloadID = downloadID] (AllowOverwrite allowOverwrite, String destination) { 191 SandboxExtension::Handle sandboxExtensionHandle; 192 if (!destination.isNull()) 193 SandboxExtension::createHandle(destination, SandboxExtension::Type::ReadWrite, sandboxExtensionHandle); 194 195 if (auto* networkProcess = m_processPool->networkProcess()) 196 networkProcess->send(Messages::NetworkProcess::ContinueDecidePendingDownloadDestination(downloadID, destination, sandboxExtensionHandle, allowOverwrite == AllowOverwrite::Yes), 0); 197 }); 214 198 } 215 199 216 200 #if !USE(NETWORK_SESSION) 217 201 218 void DownloadProxy::decideDestinationWithSuggestedFilename(const String& filename, const String& mimeType, String& destination, bool& allowOverwrite, SandboxExtension::Handle& sandboxExtensionHandle) 219 { 220 allowOverwrite = false; 221 202 void DownloadProxy::decideDestinationWithSuggestedFilename(const String& filename, const String& mimeType, Ref<Messages::DownloadProxy::DecideDestinationWithSuggestedFilename::DelayedReply>&& reply) 203 { 222 204 if (!m_processPool) 223 205 return; 224 206 225 207 String suggestedFilename = MIMETypeRegistry::appendFileExtensionIfNecessary(m_suggestedFilename.isEmpty() ? filename : m_suggestedFilename, mimeType); 226 destination = m_processPool->downloadClient().decideDestinationWithSuggestedFilename(m_processPool.get(), this, suggestedFilename, allowOverwrite); 227 228 if (!destination.isNull()) 229 SandboxExtension::createHandle(destination, SandboxExtension::Type::ReadWrite, sandboxExtensionHandle); 208 m_processPool->downloadClient().decideDestinationWithSuggestedFilename(*m_processPool, *this, filename, [reply = WTFMove(reply)] (AllowOverwrite allowOverwrite, String destination) { 209 SandboxExtension::Handle sandboxExtensionHandle; 210 if (!destination.isNull()) 211 SandboxExtension::createHandle(destination, SandboxExtension::Type::ReadWrite, sandboxExtensionHandle); 212 reply->send(destination, allowOverwrite == AllowOverwrite::Yes, sandboxExtensionHandle); 213 }); 230 214 } 231 215 … … 237 221 return; 238 222 239 m_processPool->downloadClient().didCreateDestination( m_processPool.get(),this, path);223 m_processPool->downloadClient().didCreateDestination(*m_processPool, *this, path); 240 224 } 241 225 … … 245 229 return; 246 230 247 m_processPool->downloadClient().didFinish( m_processPool.get(),this);231 m_processPool->downloadClient().didFinish(*m_processPool, *this); 248 232 249 233 // This can cause the DownloadProxy object to be deleted. … … 266 250 m_resumeData = createData(resumeData); 267 251 268 m_processPool->downloadClient().didFail( m_processPool.get(),this, error);252 m_processPool->downloadClient().didFail(*m_processPool, *this, error); 269 253 270 254 // This can cause the DownloadProxy object to be deleted. … … 276 260 m_resumeData = createData(resumeData); 277 261 278 m_processPool->downloadClient().didCancel( m_processPool.get(),this);262 m_processPool->downloadClient().didCancel(*m_processPool, *this); 279 263 280 264 // This can cause the DownloadProxy object to be deleted. -
trunk/Source/WebKit/UIProcess/Downloads/DownloadProxy.h
r222468 r223730 24 24 */ 25 25 26 #ifndef DownloadProxy_h 27 #define DownloadProxy_h 26 #pragma once 28 27 29 28 #include "APIObject.h" 30 29 #include "Connection.h" 31 30 #include "DownloadID.h" 31 #include "DownloadProxyMessages.h" 32 32 #include "SandboxExtension.h" 33 33 #include <WebCore/ResourceRequest.h> … … 98 98 void didFail(const WebCore::ResourceError&, const IPC::DataReference& resumeData); 99 99 void didCancel(const IPC::DataReference& resumeData); 100 void willSendRequest(const WebCore::ResourceRequest& redirectRequest, const WebCore::ResourceResponse& redirectResponse); 101 #if USE(NETWORK_SESSION) 102 #if USE(PROTECTION_SPACE_AUTH_CALLBACK) 103 void canAuthenticateAgainstProtectionSpace(const WebCore::ProtectionSpace&); 104 #endif 105 #else 106 void decideDestinationWithSuggestedFilename(const String& filename, const String& mimeType, String& destination, bool& allowOverwrite, SandboxExtension::Handle& sandboxExtensionHandle); 100 void willSendRequest(WebCore::ResourceRequest&& redirectRequest, const WebCore::ResourceResponse& redirectResponse); 101 #if !USE(NETWORK_SESSION) 102 void decideDestinationWithSuggestedFilename(const String& filename, const String& mimeType, Ref<Messages::DownloadProxy::DecideDestinationWithSuggestedFilename::DelayedReply>&&); 107 103 #endif 108 104 void decideDestinationWithSuggestedFilenameAsync(DownloadID, const String& suggestedFilename); … … 122 118 123 119 } // namespace WebKit 124 125 #endif // DownloadProxy_h -
trunk/Source/WebKit/UIProcess/Downloads/DownloadProxy.messages.in
r221749 r223730 25 25 DidReceiveAuthenticationChallenge(WebCore::AuthenticationChallenge challenge, uint64_t challengeID) 26 26 WillSendRequest(WebCore::ResourceRequest redirectRequest, WebCore::ResourceResponse redirectResponse)) 27 #if USE(NETWORK_SESSION)28 #if USE(PROTECTION_SPACE_AUTH_CALLBACK)29 CanAuthenticateAgainstProtectionSpace(WebCore::ProtectionSpace protectionSpace)30 #endif31 #endif32 27 DecideDestinationWithSuggestedFilenameAsync(WebKit::DownloadID downloadID, String suggestedFilename) 33 28 34 29 DidReceiveResponse(WebCore::ResourceResponse response) 35 30 DidReceiveData(uint64_t length) 31 #if !USE(NETWORK_SESSION) 36 32 ShouldDecodeSourceDataOfMIMEType(String mimeType) -> (bool result) 37 #if !USE(NETWORK_SESSION) 38 DecideDestinationWithSuggestedFilename(String filename, String mimeType) -> (String destination, bool allowOverwrite, WebKit::SandboxExtension::Handle sandboxExtensionHandle) 33 DecideDestinationWithSuggestedFilename(String filename, String mimeType) -> (String destination, bool allowOverwrite, WebKit::SandboxExtension::Handle sandboxExtensionHandle) Delayed 39 34 #endif 40 35 DidCreateDestination(String path)
Note: See TracChangeset
for help on using the changeset viewer.