Changeset 160227 in webkit
- Timestamp:
- Dec 6, 2013, 10:21:05 AM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 3 added
- 6 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/WebCore.exp.in (modified) (1 diff)
-
WebKit2/ChangeLog (modified) (1 diff)
-
WebKit2/Shared/Cocoa/APIObject.mm (modified) (2 diffs)
-
WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm (modified) (4 diffs)
-
WebKit2/UIProcess/API/Cocoa/WKBrowsingContextLoadDelegatePrivate.h (added)
-
WebKit2/UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.h (added)
-
WebKit2/UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm (added)
-
WebKit2/WebKit2.xcodeproj/project.pbxproj (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r160226 r160227 1 2013-12-06 Dan Bernstein <mitz@apple.com> 2 3 [Cocoa] Add load delegate methods for responding to authentication challenges 4 https://bugs.webkit.org/show_bug.cgi?id=125333 5 6 Reviewed by Darin Adler. 7 8 * WebCore.exp.in: Exported core(NSURLCredential *). 9 1 10 2013-12-06 Daniel Bates <dabates@apple.com> 2 11 -
trunk/Source/WebCore/WebCore.exp.in
r160152 r160227 986 986 __ZN7WebCore4PathC1Ev 987 987 __ZN7WebCore4PathD1Ev 988 __ZN7WebCore4coreEP15NSURLCredential 988 989 __ZN7WebCore4coreEP20NSURLProtectionSpace 989 990 __ZN7WebCore4coreEP28NSURLAuthenticationChallenge -
trunk/Source/WebKit2/ChangeLog
r160212 r160227 1 2013-12-06 Dan Bernstein <mitz@apple.com> 2 3 [Cocoa] Add load delegate methods for responding to authentication challenges 4 https://bugs.webkit.org/show_bug.cgi?id=125333 5 6 Reviewed by Darin Adler. 7 8 * Shared/Cocoa/APIObject.mm: 9 (API::Object::newObject): Allocate a WKNSURLAuthenticationChallenge if the object is an 10 AuthenticationChallengeProxy. 11 12 * UIProcess/API/Cocoa/WKBrowsingContextController.mm: 13 (canAuthenticateAgainstProtectionSpaceInFrame): Implemented this WKPageLoaderClient callback 14 by calling the load delegate. 15 (didReceiveAuthenticationChallengeInFrame): Ditto. 16 (setUpPageLoaderClient): Set the above callbacks in the client structure. 17 18 * UIProcess/API/Cocoa/WKBrowsingContextLoadDelegatePrivate.h: Added. Declares two new 19 delegate methods. 20 21 * UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.h: Added. 22 (WebKit::wrapper): Added. Returns an AuthenticationChallengeProxy’s wrapper as an 23 NSURLAuthenticationChallenge. 24 * UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm: Added. 25 (-[WKNSURLAuthenticationChallenge _web_createTarget]): Override this WKObject method to 26 return a copy of the challenge with the sender set to a shared instance of 27 WKNSURLAuthenticationChallengeSender. 28 (-[WKNSURLAuthenticationChallenge _web_authenticationChallengeProxy]): Added. Returns the 29 wrapped object. 30 (-[WKNSURLAuthenticationChallengeSender cancelAuthenticationChallenge:]): Added. Calls 31 AuthenticationDecisionListener::cancel. 32 (-[WKNSURLAuthenticationChallengeSender continueWithoutCredentialForAuthenticationChallenge:]): 33 Added. Calls AuthenticationDecisionListener::useCredential, passing nullptr. 34 (-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]): Added. 35 Calls AuthenticationDecisionListener::useCredential, passing the credential. 36 37 * WebKit2.xcodeproj/project.pbxproj: Added references to new files. 38 1 39 2013-12-05 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 40 -
trunk/Source/WebKit2/Shared/Cocoa/APIObject.mm
r159991 r160227 38 38 #import "WKNSString.h" 39 39 #import "WKNSURL.h" 40 #import "WKNSURLAuthenticationChallenge.h" 40 41 #import "WKNSURLProtectionSpace.h" 41 42 #import "WKNavigationDataInternal.h" … … 65 66 case Type::Array: 66 67 wrapper = [WKNSArray alloc]; 68 break; 69 70 case Type::AuthenticationChallenge: 71 wrapper = NSAllocateObject([WKNSURLAuthenticationChallenge self], size, nullptr); 67 72 break; 68 73 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm
r160191 r160227 38 38 #import "WKNSArray.h" 39 39 #import "WKNSError.h" 40 #import "WKNSURLAuthenticationChallenge.h" 40 41 #import "WKNSURLExtras.h" 42 #import "WKNSURLProtectionSpace.h" 41 43 #import "WKRetainPtr.h" 42 44 #import "WKURLRequestNS.h" … … 48 50 #import "WKBrowsingContextGroupInternal.h" 49 51 #import "WKBrowsingContextHandleInternal.h" 50 #import "WKBrowsingContextLoadDelegate .h"52 #import "WKBrowsingContextLoadDelegatePrivate.h" 51 53 #import "WKBrowsingContextPolicyDelegate.h" 52 54 #import "WKProcessGroupInternal.h" … … 440 442 } 441 443 444 static bool canAuthenticateAgainstProtectionSpaceInFrame(WKPageRef page, WKFrameRef frame, WKProtectionSpaceRef protectionSpace, const void *clientInfo) 445 { 446 WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo; 447 auto loadDelegate = browsingContext->_loadDelegate.get(); 448 449 if ([loadDelegate respondsToSelector:@selector(browsingContextController:canAuthenticateAgainstProtectionSpace:)]) 450 return [(id <WKBrowsingContextLoadDelegatePrivate>)loadDelegate browsingContextController:browsingContext canAuthenticateAgainstProtectionSpace:wrapper(*toImpl(protectionSpace))]; 451 452 return false; 453 } 454 455 static void didReceiveAuthenticationChallengeInFrame(WKPageRef page, WKFrameRef frame, WKAuthenticationChallengeRef authenticationChallenge, const void *clientInfo) 456 { 457 WKBrowsingContextController *browsingContext = (WKBrowsingContextController *)clientInfo; 458 auto loadDelegate = browsingContext->_loadDelegate.get(); 459 460 if ([loadDelegate respondsToSelector:@selector(browsingContextController:didReceiveAuthenticationChallenge:)]) 461 [(id <WKBrowsingContextLoadDelegatePrivate>)loadDelegate browsingContextController:browsingContext didReceiveAuthenticationChallenge:wrapper(*toImpl(authenticationChallenge))]; 462 } 463 442 464 static void didStartProgress(WKPageRef page, const void* clientInfo) 443 465 { … … 493 515 loaderClient.didFinishLoadForFrame = didFinishLoadForFrame; 494 516 loaderClient.didFailLoadWithErrorForFrame = didFailLoadWithErrorForFrame; 517 518 loaderClient.canAuthenticateAgainstProtectionSpaceInFrame = canAuthenticateAgainstProtectionSpaceInFrame; 519 loaderClient.didReceiveAuthenticationChallengeInFrame = didReceiveAuthenticationChallengeInFrame; 495 520 496 521 loaderClient.didStartProgress = didStartProgress; -
trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
r160146 r160227 476 476 37F623B812A57B6200E3FDF6 /* WKFindOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 37F623B712A57B6200E3FDF6 /* WKFindOptions.h */; settings = {ATTRIBUTES = (Private, ); }; }; 477 477 37F90DE31376560E0051CF68 /* HTTPCookieAcceptPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = F638954F133BEF38008941D5 /* HTTPCookieAcceptPolicy.h */; }; 478 37FC19471850FBF2008CFA47 /* WKBrowsingContextLoadDelegatePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 37FC19461850FBF2008CFA47 /* WKBrowsingContextLoadDelegatePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 479 37FC194A18510D6A008CFA47 /* WKNSURLAuthenticationChallenge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37FC194818510D6A008CFA47 /* WKNSURLAuthenticationChallenge.mm */; }; 480 37FC194B18510D6A008CFA47 /* WKNSURLAuthenticationChallenge.h in Headers */ = {isa = PBXBuildFile; fileRef = 37FC194918510D6A008CFA47 /* WKNSURLAuthenticationChallenge.h */; }; 478 481 3F87B9BD158940120090FF62 /* WebColorChooser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3F87B9BA15893F630090FF62 /* WebColorChooser.cpp */; }; 479 482 3F87B9BE158940190090FF62 /* WebColorChooser.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F87B9BB15893F630090FF62 /* WebColorChooser.h */; }; … … 2018 2021 37DFA6FF1810BB92001F4A9F /* WKFoundation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKFoundation.h; sourceTree = "<group>"; }; 2019 2022 37F623B712A57B6200E3FDF6 /* WKFindOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKFindOptions.h; sourceTree = "<group>"; }; 2023 37FC19461850FBF2008CFA47 /* WKBrowsingContextLoadDelegatePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBrowsingContextLoadDelegatePrivate.h; sourceTree = "<group>"; }; 2024 37FC194818510D6A008CFA47 /* WKNSURLAuthenticationChallenge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKNSURLAuthenticationChallenge.mm; sourceTree = "<group>"; }; 2025 37FC194918510D6A008CFA47 /* WKNSURLAuthenticationChallenge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNSURLAuthenticationChallenge.h; sourceTree = "<group>"; }; 2020 2026 3F87B9BA15893F630090FF62 /* WebColorChooser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebColorChooser.cpp; sourceTree = "<group>"; }; 2021 2027 3F87B9BB15893F630090FF62 /* WebColorChooser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebColorChooser.h; sourceTree = "<group>"; }; … … 3794 3800 370F34A61829CFF3009027C8 /* WKBrowsingContextHistoryDelegate.h */, 3795 3801 BCBAAD0A14560A430053F82F /* WKBrowsingContextLoadDelegate.h */, 3802 37FC19461850FBF2008CFA47 /* WKBrowsingContextLoadDelegatePrivate.h */, 3796 3803 7CA254EA182993CE00FC8A41 /* WKBrowsingContextPolicyDelegate.h */, 3797 3804 BCA284D51492F2C7001F9042 /* WKConnection.h */, … … 3803 3810 370F34A01829BE1E009027C8 /* WKNavigationData.mm */, 3804 3811 370F34A41829BEA3009027C8 /* WKNavigationDataInternal.h */, 3812 37FC194918510D6A008CFA47 /* WKNSURLAuthenticationChallenge.h */, 3813 37FC194818510D6A008CFA47 /* WKNSURLAuthenticationChallenge.mm */, 3805 3814 BCBAACE5145225C90053F82F /* WKProcessGroup.h */, 3806 3815 BCBAACE6145225CA0053F82F /* WKProcessGroup.mm */, … … 5844 5853 518D2CAE12D5153B003BB93B /* WebBackForwardListItem.h in Headers */, 5845 5854 BC72B9FB11E6476B001EB4EA /* WebBackForwardListProxy.h in Headers */, 5855 37FC194B18510D6A008CFA47 /* WKNSURLAuthenticationChallenge.h in Headers */, 5846 5856 BCF50728124329AA005955AE /* WebCertificateInfo.h in Headers */, 5847 5857 BC032D7510F4378D0058C15A /* WebChromeClient.h in Headers */, … … 6103 6113 BC06F44E12DBDF3F002D78DE /* WKGeolocationPermissionRequest.h in Headers */, 6104 6114 BC0E619812D6CD120012A72A /* WKGeolocationPosition.h in Headers */, 6115 37FC19471850FBF2008CFA47 /* WKBrowsingContextLoadDelegatePrivate.h in Headers */, 6105 6116 BCC8B374125FB69000DE46A4 /* WKGeometry.h in Headers */, 6106 6117 B62E7312143047B00069EC35 /* WKHitTestResult.h in Headers */, … … 7048 7059 E14A954916E016A40068DE82 /* NetworkProcessPlatformStrategies.cpp in Sources */, 7049 7060 5179556D162877B100FA43B6 /* NetworkProcessProxy.cpp in Sources */, 7061 37FC194A18510D6A008CFA47 /* WKNSURLAuthenticationChallenge.mm in Sources */, 7050 7062 516319921628980A00E22F00 /* NetworkProcessProxyMac.mm in Sources */, 7051 7063 513A163C163088F6005D7D22 /* NetworkProcessProxyMessageReceiver.cpp in Sources */,
Note:
See TracChangeset
for help on using the changeset viewer.