Changeset 169782 in webkit
- Timestamp:
- Jun 10, 2014 5:01:18 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 33 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r169781 r169782 1 2014-06-10 Dan Bernstein <mitz@apple.com> 2 3 WebCore part of [Cocoa] Handling authentication challenges should not require multiple delegate methods 4 https://bugs.webkit.org/show_bug.cgi?id=133697 5 6 Reviewed by Anders Carlsson. 7 8 * platform/network/AuthenticationClient.h: Declared new virtual member functions for 9 requesting default handling of a challenge and rejecting a challenge. 10 * platform/network/ResourceHandle.h: Override new AuthenticationClient functions. 11 * platform/network/cf/ResourceHandleCFNet.cpp: 12 (WebCore::ResourceHandle::receivedRequestToPerformDefaultHandling): Added. Calls 13 CFURLConnectionPerformDefaultHandlingForChallenge. 14 (WebCore::ResourceHandle::receivedChallengeRejection): Added. Calls 15 CFURLConnectionRejectChallenge. 16 * platform/network/cf/SocketStreamHandle.h: Override new AuthenticationClient functions. 17 * platform/network/cf/SocketStreamHandleCFNet.cpp: 18 (WebCore::SocketStreamHandle::receivedRequestToPerformDefaultHandling): Added empty 19 override. 20 (WebCore::SocketStreamHandle::receivedChallengeRejection): Ditto. 21 1 22 2014-06-09 Brent Fulgham <bfulgham@apple.com> 2 23 -
trunk/Source/WebCore/platform/network/AuthenticationClient.h
r50772 r169782 37 37 virtual void receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&) = 0; 38 38 virtual void receivedCancellation(const AuthenticationChallenge&) = 0; 39 virtual void receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&) = 0; 40 virtual void receivedChallengeRejection(const AuthenticationChallenge&) = 0; 39 41 40 42 void ref() { refAuthenticationClient(); } -
trunk/Source/WebCore/platform/network/ResourceHandle.h
r169085 r169782 124 124 virtual void receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&) override; 125 125 virtual void receivedCancellation(const AuthenticationChallenge&) override; 126 virtual void receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&) override; 127 virtual void receivedChallengeRejection(const AuthenticationChallenge&) override; 126 128 #endif 127 129 -
trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp
r169243 r169782 455 455 } 456 456 457 void ResourceHandle::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge& challenge) 458 { 459 LOG(Network, "CFNet - receivedRequestToPerformDefaultHandling()"); 460 ASSERT(!challenge.isNull()); 461 ASSERT(challenge.cfURLAuthChallengeRef()); 462 if (challenge != d->m_currentWebChallenge) 463 return; 464 465 CFURLConnectionPerformDefaultHandlingForChallenge(d->m_connection.get(), challenge.cfURLAuthChallengeRef()); 466 467 clearAuthentication(); 468 } 469 470 void ResourceHandle::receivedChallengeRejection(const AuthenticationChallenge& challenge) 471 { 472 LOG(Network, "CFNet - receivedChallengeRejection()"); 473 ASSERT(!challenge.isNull()); 474 ASSERT(challenge.cfURLAuthChallengeRef()); 475 if (challenge != d->m_currentWebChallenge) 476 return; 477 478 CFURLConnectionRejectChallenge(d->m_connection.get(), challenge.cfURLAuthChallengeRef()); 479 480 clearAuthentication(); 481 } 482 457 483 CFURLStorageSessionRef ResourceHandle::storageSession() const 458 484 { -
trunk/Source/WebCore/platform/network/cf/SocketStreamHandle.h
r162774 r169782 89 89 virtual void receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&); 90 90 virtual void receivedCancellation(const AuthenticationChallenge&); 91 virtual void receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&); 92 virtual void receivedChallengeRejection(const AuthenticationChallenge&); 91 93 92 94 virtual void refAuthenticationClient() { ref(); } -
trunk/Source/WebCore/platform/network/cf/SocketStreamHandleCFNet.cpp
r164358 r169782 664 664 } 665 665 666 void SocketStreamHandle::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&) 667 { 668 } 669 670 void SocketStreamHandle::receivedChallengeRejection(const AuthenticationChallenge&) 671 { 672 } 673 666 674 unsigned short SocketStreamHandle::port() const 667 675 { -
trunk/Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp
r165996 r169782 283 283 } 284 284 285 void ResourceHandle::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&) 286 { 287 ASSERT_NOT_REACHED(); 288 } 289 290 void ResourceHandle::receivedChallengeRejection(const AuthenticationChallenge&) 291 { 292 ASSERT_NOT_REACHED(); 293 } 294 285 295 } // namespace WebCore 286 296 -
trunk/Source/WebCore/platform/network/curl/SocketStreamHandle.h
r156550 r169782 62 62 void receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&); 63 63 void receivedCancellation(const AuthenticationChallenge&); 64 void receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&); 65 void receivedChallengeRejection(const AuthenticationChallenge&); 64 66 }; 65 67 -
trunk/Source/WebCore/platform/network/curl/SocketStreamHandleCurl.cpp
r165996 r169782 89 89 } 90 90 91 void SocketStreamHandle::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&) 92 { 93 notImplemented(); 94 } 95 96 void SocketStreamHandle::receivedChallengeRejection(const AuthenticationChallenge&) 97 { 98 notImplemented(); 99 } 100 91 101 } // namespace WebCore 92 102 -
trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm
r169551 r169782 690 690 } 691 691 692 void ResourceHandle::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge& challenge) 693 { 694 LOG(Network, "Handle %p receivedRequestToPerformDefaultHandling", this); 695 696 ASSERT(!challenge.isNull()); 697 if (challenge != d->m_currentWebChallenge) 698 return; 699 700 [[d->m_currentMacChallenge sender] performDefaultHandlingForAuthenticationChallenge:d->m_currentMacChallenge]; 701 702 clearAuthentication(); 703 } 704 705 void ResourceHandle::receivedChallengeRejection(const AuthenticationChallenge& challenge) 706 { 707 LOG(Network, "Handle %p receivedChallengeRejection", this); 708 709 ASSERT(!challenge.isNull()); 710 if (challenge != d->m_currentWebChallenge) 711 return; 712 713 [[d->m_currentMacChallenge sender] rejectProtectionSpaceAndContinueWithChallenge:d->m_currentMacChallenge]; 714 715 clearAuthentication(); 716 } 717 692 718 void ResourceHandle::continueWillCacheResponse(NSCachedURLResponse *response) 693 719 { -
trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp
r169560 r169782 1195 1195 } 1196 1196 1197 void ResourceHandle::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&) 1198 { 1199 ASSERT_NOT_REACHED(); 1200 } 1201 1202 void ResourceHandle::receivedChallengeRejection(const AuthenticationChallenge&) 1203 { 1204 ASSERT_NOT_REACHED(); 1205 } 1206 1197 1207 static bool waitingToSendRequest(ResourceHandle* handle) 1198 1208 { -
trunk/Source/WebCore/platform/network/soup/SocketStreamHandle.h
r168351 r169782 79 79 void receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&); 80 80 void receivedCancellation(const AuthenticationChallenge&); 81 void receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&); 82 void receivedChallengeRejection(const AuthenticationChallenge&); 83 81 84 void beginWaitingForSocketWritability(); 82 85 void stopWaitingForSocketWritability(); -
trunk/Source/WebCore/platform/network/soup/SocketStreamHandleSoup.cpp
r168351 r169782 229 229 } 230 230 231 void SocketStreamHandle::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&) 232 { 233 notImplemented(); 234 } 235 236 void SocketStreamHandle::receivedChallengeRejection(const AuthenticationChallenge&) 237 { 238 notImplemented(); 239 } 240 231 241 void SocketStreamHandle::beginWaitingForSocketWritability() 232 242 { -
trunk/Source/WebCore/platform/network/win/SocketStreamHandle.h
r156550 r169782 62 62 void receivedRequestToContinueWithoutCredential(const AuthenticationChallenge&); 63 63 void receivedCancellation(const AuthenticationChallenge&); 64 void receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&); 65 void receivedChallengeRejection(const AuthenticationChallenge&); 64 66 }; 65 67 -
trunk/Source/WebCore/platform/network/win/SocketStreamHandleWin.cpp
r156550 r169782 87 87 } 88 88 89 void SocketStreamHandle::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&) 90 { 91 notImplemented(); 92 } 93 94 void SocketStreamHandle::receivedChallengeRejection(const AuthenticationChallenge&) 95 { 96 notImplemented(); 97 } 98 89 99 } // namespace WebCore -
trunk/Source/WebKit2/ChangeLog
r169775 r169782 1 2014-06-10 Dan Bernstein <mitz@apple.com> 2 3 WebKit2 part of [Cocoa] Handling authentication challenges should not require multiple delegate methods 4 https://bugs.webkit.org/show_bug.cgi?id=133697 5 6 Reviewed by Anders Carlsson. 7 8 * Shared/Authentication/AuthenticationManager.cpp: 9 (WebKit::AuthenticationManager::performDefaultHandling): Added. Calls the new 10 AuthenticationClient function receivedRequestToPerformDefaultHandling. 11 (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue): Added. Calls the new 12 AuthenticationClient function receivedChallengeRejection. 13 * Shared/Authentication/AuthenticationManager.h: 14 * Shared/Authentication/AuthenticationManager.messages.in: Added new messages 15 PerformDefaultHandling and RejectProtectionSpaceAndContinue. 16 17 * Shared/Downloads/DownloadAuthenticationClient.h: Override new AuthenticationClient member 18 functions. 19 20 * Shared/Downloads/ios/DownloadIOS.mm: 21 (WebKit::Download::receivedRequestToPerformDefaultHandling): Added empty implementation. 22 (WebKit::Download::receivedChallengeRejection): Ditto. 23 24 * Shared/Downloads/mac/DownloadMac.mm: 25 (WebKit::Download::receivedRequestToPerformDefaultHandling): Added. Forwards to the sender. 26 (WebKit::Download::receivedChallengeRejection): Ditto. 27 28 * UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm: 29 (checkChallenge): Factored out a bit of code into this helper function. 30 (-[WKNSURLAuthenticationChallengeSender cancelAuthenticationChallenge:]): Use new helper. 31 (-[WKNSURLAuthenticationChallengeSender continueWithoutCredentialForAuthenticationChallenge:]): 32 Ditto. 33 (-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]): Ditto. 34 (-[WKNSURLAuthenticationChallengeSender performDefaultHandlingForAuthenticationChallenge:]): 35 Implemented this optional NSURLAuthenticationChallengeSender protocol method by forwarding 36 to the decision listener. 37 (-[WKNSURLAuthenticationChallengeSender rejectProtectionSpaceAndContinueWithChallenge:]): 38 Ditto. 39 40 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method. 41 42 * UIProcess/Authentication/AuthenticationChallengeProxy.cpp: 43 (WebKit::AuthenticationChallengeProxy::performDefaultHandling): Added. Sends a message to 44 the authentication manager. 45 (WebKit::AuthenticationChallengeProxy::rejectProtectionSpaceAndContinue): Ditto. 46 * UIProcess/Authentication/AuthenticationChallengeProxy.h: 47 48 * UIProcess/Authentication/AuthenticationDecisionListener.cpp: 49 (WebKit::AuthenticationDecisionListener::performDefaultHandling): Added. Forwards to the 50 authentication challenge proxy. 51 (WebKit::AuthenticationDecisionListener::rejectProtectionSpaceAndContinue): Ditto. 52 * UIProcess/Authentication/AuthenticationDecisionListener.h: 53 54 * UIProcess/Cocoa/NavigationState.h: Added flag in m_navigationDelegateMethods struct. 55 * UIProcess/Cocoa/NavigationState.mm: 56 (WebKit::NavigationState::setNavigationDelegate): Initialize 57 webViewWillSendRequestForAuthenticationChallenge flag in the delegate methods struct. 58 (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame): If 59 the delegate implements -_webView:willSendRequestForAuthenticationChallenge:, return true 60 here; the delegate will respond with -rejectProtectionSpaceAndContinueWithChallenge: if 61 it cannot authenticate. 62 (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): If the 63 delegate implements -_webView:willSendRequestForAuthenticationChallenge:, send that message. 64 1 65 2014-06-10 Timothy Horton <timothy_horton@apple.com> 2 66 -
trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.cpp
r164255 r169782 157 157 } 158 158 159 void AuthenticationManager::performDefaultHandling(uint64_t challengeID) 160 { 161 ASSERT(RunLoop::isMain()); 162 163 AuthenticationChallenge challenge = m_challenges.take(challengeID); 164 ASSERT(!challenge.isNull()); 165 AuthenticationClient* coreClient = challenge.authenticationClient(); 166 if (!coreClient) { 167 // This authentication challenge comes from a download. 168 Download::receivedRequestToPerformDefaultHandling(challenge); 169 return; 170 } 171 172 coreClient->receivedRequestToPerformDefaultHandling(challenge); 173 } 174 175 void AuthenticationManager::rejectProtectionSpaceAndContinue(uint64_t challengeID) 176 { 177 ASSERT(RunLoop::isMain()); 178 179 AuthenticationChallenge challenge = m_challenges.take(challengeID); 180 ASSERT(!challenge.isNull()); 181 AuthenticationClient* coreClient = challenge.authenticationClient(); 182 if (!coreClient) { 183 // This authentication challenge comes from a download. 184 Download::receivedChallengeRejection(challenge); 185 return; 186 } 187 188 coreClient->receivedChallengeRejection(challenge); 189 } 190 159 191 } // namespace WebKit -
trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.h
r162139 r169782 63 63 void continueWithoutCredentialForChallenge(uint64_t challengeID); 64 64 void cancelChallenge(uint64_t challengeID); 65 65 void performDefaultHandling(uint64_t challengeID); 66 void rejectProtectionSpaceAndContinue(uint64_t challengeID); 67 66 68 uint64_t outstandingAuthenticationChallengeCount() const { return m_challenges.size(); } 67 69 -
trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.messages.in
r160487 r169782 25 25 void ContinueWithoutCredentialForChallenge(uint64_t challengeID); 26 26 void CancelChallenge(uint64_t challengeID); 27 void PerformDefaultHandling(uint64_t challengeID); 28 void RejectProtectionSpaceAndContinue(uint64_t challengeID); 27 29 } -
trunk/Source/WebKit2/Shared/Downloads/Download.h
r165707 r169782 101 101 static void receivedRequestToContinueWithoutCredential(const WebCore::AuthenticationChallenge&); 102 102 static void receivedCancellation(const WebCore::AuthenticationChallenge&); 103 static void receivedRequestToPerformDefaultHandling(const WebCore::AuthenticationChallenge&); 104 static void receivedChallengeRejection(const WebCore::AuthenticationChallenge&); 103 105 104 106 void useCredential(const WebCore::AuthenticationChallenge&, const WebCore::Credential&); -
trunk/Source/WebKit2/Shared/Downloads/DownloadAuthenticationClient.cpp
r160101 r169782 54 54 } 55 55 56 void DownloadAuthenticationClient::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&) 57 { 58 // FIXME (119667): This can probably be just removed. 59 } 60 61 void DownloadAuthenticationClient::receivedChallengeRejection(const AuthenticationChallenge&) 62 { 63 // FIXME (119667): This can probably be just removed. 64 } 65 56 66 } // namespace WebKit -
trunk/Source/WebKit2/Shared/Downloads/DownloadAuthenticationClient.h
r140752 r169782 55 55 virtual void receivedRequestToContinueWithoutCredential(const WebCore::AuthenticationChallenge&); 56 56 virtual void receivedCancellation(const WebCore::AuthenticationChallenge&); 57 virtual void receivedRequestToPerformDefaultHandling(const WebCore::AuthenticationChallenge&) override; 58 virtual void receivedChallengeRejection(const WebCore::AuthenticationChallenge&) override; 57 59 58 60 virtual void refAuthenticationClient() { ref(); } -
trunk/Source/WebKit2/Shared/Downloads/ios/DownloadIOS.mm
r166206 r169782 170 170 } 171 171 172 void Download::receivedRequestToPerformDefaultHandling(const WebCore::AuthenticationChallenge&) 173 { 174 notImplemented(); 175 } 176 177 void Download::receivedChallengeRejection(const WebCore::AuthenticationChallenge&) 178 { 179 notImplemented(); 180 } 181 172 182 } // namespace WebKit 173 183 -
trunk/Source/WebKit2/Shared/Downloads/mac/DownloadMac.mm
r164776 r169782 126 126 } 127 127 128 void Download::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge& authenticationChallenge) 129 { 130 [authenticationChallenge.sender() performDefaultHandlingForAuthenticationChallenge:authenticationChallenge.nsURLAuthenticationChallenge()]; 131 } 132 133 void Download::receivedChallengeRejection(const AuthenticationChallenge& authenticationChallenge) 134 { 135 [authenticationChallenge.sender() rejectProtectionSpaceAndContinueWithChallenge:authenticationChallenge.nsURLAuthenticationChallenge()]; 136 } 137 128 138 } // namespace WebKit 129 139 -
trunk/Source/WebKit2/Shared/Downloads/soup/DownloadSoup.cpp
r169612 r169782 283 283 } 284 284 285 void Download::receivedRequestToPerformDefaultHandling(const AuthenticationChallenge&) 286 { 287 notImplemented(); 288 } 289 290 void Download::receivedChallengeRejection(const AuthenticationChallenge&) 291 { 292 notImplemented(); 293 } 294 285 295 } // namespace WebKit -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm
r160227 r169782 64 64 @implementation WKNSURLAuthenticationChallengeSender 65 65 66 - (void)cancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge 66 static void checkChallenge(NSURLAuthenticationChallenge *challenge) 67 67 { 68 68 if ([challenge class] != [WKNSURLAuthenticationChallenge class]) 69 69 [NSException raise:NSInvalidArgumentException format:@"The challenge was not sent by the receiver."]; 70 } 70 71 72 - (void)cancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge 73 { 74 checkChallenge(challenge); 71 75 AuthenticationChallengeProxy& webChallenge = ((WKNSURLAuthenticationChallenge *)challenge)._web_authenticationChallengeProxy; 72 76 webChallenge.listener()->cancel(); … … 75 79 - (void)continueWithoutCredentialForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge 76 80 { 77 if ([challenge class] != [WKNSURLAuthenticationChallenge class]) 78 [NSException raise:NSInvalidArgumentException format:@"The challenge was not sent by the receiver."]; 79 81 checkChallenge(challenge); 80 82 AuthenticationChallengeProxy& webChallenge = ((WKNSURLAuthenticationChallenge *)challenge)._web_authenticationChallengeProxy; 81 83 webChallenge.listener()->useCredential(nullptr); … … 84 86 - (void)useCredential:(NSURLCredential *)credential forAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge 85 87 { 86 if ([challenge class] != [WKNSURLAuthenticationChallenge class]) 87 [NSException raise:NSInvalidArgumentException format:@"The challenge was not sent by the receiver."]; 88 checkChallenge(challenge); 89 AuthenticationChallengeProxy& webChallenge = ((WKNSURLAuthenticationChallenge *)challenge)._web_authenticationChallengeProxy; 90 webChallenge.listener()->useCredential(WebCredential::create(core(credential)).get()); 91 } 88 92 93 - (void)performDefaultHandlingForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge 94 { 95 checkChallenge(challenge); 89 96 AuthenticationChallengeProxy& webChallenge = ((WKNSURLAuthenticationChallenge *)challenge)._web_authenticationChallengeProxy; 97 webChallenge.listener()->performDefaultHandling(); 98 } 90 99 91 webChallenge.listener()->useCredential(WebCredential::create(core(credential)).get()); 100 - (void)rejectProtectionSpaceAndContinueWithChallenge:(NSURLAuthenticationChallenge *)challenge 101 { 102 checkChallenge(challenge); 103 AuthenticationChallengeProxy& webChallenge = ((WKNSURLAuthenticationChallenge *)challenge)._web_authenticationChallengeProxy; 104 webChallenge.listener()->rejectProtectionSpaceAndContinue(); 92 105 } 93 106 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h
r169460 r169782 45 45 - (void)_webView:(WKWebView *)webView renderingProgressDidChange:(_WKRenderingProgressEvents)progressEvents; 46 46 47 - (void)_webView:(WKWebView *)webView willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge; 47 48 - (BOOL)_webView:(WKWebView *)webView canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace; 48 49 - (void)_webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge; -
trunk/Source/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.cpp
r161148 r169782 84 84 } 85 85 86 void AuthenticationChallengeProxy::performDefaultHandling() 87 { 88 if (!m_challengeID) 89 return; 90 91 m_connection->send(Messages::AuthenticationManager::PerformDefaultHandling(m_challengeID), 0); 92 93 m_challengeID = 0; 94 } 95 96 void AuthenticationChallengeProxy::rejectProtectionSpaceAndContinue() 97 { 98 if (!m_challengeID) 99 return; 100 101 m_connection->send(Messages::AuthenticationManager::RejectProtectionSpaceAndContinue(m_challengeID), 0); 102 103 m_challengeID = 0; 104 } 105 86 106 WebCredential* AuthenticationChallengeProxy::proposedCredential() const 87 107 { -
trunk/Source/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.h
r161148 r169782 53 53 void useCredential(WebCredential*); 54 54 void cancel(); 55 void performDefaultHandling(); 56 void rejectProtectionSpaceAndContinue(); 55 57 56 58 AuthenticationDecisionListener* listener() const { return m_listener.get(); } -
trunk/Source/WebKit2/UIProcess/Authentication/AuthenticationDecisionListener.cpp
r95901 r169782 53 53 } 54 54 55 void AuthenticationDecisionListener::performDefaultHandling() 56 { 57 if (m_challengeProxy) 58 m_challengeProxy->performDefaultHandling(); 59 } 60 61 void AuthenticationDecisionListener::rejectProtectionSpaceAndContinue() 62 { 63 if (m_challengeProxy) 64 m_challengeProxy->rejectProtectionSpaceAndContinue(); 65 } 66 55 67 void AuthenticationDecisionListener::detachChallenge() 56 68 { -
trunk/Source/WebKit2/UIProcess/Authentication/AuthenticationDecisionListener.h
r160384 r169782 45 45 void useCredential(WebCredential*); 46 46 void cancel(); 47 47 void performDefaultHandling(); 48 void rejectProtectionSpaceAndContinue(); 49 48 50 void detachChallenge(); 49 51 -
trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h
r169696 r169782 146 146 147 147 bool webViewRenderingProgressDidChange : 1; 148 bool webViewWillSendRequestForAuthenticationChallenge : 1; 148 149 bool webViewCanAuthenticateAgainstProtectionSpace : 1; 149 150 bool webViewDidReceiveAuthenticationChallenge : 1; -
trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm
r169696 r169782 127 127 m_navigationDelegateMethods.webViewNavigationDidFinishDocumentLoad = [delegate respondsToSelector:@selector(_webView:navigationDidFinishDocumentLoad:)]; 128 128 m_navigationDelegateMethods.webViewRenderingProgressDidChange = [delegate respondsToSelector:@selector(_webView:renderingProgressDidChange:)]; 129 m_navigationDelegateMethods.webViewWillSendRequestForAuthenticationChallenge = [delegate respondsToSelector:@selector(_webView:willSendRequestForAuthenticationChallenge:)]; 129 130 m_navigationDelegateMethods.webViewCanAuthenticateAgainstProtectionSpace = [delegate respondsToSelector:@selector(_webView:canAuthenticateAgainstProtectionSpace:)]; 130 131 m_navigationDelegateMethods.webViewDidReceiveAuthenticationChallenge = [delegate respondsToSelector:@selector(_webView:didReceiveAuthenticationChallenge:)]; … … 582 583 bool NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, WebKit::WebProtectionSpace* protectionSpace) 583 584 { 585 if (m_navigationState.m_navigationDelegateMethods.webViewWillSendRequestForAuthenticationChallenge) 586 return true; 587 584 588 if (!m_navigationState.m_navigationDelegateMethods.webViewCanAuthenticateAgainstProtectionSpace) 585 589 return false; … … 594 598 void NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, WebKit::AuthenticationChallengeProxy* authenticationChallenge) 595 599 { 600 if (m_navigationState.m_navigationDelegateMethods.webViewWillSendRequestForAuthenticationChallenge) { 601 auto navigationDelegate = m_navigationState.m_navigationDelegate.get(); 602 if (!navigationDelegate) 603 return; 604 605 [static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate.get()) _webView:m_navigationState.m_webView willSendRequestForAuthenticationChallenge:wrapper(*authenticationChallenge)]; 606 return; 607 } 608 596 609 if (!m_navigationState.m_navigationDelegateMethods.webViewDidReceiveAuthenticationChallenge) 597 610 return;
Note: See TracChangeset
for help on using the changeset viewer.