Changeset 164138 in webkit
- Timestamp:
- Feb 14, 2014 3:15:18 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r164132 r164138 1 2014-02-14 Anders Carlsson <andersca@apple.com> 2 3 Add SPI for authentication 4 https://bugs.webkit.org/show_bug.cgi?id=128847 5 6 Reviewed by Dan Bernstein. 7 8 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: 9 * UIProcess/Cocoa/NavigationState.h: 10 * UIProcess/Cocoa/NavigationState.mm: 11 (WebKit::NavigationState::setNavigationDelegate): 12 (WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame): 13 (WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): 14 1 15 2014-02-14 Anders Carlsson <andersca@apple.com> 2 16 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardList.mm
r164132 r164138 32 32 #import "WKNSArray.h" 33 33 34 WK_EXPORTNSString * const WKBackForwardListDidChangeNotification = @"WKBackForwardListDidChangeNotification";35 WK_EXPORTNSString * const WKBackForwardListAddedItemKey = @"WKBackForwardListAddedItemKey";36 WK_EXPORTNSString * const WKBackForwardListRemovedItemsKey = @"WKBackForwardListRemovedItemsKey";34 NSString * const WKBackForwardListDidChangeNotification = @"WKBackForwardListDidChangeNotification"; 35 NSString * const WKBackForwardListAddedItemKey = @"WKBackForwardListAddedItemKey"; 36 NSString * const WKBackForwardListRemovedItemsKey = @"WKBackForwardListRemovedItemsKey"; 37 37 38 38 using namespace WebKit; -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h
r164049 r164138 35 35 - (void)_webView:(WKWebView *)webView renderingProgressDidChange:(_WKRenderingProgressEvents)progressEvents; 36 36 37 - (BOOL)_webView:(WKWebView *)webView canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace; 38 - (void)_webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge; 39 37 40 @end 38 41 -
trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h
r164132 r164138 85 85 virtual void didFailLoadWithErrorForFrame(WebPageProxy*, WebFrameProxy*, uint64_t navigationID, const WebCore::ResourceError&, API::Object*) override; 86 86 virtual void didLayout(WebKit::WebPageProxy*, WebCore::LayoutMilestones, API::Object*) override; 87 virtual bool canAuthenticateAgainstProtectionSpaceInFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, WebKit::WebProtectionSpace*) override; 88 virtual void didReceiveAuthenticationChallengeInFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, WebKit::AuthenticationChallengeProxy*) override; 87 89 virtual void didChangeBackForwardList(WebKit::WebPageProxy*, WebKit::WebBackForwardListItem* addedItem, Vector<RefPtr<WebKit::WebBackForwardListItem>> removedItems) override; 88 90 … … 117 119 118 120 bool webViewRenderingProgressDidChange : 1; 121 bool webViewCanAuthenticateAgainstProtectionSpace : 1; 122 bool webViewDidReceiveAuthenticationChallenge : 1; 119 123 } m_navigationDelegateMethods; 120 124 -
trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm
r164132 r164138 34 34 #import "WKBackForwardListItemInternal.h" 35 35 #import "WKFrameInfoInternal.h" 36 #import "WKNSURLAuthenticationChallenge.h" 37 #import "WKNSURLProtectionSpace.h" 36 38 #import "WKNavigationActionInternal.h" 37 39 #import "WKNavigationDelegatePrivate.h" … … 88 90 89 91 m_navigationDelegateMethods.webViewRenderingProgressDidChange = [delegate respondsToSelector:@selector(_webView:renderingProgressDidChange:)]; 92 m_navigationDelegateMethods.webViewCanAuthenticateAgainstProtectionSpace = [delegate respondsToSelector:@selector(_webView:canAuthenticateAgainstProtectionSpace:)]; 93 m_navigationDelegateMethods.webViewDidReceiveAuthenticationChallenge = [delegate respondsToSelector:@selector(_webView:didReceiveAuthenticationChallenge:)]; 90 94 } 91 95 … … 375 379 } 376 380 381 bool NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, WebKit::WebProtectionSpace* protectionSpace) 382 { 383 if (!m_navigationState.m_navigationDelegateMethods.webViewCanAuthenticateAgainstProtectionSpace) 384 return false; 385 386 auto navigationDelegate = m_navigationState.m_navigationDelegate.get(); 387 if (!navigationDelegate) 388 return false; 389 390 return [static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate.get()) _webView:m_navigationState.m_webView canAuthenticateAgainstProtectionSpace:wrapper(*protectionSpace)]; 391 } 392 393 void NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame(WebKit::WebPageProxy*, WebKit::WebFrameProxy*, WebKit::AuthenticationChallengeProxy* authenticationChallenge) 394 { 395 if (!m_navigationState.m_navigationDelegateMethods.webViewDidReceiveAuthenticationChallenge) 396 return; 397 398 auto navigationDelegate = m_navigationState.m_navigationDelegate.get(); 399 if (!navigationDelegate) 400 return; 401 402 [static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate.get()) _webView:m_navigationState.m_webView didReceiveAuthenticationChallenge:wrapper(*authenticationChallenge)]; 403 } 404 377 405 void NavigationState::LoaderClient::didChangeBackForwardList(WebKit::WebPageProxy*, WebKit::WebBackForwardListItem* addedItem, Vector<RefPtr<WebKit::WebBackForwardListItem>> removedItems) 378 406 {
Note: See TracChangeset
for help on using the changeset viewer.