Changeset 242616 in webkit
- Timestamp:
- Mar 7, 2019 3:30:42 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/PAL/ChangeLog
r242368 r242616 1 2019-03-07 Andy Estes <aestes@apple.com> 2 3 [Apple Pay] Untangle PKPaymentAuthorizationViewController from WebPaymentCoordinatorProxy 4 https://bugs.webkit.org/show_bug.cgi?id=195349 5 <rdar://problem/48625510> 6 7 Reviewed by Alex Christensen. 8 9 Moved soft-linking of PKPaymentErrorDomain from WebPaymentCoordinatorProxy to here and used 10 a more descriptive platform macro. 11 12 * pal/cocoa/PassKitSoftLink.h: 13 * pal/cocoa/PassKitSoftLink.mm: 14 1 15 2019-03-01 Conrad Shultz <conrad_shultz@apple.com> 2 16 -
trunk/Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.h
r238470 r242616 46 46 SOFT_LINK_FUNCTION_FOR_HEADER(PAL, PassKit, PKDrawApplePayButton, void, (CGContextRef context, CGRect drawRect, CGFloat scale, PKPaymentButtonType type, PKPaymentButtonStyle style, NSString *languageCode), (context, drawRect, scale, type, style, languageCode)) 47 47 48 #if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300)48 #if HAVE(PASSKIT_GRANULAR_ERRORS) 49 49 SOFT_LINK_CLASS_FOR_HEADER(PAL, PKPaymentAuthorizationResult) 50 50 SOFT_LINK_CLASS_FOR_HEADER(PAL, PKPaymentRequestPaymentMethodUpdate) … … 58 58 SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKit, PKContactFieldPostalAddress, PKContactField) 59 59 SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKit, PKPaymentErrorContactFieldUserInfoKey, PKPaymentErrorKey) 60 SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKit, PKPaymentErrorDomain, NSString *) 60 61 SOFT_LINK_CONSTANT_FOR_HEADER(PAL, PassKit, PKPaymentErrorPostalAddressUserInfoKey, PKPaymentErrorKey) 61 62 -
trunk/Source/WebCore/PAL/pal/cocoa/PassKitSoftLink.mm
r238434 r242616 50 50 SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, PassKit, PKDrawApplePayButton, void, (CGContextRef context, CGRect drawRect, CGFloat scale, PKPaymentButtonType type, PKPaymentButtonStyle style, NSString *languageCode), (context, drawRect, scale, type, style, languageCode)) 51 51 52 #if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300)52 #if HAVE(PASSKIT_GRANULAR_ERRORS) 53 53 SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentAuthorizationResult, PAL_EXPORT) 54 54 SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentRequestPaymentMethodUpdate, PAL_EXPORT) … … 62 62 SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKContactFieldPostalAddress, PKContactField, PAL_EXPORT) 63 63 SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentErrorContactFieldUserInfoKey, PKPaymentErrorKey, PAL_EXPORT) 64 SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentErrorDomain, NSString *, PAL_EXPORT) 64 65 SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, PassKit, PKPaymentErrorPostalAddressUserInfoKey, PKPaymentErrorKey, PAL_EXPORT) 65 66 -
trunk/Source/WebKit/ChangeLog
r242611 r242616 1 2019-03-07 Andy Estes <aestes@apple.com> 2 3 [Apple Pay] Untangle PKPaymentAuthorizationViewController from WebPaymentCoordinatorProxy 4 https://bugs.webkit.org/show_bug.cgi?id=195349 5 <rdar://problem/48625510> 6 7 Reviewed by Alex Christensen. 8 9 Introduced PaymentAuthorizationPresenter and WKPaymentAuthorizationDelegate to encapsulate 10 PKPaymentAuthorizationViewController and its delegate. Taught WebPaymentCoordinatorProxy to 11 interact with PaymentAuthorizationPresenter rather than PKPAVC directly. 12 13 These changes will allow us to swap out PKPaymentAuthorizationViewController with PKPaymentAuthorizationController in a follow-on patch. 14 15 * Platform/cocoa/PaymentAuthorizationPresenter.h: Added. Defined the abstract interface for 16 payment authorization presenters that use PKPA(V)C. 17 * Platform/cocoa/PaymentAuthorizationPresenter.mm: Added. 18 (WebKit::toPKPaymentAuthorizationStatus): Moved from WebPaymentCoordinatorProxyCocoa.mm. 19 (WebKit::toPKPaymentErrorCode): Ditto. 20 (WebKit::toNSError): Ditto. 21 (WebKit::toNSErrors): Ditto. 22 (WebKit::toPKShippingMethods): Ditto. 23 (WebKit::PaymentAuthorizationPresenter::completeMerchantValidation): Added. Implements the 24 logic previously in WebPaymentCoordinatorProxy::platformCompleteMerchantValidation. 25 (WebKit::PaymentAuthorizationPresenter::completePaymentMethodSelection): Ditto for 26 WebPaymentCoordinatorProxy::platformCompletePaymentMethodSelection. 27 (WebKit::PaymentAuthorizationPresenter::completePaymentSession): Ditto for 28 (WebKit::PaymentAuthorizationPresenter::completeShippingContactSelection): Ditto for 29 WebPaymentCoordinatorProxy::platformCompletePaymentSession. 30 (WebKit::PaymentAuthorizationPresenter::completeShippingMethodSelection): Ditto for 31 WebPaymentCoordinatorProxy::platformCompleteShippingMethodSelection. 32 * Platform/cocoa/PaymentAuthorizationViewController.h: Added. Defined a subclass of PaymentAuthorizationPresenter for PKPaymentAuthorizationViewController. 33 * Platform/cocoa/PaymentAuthorizationViewController.mm: Added. 34 (-[WKPaymentAuthorizationViewControllerDelegate initWithPresenter:]): Added a PKPAVC 35 delegate that's a subclass of WKPaymentAuthorizationDelegate. 36 (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewControllerDidFinish:]): 37 Called -[WKPaymentAuthorizationDelegate _didFinish]. 38 (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didAuthorizePayment:handler:]): Called 39 -[WKPaymentAuthorizationDelegate _didAuthorizePayment:completion:]. 40 (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingMethod:handler:]): Called 41 -[WKPaymentAuthorizationDelegate _didSelectShippingMethod:completion:]. 42 (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingContact:handler:]): Called 43 -[WKPaymentAuthorizationDelegate _didSelectShippingContact:completion:]. 44 (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectPaymentMethod:handler:]): Called 45 -[WKPaymentAuthorizationDelegate _didSelectPaymentMethod:completion:]. 46 (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:willFinishWithError:]): 47 Called -[WKPaymentAuthorizationDelegate _willFinishWithError:]. 48 (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didRequestMerchantSession:]): Called 49 -[WKPaymentAuthorizationDelegate _didRequestMerchantSession:]. 50 * Platform/cocoa/WKPaymentAuthorizationDelegate.h: Added. 51 * Platform/cocoa/WKPaymentAuthorizationDelegate.mm: Added. 52 (-[WKPaymentAuthorizationDelegate summaryItems]): Added a summaryItems getter. 53 (-[WKPaymentAuthorizationDelegate shippingMethods]): Ditto for shippingMethods. 54 (-[WKPaymentAuthorizationDelegate completeMerchantValidation:error:]): Called 55 _didRequestMerchantSessionCompletion then set it to nil. 56 (-[WKPaymentAuthorizationDelegate completePaymentMethodSelection:]): Ditto for 57 _didSelectPaymentMethodCompletion. 58 (-[WKPaymentAuthorizationDelegate completePaymentSession:errors:didReachFinalState:]): Ditto 59 for _didAuthorizePaymentCompletion. 60 (-[WKPaymentAuthorizationDelegate completeShippingContactSelection:summaryItems:shippingMethods:errors:]): 61 Ditto for _didSelectShippingContactCompletion. 62 (-[WKPaymentAuthorizationDelegate completeShippingMethodSelection:]): Ditto for 63 _didSelectShippingMethodCompletion. 64 (-[WKPaymentAuthorizationDelegate invalidate]): If there's an outstanding authorization 65 callback, called -completePaymentSession:errors:didReachFinalState: with a state of 66 PKPaymentAuthorizationStatusFailure. 67 (-[WKPaymentAuthorizationDelegate _initWithPresenter:]): 68 (-[WKPaymentAuthorizationDelegate _didAuthorizePayment:completion:]): Added. Implements the 69 logic previously in WKPaymentAuthorizationViewControllerDelegate. 70 (-[WKPaymentAuthorizationDelegate _didFinish]): Ditto. 71 (-[WKPaymentAuthorizationDelegate _didRequestMerchantSession:]): Ditto. 72 (-[WKPaymentAuthorizationDelegate _didSelectPaymentMethod:completion:]): Ditto. 73 (-[WKPaymentAuthorizationDelegate _didSelectShippingContact:completion:]): Ditto. 74 (toShippingMethod): Moved from WebPaymentCoordinatorProxyCocoa.mm. 75 (-[WKPaymentAuthorizationDelegate _didSelectShippingMethod:completion:]): Added. Implements 76 the logic previously in WKPaymentAuthorizationViewControllerDelegate. 77 (-[WKPaymentAuthorizationDelegate _willFinishWithError:]): Ditto. 78 * Shared/ApplePay/WebPaymentCoordinatorProxy.cpp: 79 (WebKit::WebPaymentCoordinatorProxy::presenterWillValidateMerchant): To conform to 80 PaymentAuthorizationPresenter::Client, renamed from validateMerchant. 81 (WebKit::WebPaymentCoordinatorProxy::presenterDidAuthorizePayment): Renamed from 82 didAuthorizePayment. 83 (WebKit::WebPaymentCoordinatorProxy::presenterDidFinish): Moved logic here that previously 84 existed in WKPaymentAuthorizationViewControllerDelegate. 85 (WebKit::WebPaymentCoordinatorProxy::presenterDidSelectShippingMethod): Renamed from 86 didSelectShippingMethod. 87 (WebKit::WebPaymentCoordinatorProxy::presenterDidSelectShippingContact): Renamed from 88 didSelectShippingContact. 89 (WebKit::WebPaymentCoordinatorProxy::presenterDidSelectPaymentMethod): Renamed from 90 didSelectPaymentMethod. 91 (WebKit::WebPaymentCoordinatorProxy::validateMerchant): Renamed to 92 presenterWillValidateMerchant. 93 (WebKit::WebPaymentCoordinatorProxy::didAuthorizePayment): Renamed to 94 presenterDidAuthorizePayment. 95 (WebKit::WebPaymentCoordinatorProxy::didSelectShippingMethod): Renamed to 96 presenterDidSelectShippingMethod. 97 (WebKit::WebPaymentCoordinatorProxy::didSelectShippingContact): Renamed to 98 presenterDidSelectShippingContact. 99 (WebKit::WebPaymentCoordinatorProxy::didSelectPaymentMethod): Renamed to 100 didSelectPaymentMethod. 101 * Shared/ApplePay/WebPaymentCoordinatorProxy.h: Changed WebPaymentCoordinatorProxy to 102 subclass PaymentAuthorizationPresenter::Client. 103 * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h: Removed WKPaymentAuthorizationViewControllerDelegate interface and declared some helper functions 104 needed by PaymentAuthorizationPresenter. 105 * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: 106 (WebKit::toPKPaymentSummaryItemType): Removed static keyword. 107 (WebKit::toDecimalNumber): Ditto. 108 (WebKit::toPKPaymentSummaryItem): Ditto. 109 (WebKit::toPKPaymentSummaryItems): Ditto. 110 (WebKit::toPKShippingMethod): Ditto. 111 (WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): Changed to call 112 m_authorizationPresenter. 113 (WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentSession): Ditto. 114 (WebKit::WebPaymentCoordinatorProxy::platformCompleteMerchantValidation): Ditto. 115 (WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingMethodSelection): Ditto. 116 (WebKit::WebPaymentCoordinatorProxy::platformCompleteShippingContactSelection): Ditto. 117 (WebKit::WebPaymentCoordinatorProxy::platformCompletePaymentMethodSelection): Ditto. 118 (-[WKPaymentAuthorizationViewControllerDelegate initWithPaymentCoordinatorProxy:]): Deleted. 119 (-[WKPaymentAuthorizationViewControllerDelegate invalidate]): Deleted. 120 (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:willFinishWithError:]): Deleted. 121 (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didRequestMerchantSession:]): Deleted. 122 (toShippingMethod): Deleted. 123 (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didAuthorizePayment:handler:]): Deleted. 124 (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectPaymentMethod:handler:]): Deleted. 125 (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingMethod:handler:]): Deleted. 126 (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingContact:handler:]): Deleted. 127 (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didAuthorizePayment:completion:]): Deleted. 128 (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingMethod:completion:]): Deleted. 129 (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectPaymentMethod:completion:]): Deleted. 130 (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingContact:completion:]): Deleted. 131 (-[WKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewControllerDidFinish:]): Deleted. 132 (WebKit::toPKPaymentAuthorizationStatus): Moved to PaymentAuthorizationPresenter.mm. 133 (WebKit::toPKPaymentErrorCode): Ditto. 134 (WebKit::toNSError): Ditto. 135 (WebKit::toNSErrors): Ditto. 136 * Shared/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm: 137 (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI): Changed to present a 138 PaymentAuthorizationPresenter rather than a PKPAVC. 139 (WebKit::WebPaymentCoordinatorProxy::hidePaymentUI): Changed to dismiss a 140 PaymentAuthorizationPresenter rather than a PKPAVC. 141 * Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm: 142 (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI): Ditto. 143 (WebKit::WebPaymentCoordinatorProxy::hidePaymentUI): Ditto. 144 * SourcesCocoa.txt: 145 * UIProcess/WebPageProxy.h: 146 * UIProcess/ios/WebPageProxyIOS.mm: 147 (WebKit::WebPageProxy::paymentCoordinatorAuthorizationPresenter): Added. Returns a new 148 PaymentAuthorizationViewController. 149 * WebKit.xcodeproj/project.pbxproj: 150 1 151 2019-03-07 Chris Dumez <cdumez@apple.com> 2 152 -
trunk/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.cpp
r242356 r242616 231 231 } 232 232 233 void WebPaymentCoordinatorProxy:: validateMerchant(const URL& url)233 void WebPaymentCoordinatorProxy::presenterWillValidateMerchant(PaymentAuthorizationPresenter&, const URL& url) 234 234 { 235 235 ASSERT(m_merchantValidationState == MerchantValidationState::Idle); … … 239 239 } 240 240 241 void WebPaymentCoordinatorProxy:: didAuthorizePayment(const WebCore::Payment& payment)241 void WebPaymentCoordinatorProxy::presenterDidAuthorizePayment(PaymentAuthorizationPresenter&, const WebCore::Payment& payment) 242 242 { 243 243 m_state = State::Authorized; … … 245 245 } 246 246 247 void WebPaymentCoordinatorProxy::didSelectShippingMethod(const WebCore::ApplePaySessionPaymentRequest::ShippingMethod& shippingMethod) 247 void WebPaymentCoordinatorProxy::presenterDidFinish(PaymentAuthorizationPresenter&, bool didReachFinalState) 248 { 249 if (!didReachFinalState) 250 didCancelPaymentSession(); 251 hidePaymentUI(); 252 } 253 254 void WebPaymentCoordinatorProxy::presenterDidSelectShippingMethod(PaymentAuthorizationPresenter&, const WebCore::ApplePaySessionPaymentRequest::ShippingMethod& shippingMethod) 248 255 { 249 256 ASSERT(m_state == State::Active); … … 253 260 } 254 261 255 void WebPaymentCoordinatorProxy:: didSelectShippingContact(const WebCore::PaymentContact& shippingContact)262 void WebPaymentCoordinatorProxy::presenterDidSelectShippingContact(PaymentAuthorizationPresenter&, const WebCore::PaymentContact& shippingContact) 256 263 { 257 264 ASSERT(m_state == State::Active); … … 261 268 } 262 269 263 void WebPaymentCoordinatorProxy:: didSelectPaymentMethod(const WebCore::PaymentMethod& paymentMethod)270 void WebPaymentCoordinatorProxy::presenterDidSelectPaymentMethod(PaymentAuthorizationPresenter&, const WebCore::PaymentMethod& paymentMethod) 264 271 { 265 272 ASSERT(m_state == State::Active); -
trunk/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.h
r242356 r242616 30 30 #include "MessageReceiver.h" 31 31 #include "MessageSender.h" 32 #include "PaymentAuthorizationPresenter.h" 32 33 #include <WebCore/PaymentHeaders.h> 33 34 #include <wtf/Forward.h> … … 57 58 OBJC_CLASS PKPaymentRequest; 58 59 OBJC_CLASS UIViewController; 59 OBJC_CLASS WKPaymentAuthorizationViewControllerDelegate;60 60 61 61 namespace WebKit { … … 63 63 class WebPageProxy; 64 64 65 class WebPaymentCoordinatorProxy : private IPC::MessageReceiver, private IPC::MessageSender, public CanMakeWeakPtr<WebPaymentCoordinatorProxy> { 65 class WebPaymentCoordinatorProxy 66 : private IPC::MessageReceiver 67 , private IPC::MessageSender 68 , public CanMakeWeakPtr<WebPaymentCoordinatorProxy> 69 , public PaymentAuthorizationPresenter::Client { 66 70 public: 67 71 struct Client { … … 76 80 virtual UIViewController *paymentCoordinatorPresentingViewController(const WebPaymentCoordinatorProxy&) = 0; 77 81 virtual const String& paymentCoordinatorCTDataConnectionServiceType(const WebPaymentCoordinatorProxy&) = 0; 82 virtual std::unique_ptr<PaymentAuthorizationPresenter> paymentCoordinatorAuthorizationPresenter(WebPaymentCoordinatorProxy&, PKPaymentRequest *) = 0; 78 83 #endif 79 84 #if PLATFORM(MAC) … … 86 91 87 92 void didCancelPaymentSession(); 88 void validateMerchant(const URL&);89 void didAuthorizePayment(const WebCore::Payment&);90 void didSelectShippingMethod(const WebCore::ApplePaySessionPaymentRequest::ShippingMethod&);91 void didSelectShippingContact(const WebCore::PaymentContact&);92 void didSelectPaymentMethod(const WebCore::PaymentMethod&);93 94 93 void hidePaymentUI(); 95 94 … … 102 101 IPC::Connection* messageSenderConnection() const final; 103 102 uint64_t messageSenderDestinationID() const final; 103 104 // PaymentAuthorizationPresenter::Client 105 void presenterDidAuthorizePayment(PaymentAuthorizationPresenter&, const WebCore::Payment&) final; 106 void presenterDidFinish(PaymentAuthorizationPresenter&, bool didReachFinalState) final; 107 void presenterDidSelectPaymentMethod(PaymentAuthorizationPresenter&, const WebCore::PaymentMethod&) final; 108 void presenterDidSelectShippingContact(PaymentAuthorizationPresenter&, const WebCore::PaymentContact&) final; 109 void presenterDidSelectShippingMethod(PaymentAuthorizationPresenter&, const WebCore::ApplePaySessionPaymentRequest::ShippingMethod&) final; 110 void presenterWillValidateMerchant(PaymentAuthorizationPresenter&, const URL&) final; 104 111 105 112 // Message handlers … … 174 181 } m_merchantValidationState { MerchantValidationState::Idle }; 175 182 176 RetainPtr<PKPaymentAuthorizationViewController> m_paymentAuthorizationViewController; 177 RetainPtr<WKPaymentAuthorizationViewControllerDelegate> m_paymentAuthorizationViewControllerDelegate; 183 std::unique_ptr<PaymentAuthorizationPresenter> m_authorizationPresenter; 178 184 179 185 #if PLATFORM(MAC) -
trunk/Source/WebKit/Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h
r242356 r242616 28 28 #if ENABLE(APPLE_PAY) 29 29 30 #import "WebPaymentCoordinatorProxy.h"31 #import <WebCore/PaymentHeaders.h>32 30 #import <pal/spi/cocoa/PassKitSPI.h> 33 #import <wtf/BlockPtr.h>34 31 35 @interface WKPaymentAuthorizationViewControllerDelegate : NSObject <PKPaymentAuthorizationViewControllerDelegate, PKPaymentAuthorizationViewControllerPrivateDelegate> { 36 @package 37 WebKit::WebPaymentCoordinatorProxy* _webPaymentCoordinatorProxy; 38 RetainPtr<NSArray> _paymentSummaryItems; 39 RetainPtr<NSArray> _shippingMethods; 32 namespace WebKit { 40 33 41 BlockPtr<void(PKPaymentMerchantSession *, NSError *)> _sessionBlock; 34 // FIXME: Rather than having these free functions scattered about, Apple Pay data types should know 35 // how to convert themselves to and from their platform representations. 36 NSArray *toPKPaymentSummaryItems(const WebCore::ApplePaySessionPaymentRequest::TotalAndLineItems&); 37 NSDecimalNumber *toDecimalNumber(const String& amount); 38 PKPaymentSummaryItem *toPKPaymentSummaryItem(const WebCore::ApplePaySessionPaymentRequest::LineItem&); 39 PKPaymentSummaryItemType toPKPaymentSummaryItemType(WebCore::ApplePaySessionPaymentRequest::LineItem::Type); 40 PKShippingMethod *toPKShippingMethod(const WebCore::ApplePaySessionPaymentRequest::ShippingMethod&); 42 41 43 BOOL _didReachFinalState; 44 #if HAVE(PASSKIT_GRANULAR_ERRORS) 45 BlockPtr<void(PKPaymentAuthorizationResult *)> _paymentAuthorizedCompletion; 46 BlockPtr<void(PKPaymentRequestPaymentMethodUpdate *)> _didSelectPaymentMethodCompletion; 47 BlockPtr<void(PKPaymentRequestShippingMethodUpdate *)> _didSelectShippingMethodCompletion; 48 BlockPtr<void(PKPaymentRequestShippingContactUpdate *)> _didSelectShippingContactCompletion; 49 #else 50 BlockPtr<void(PKPaymentAuthorizationStatus)> _paymentAuthorizedCompletion; 51 BlockPtr<void(NSArray *)> _didSelectPaymentMethodCompletion; 52 BlockPtr<void(PKPaymentAuthorizationStatus, NSArray *)> _didSelectShippingMethodCompletion; 53 BlockPtr<void(PKPaymentAuthorizationStatus, NSArray *, NSArray *)> _didSelectShippingContactCompletion; 54 #endif 55 } 42 } // namespace WebKit 56 43 57 - (instancetype)initWithPaymentCoordinatorProxy:(WebKit::WebPaymentCoordinatorProxy&)webPaymentCoordinatorProxy; 58 59 - (void)invalidate; 60 61 @end 62 63 #endif 44 #endif // ENABLE(APPLE_PAY) -
trunk/Source/WebKit/Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm
r242356 r242616 29 29 #if ENABLE(APPLE_PAY) 30 30 31 #import "WKPaymentAuthorizationDelegate.h" 31 32 #import "WebPaymentCoordinatorProxy.h" 32 #import "WebProcessPool.h"33 33 #import <WebCore/PaymentAuthorizationStatus.h> 34 34 #import <WebCore/PaymentHeaders.h> … … 37 37 #import <wtf/RunLoop.h> 38 38 #import <wtf/URL.h> 39 40 #if HAVE(PASSKIT_GRANULAR_ERRORS)41 SOFT_LINK_FRAMEWORK(Contacts)42 SOFT_LINK_CONSTANT(Contacts, CNPostalAddressStreetKey, NSString *);43 SOFT_LINK_CONSTANT(Contacts, CNPostalAddressSubLocalityKey, NSString *);44 SOFT_LINK_CONSTANT(Contacts, CNPostalAddressCityKey, NSString *);45 SOFT_LINK_CONSTANT(Contacts, CNPostalAddressSubAdministrativeAreaKey, NSString *);46 SOFT_LINK_CONSTANT(Contacts, CNPostalAddressStateKey, NSString *);47 SOFT_LINK_CONSTANT(Contacts, CNPostalAddressPostalCodeKey, NSString *);48 SOFT_LINK_CONSTANT(Contacts, CNPostalAddressCountryKey, NSString *);49 SOFT_LINK_CONSTANT(Contacts, CNPostalAddressISOCountryCodeKey, NSString *);50 SOFT_LINK_CONSTANT(PAL::PassKit, PKPaymentErrorDomain, NSString *);51 #endif52 53 @implementation WKPaymentAuthorizationViewControllerDelegate54 55 - (instancetype)initWithPaymentCoordinatorProxy:(WebKit::WebPaymentCoordinatorProxy&)webPaymentCoordinatorProxy56 {57 if (!(self = [super init]))58 return nullptr;59 60 _webPaymentCoordinatorProxy = &webPaymentCoordinatorProxy;61 62 return self;63 }64 65 - (void)invalidate66 {67 _webPaymentCoordinatorProxy = nullptr;68 if (_paymentAuthorizedCompletion) {69 #if HAVE(PASSKIT_GRANULAR_ERRORS)70 _paymentAuthorizedCompletion(adoptNS([PAL::allocPKPaymentAuthorizationResultInstance() initWithStatus:PKPaymentAuthorizationStatusFailure errors:@[ ]]).get());71 #else72 _paymentAuthorizedCompletion(PKPaymentAuthorizationStatusFailure);73 #endif74 _paymentAuthorizedCompletion = nullptr;75 }76 }77 78 - (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller willFinishWithError:(NSError *)error79 {80 }81 82 - (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller didRequestMerchantSession:(void(^)(PKPaymentMerchantSession *, NSError *))sessionBlock83 {84 ASSERT(!_sessionBlock);85 _sessionBlock = sessionBlock;86 87 [PAL::getPKPaymentAuthorizationViewControllerClass() paymentServicesMerchantURL:^(NSURL *merchantURL, NSError *error) {88 if (error)89 LOG_ERROR("PKCanMakePaymentsWithMerchantIdentifierAndDomain error %@", error);90 91 dispatch_async(dispatch_get_main_queue(), ^{92 ASSERT(_sessionBlock);93 94 if (!_webPaymentCoordinatorProxy) {95 _sessionBlock(nullptr, nullptr);96 return;97 }98 99 _webPaymentCoordinatorProxy->validateMerchant(merchantURL);100 });101 }];102 }103 104 static WebCore::ApplePaySessionPaymentRequest::ShippingMethod toShippingMethod(PKShippingMethod *shippingMethod)105 {106 ASSERT(shippingMethod);107 108 WebCore::ApplePaySessionPaymentRequest::ShippingMethod result;109 result.label = shippingMethod.label;110 result.detail = shippingMethod.detail;111 result.amount = shippingMethod.amount.stringValue;112 result.identifier = shippingMethod.identifier;113 114 return result;115 }116 117 #if HAVE(PASSKIT_GRANULAR_ERRORS)118 119 - (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller didAuthorizePayment:(PKPayment *)payment handler:(void (^)(PKPaymentAuthorizationResult *result))completion120 {121 if (!_webPaymentCoordinatorProxy) {122 completion(adoptNS([PAL::allocPKPaymentAuthorizationResultInstance() initWithStatus:PKPaymentAuthorizationStatusFailure errors:@[ ]]).get());123 return;124 }125 126 ASSERT(!_paymentAuthorizedCompletion);127 _paymentAuthorizedCompletion = completion;128 129 _webPaymentCoordinatorProxy->didAuthorizePayment(WebCore::Payment(payment));130 }131 132 - (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller didSelectPaymentMethod:(PKPaymentMethod *)paymentMethod handler:(void (^)(PKPaymentRequestPaymentMethodUpdate *update))completion133 {134 if (!_webPaymentCoordinatorProxy) {135 completion(adoptNS([PAL::allocPKPaymentRequestPaymentMethodUpdateInstance() initWithPaymentSummaryItems:@[ ]]).get());136 return;137 }138 139 ASSERT(!_didSelectPaymentMethodCompletion);140 _didSelectPaymentMethodCompletion = completion;141 _webPaymentCoordinatorProxy->didSelectPaymentMethod(WebCore::PaymentMethod(paymentMethod));142 }143 144 - (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller didSelectShippingMethod:(PKShippingMethod *)shippingMethod handler:(void (^)(PKPaymentRequestShippingMethodUpdate *update))completion {145 if (!_webPaymentCoordinatorProxy) {146 completion(adoptNS([PAL::allocPKPaymentRequestShippingMethodUpdateInstance() initWithPaymentSummaryItems:@[ ]]).get());147 return;148 }149 150 ASSERT(!_didSelectShippingMethodCompletion);151 _didSelectShippingMethodCompletion = completion;152 _webPaymentCoordinatorProxy->didSelectShippingMethod(toShippingMethod(shippingMethod));153 }154 155 - (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller didSelectShippingContact:(PKContact *)contact handler:(void (^)(PKPaymentRequestShippingContactUpdate *update))completion156 {157 if (!_webPaymentCoordinatorProxy) {158 completion(adoptNS([PAL::allocPKPaymentRequestShippingContactUpdateInstance() initWithErrors:@[ ] paymentSummaryItems:@[ ] shippingMethods:@[ ]]).get());159 return;160 }161 162 ASSERT(!_didSelectShippingContactCompletion);163 _didSelectShippingContactCompletion = completion;164 _webPaymentCoordinatorProxy->didSelectShippingContact(WebCore::PaymentContact(contact));165 }166 167 #endif168 169 #if !HAVE(PASSKIT_GRANULAR_ERRORS)170 171 - (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller didAuthorizePayment:(PKPayment *)payment completion:(void (^)(PKPaymentAuthorizationStatus))completion172 {173 if (!_webPaymentCoordinatorProxy) {174 completion(PKPaymentAuthorizationStatusFailure);175 return;176 }177 178 ASSERT(!_paymentAuthorizedCompletion);179 _paymentAuthorizedCompletion = completion;180 181 _webPaymentCoordinatorProxy->didAuthorizePayment(WebCore::Payment(payment));182 }183 184 - (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller didSelectShippingMethod:(PKShippingMethod *)shippingMethod completion:(void (^)(PKPaymentAuthorizationStatus status, NSArray<PKPaymentSummaryItem *> *summaryItems))completion185 {186 if (!_webPaymentCoordinatorProxy) {187 completion(PKPaymentAuthorizationStatusFailure, @[ ]);188 return;189 }190 191 ASSERT(!_didSelectShippingMethodCompletion);192 _didSelectShippingMethodCompletion = completion;193 _webPaymentCoordinatorProxy->didSelectShippingMethod(toShippingMethod(shippingMethod));194 }195 196 - (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller didSelectPaymentMethod:(PKPaymentMethod *)paymentMethod completion:(void (^)(NSArray<PKPaymentSummaryItem *> *summaryItems))completion197 {198 if (!_webPaymentCoordinatorProxy) {199 completion(@[ ]);200 return;201 }202 203 ASSERT(!_didSelectPaymentMethodCompletion);204 _didSelectPaymentMethodCompletion = completion;205 206 _webPaymentCoordinatorProxy->didSelectPaymentMethod(WebCore::PaymentMethod(paymentMethod));207 }208 209 - (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller didSelectShippingContact:(PKContact *)contact completion:(void (^)(PKPaymentAuthorizationStatus status, NSArray<PKShippingMethod *> *shippingMethods, NSArray<PKPaymentSummaryItem *> *summaryItems))completion210 {211 if (!_webPaymentCoordinatorProxy) {212 completion(PKPaymentAuthorizationStatusFailure, @[ ], @[ ]);213 return;214 }215 216 ASSERT(!_didSelectShippingContactCompletion);217 _didSelectShippingContactCompletion = completion;218 _webPaymentCoordinatorProxy->didSelectShippingContact(WebCore::PaymentContact(contact));219 }220 221 #endif222 223 - (void)paymentAuthorizationViewControllerDidFinish:(PKPaymentAuthorizationViewController *)controller224 {225 if (!_webPaymentCoordinatorProxy)226 return;227 228 if (!_didReachFinalState)229 _webPaymentCoordinatorProxy->didCancelPaymentSession();230 231 _webPaymentCoordinatorProxy->hidePaymentUI();232 }233 234 @end235 39 236 40 // FIXME: Once rdar://problem/24420024 has been fixed, import PKPaymentRequest_Private.h instead. … … 323 127 #endif 324 128 325 staticPKPaymentSummaryItemType toPKPaymentSummaryItemType(WebCore::ApplePaySessionPaymentRequest::LineItem::Type type)129 PKPaymentSummaryItemType toPKPaymentSummaryItemType(WebCore::ApplePaySessionPaymentRequest::LineItem::Type type) 326 130 { 327 131 switch (type) { … … 334 138 } 335 139 336 staticNSDecimalNumber *toDecimalNumber(const String& amount)140 NSDecimalNumber *toDecimalNumber(const String& amount) 337 141 { 338 142 if (!amount) … … 341 145 } 342 146 343 static RetainPtr<PKPaymentSummaryItem>toPKPaymentSummaryItem(const WebCore::ApplePaySessionPaymentRequest::LineItem& lineItem)147 PKPaymentSummaryItem *toPKPaymentSummaryItem(const WebCore::ApplePaySessionPaymentRequest::LineItem& lineItem) 344 148 { 345 149 return [PAL::getPKPaymentSummaryItemClass() summaryItemWithLabel:lineItem.label amount:toDecimalNumber(lineItem.amount) type:toPKPaymentSummaryItemType(lineItem.type)]; 346 150 } 347 151 348 static RetainPtr<NSArray>toPKPaymentSummaryItems(const WebCore::ApplePaySessionPaymentRequest::TotalAndLineItems& totalAndLineItems)349 { 350 auto paymentSummaryItems = adoptNS([[NSMutableArray alloc] init]);152 NSArray *toPKPaymentSummaryItems(const WebCore::ApplePaySessionPaymentRequest::TotalAndLineItems& totalAndLineItems) 153 { 154 NSMutableArray *paymentSummaryItems = [NSMutableArray arrayWithCapacity:totalAndLineItems.lineItems.size() + 1]; 351 155 for (auto& lineItem : totalAndLineItems.lineItems) { 352 if ( autosummaryItem = toPKPaymentSummaryItem(lineItem))353 [paymentSummaryItems addObject:summaryItem .get()];354 } 355 356 if ( autototalItem = toPKPaymentSummaryItem(totalAndLineItems.total))357 [paymentSummaryItems addObject:totalItem .get()];156 if (PKPaymentSummaryItem *summaryItem = toPKPaymentSummaryItem(lineItem)) 157 [paymentSummaryItems addObject:summaryItem]; 158 } 159 160 if (PKPaymentSummaryItem *totalItem = toPKPaymentSummaryItem(totalAndLineItems.total)) 161 [paymentSummaryItems addObject:totalItem]; 358 162 359 163 return paymentSummaryItems; … … 400 204 } 401 205 402 static RetainPtr<PKShippingMethod>toPKShippingMethod(const WebCore::ApplePaySessionPaymentRequest::ShippingMethod& shippingMethod)403 { 404 RetainPtr<PKShippingMethod>result = [PAL::getPKShippingMethodClass() summaryItemWithLabel:shippingMethod.label amount:toDecimalNumber(shippingMethod.amount)];206 PKShippingMethod *toPKShippingMethod(const WebCore::ApplePaySessionPaymentRequest::ShippingMethod& shippingMethod) 207 { 208 PKShippingMethod *result = [PAL::getPKShippingMethodClass() summaryItemWithLabel:shippingMethod.label amount:toDecimalNumber(shippingMethod.amount)]; 405 209 [result setIdentifier:shippingMethod.identifier]; 406 210 [result setDetail:shippingMethod.detail]; … … 471 275 auto shippingMethods = adoptNS([[NSMutableArray alloc] init]); 472 276 for (auto& shippingMethod : paymentRequest.shippingMethods()) 473 [shippingMethods addObject:toPKShippingMethod(shippingMethod) .get()];277 [shippingMethods addObject:toPKShippingMethod(shippingMethod)]; 474 278 [result setShippingMethods:shippingMethods.get()]; 475 279 476 280 auto paymentSummaryItems = adoptNS([[NSMutableArray alloc] init]); 477 281 for (auto& lineItem : paymentRequest.lineItems()) { 478 if ( autosummaryItem = toPKPaymentSummaryItem(lineItem))479 [paymentSummaryItems addObject:summaryItem .get()];480 } 481 482 if ( autototalItem = toPKPaymentSummaryItem(paymentRequest.total()))483 [paymentSummaryItems addObject:totalItem .get()];282 if (PKPaymentSummaryItem *summaryItem = toPKPaymentSummaryItem(lineItem)) 283 [paymentSummaryItems addObject:summaryItem]; 284 } 285 286 if (PKPaymentSummaryItem *totalItem = toPKPaymentSummaryItem(paymentRequest.total())) 287 [paymentSummaryItems addObject:totalItem]; 484 288 485 289 [result setPaymentSummaryItems:paymentSummaryItems.get()]; … … 514 318 } 515 319 516 #if HAVE(PASSKIT_GRANULAR_ERRORS)517 static PKPaymentAuthorizationStatus toPKPaymentAuthorizationStatus(WebCore::PaymentAuthorizationStatus status)518 {519 switch (status) {520 case WebCore::PaymentAuthorizationStatus::Success:521 return PKPaymentAuthorizationStatusSuccess;522 case WebCore::PaymentAuthorizationStatus::Failure:523 return PKPaymentAuthorizationStatusFailure;524 case WebCore::PaymentAuthorizationStatus::PINRequired:525 return PKPaymentAuthorizationStatusPINRequired;526 case WebCore::PaymentAuthorizationStatus::PINIncorrect:527 return PKPaymentAuthorizationStatusPINIncorrect;528 case WebCore::PaymentAuthorizationStatus::PINLockout:529 return PKPaymentAuthorizationStatusPINLockout;530 }531 }532 533 static PKPaymentErrorCode toPKPaymentErrorCode(WebCore::PaymentError::Code code)534 {535 switch (code) {536 case WebCore::PaymentError::Code::Unknown:537 return PKPaymentUnknownError;538 case WebCore::PaymentError::Code::ShippingContactInvalid:539 return PKPaymentShippingContactInvalidError;540 case WebCore::PaymentError::Code::BillingContactInvalid:541 return PKPaymentBillingContactInvalidError;542 case WebCore::PaymentError::Code::AddressUnserviceable:543 return PKPaymentShippingAddressUnserviceableError;544 }545 }546 547 static RetainPtr<NSError> toNSError(const WebCore::PaymentError& error)548 {549 auto userInfo = adoptNS([[NSMutableDictionary alloc] init]);550 [userInfo setObject:error.message forKey:NSLocalizedDescriptionKey];551 552 if (error.contactField) {553 NSString *pkContactField = nil;554 NSString *postalAddressKey = nil;555 556 switch (*error.contactField) {557 case WebCore::PaymentError::ContactField::PhoneNumber:558 pkContactField = PAL::get_PassKit_PKContactFieldPhoneNumber();559 break;560 561 case WebCore::PaymentError::ContactField::EmailAddress:562 pkContactField = PAL::get_PassKit_PKContactFieldEmailAddress();563 break;564 565 case WebCore::PaymentError::ContactField::Name:566 pkContactField = PAL::get_PassKit_PKContactFieldName();567 break;568 569 case WebCore::PaymentError::ContactField::PhoneticName:570 pkContactField = PAL::get_PassKit_PKContactFieldPhoneticName();571 break;572 573 case WebCore::PaymentError::ContactField::PostalAddress:574 pkContactField = PAL::get_PassKit_PKContactFieldPostalAddress();575 break;576 577 case WebCore::PaymentError::ContactField::AddressLines:578 pkContactField = PAL::get_PassKit_PKContactFieldPostalAddress();579 postalAddressKey = getCNPostalAddressStreetKey();580 break;581 582 case WebCore::PaymentError::ContactField::SubLocality:583 pkContactField = PAL::get_PassKit_PKContactFieldPostalAddress();584 postalAddressKey = getCNPostalAddressSubLocalityKey();585 break;586 587 case WebCore::PaymentError::ContactField::Locality:588 pkContactField = PAL::get_PassKit_PKContactFieldPostalAddress();589 postalAddressKey = getCNPostalAddressCityKey();590 break;591 592 case WebCore::PaymentError::ContactField::PostalCode:593 pkContactField = PAL::get_PassKit_PKContactFieldPostalAddress();594 postalAddressKey = getCNPostalAddressPostalCodeKey();595 break;596 597 case WebCore::PaymentError::ContactField::SubAdministrativeArea:598 pkContactField = PAL::get_PassKit_PKContactFieldPostalAddress();599 postalAddressKey = getCNPostalAddressSubAdministrativeAreaKey();600 break;601 602 case WebCore::PaymentError::ContactField::AdministrativeArea:603 pkContactField = PAL::get_PassKit_PKContactFieldPostalAddress();604 postalAddressKey = getCNPostalAddressStateKey();605 break;606 607 case WebCore::PaymentError::ContactField::Country:608 pkContactField = PAL::get_PassKit_PKContactFieldPostalAddress();609 postalAddressKey = getCNPostalAddressCountryKey();610 break;611 612 case WebCore::PaymentError::ContactField::CountryCode:613 pkContactField = PAL::get_PassKit_PKContactFieldPostalAddress();614 postalAddressKey = getCNPostalAddressISOCountryCodeKey();615 break;616 }617 618 [userInfo setObject:pkContactField forKey:PAL::get_PassKit_PKPaymentErrorContactFieldUserInfoKey()];619 if (postalAddressKey)620 [userInfo setObject:postalAddressKey forKey:PAL::get_PassKit_PKPaymentErrorPostalAddressUserInfoKey()];621 }622 623 return adoptNS([[NSError alloc] initWithDomain:getPKPaymentErrorDomain() code:toPKPaymentErrorCode(error.code) userInfo:userInfo.get()]);624 }625 626 static RetainPtr<NSArray> toNSErrors(const Vector<WebCore::PaymentError>& errors)627 {628 auto result = adoptNS([[NSMutableArray alloc] init]);629 630 for (const auto& error : errors) {631 if (auto nsError = toNSError(error))632 [result addObject:nsError.get()];633 }634 635 return result;636 }637 #else638 static PKPaymentAuthorizationStatus toPKPaymentAuthorizationStatus(const Optional<WebCore::PaymentAuthorizationResult>& result)639 {640 if (!result)641 return PKPaymentAuthorizationStatusSuccess;642 643 if (result->errors.size() == 1) {644 auto& error = result->errors[0];645 switch (error.code) {646 case WebCore::PaymentError::Code::Unknown:647 case WebCore::PaymentError::Code::AddressUnserviceable:648 return PKPaymentAuthorizationStatusFailure;649 650 case WebCore::PaymentError::Code::BillingContactInvalid:651 return PKPaymentAuthorizationStatusInvalidBillingPostalAddress;652 653 case WebCore::PaymentError::Code::ShippingContactInvalid:654 if (error.contactField && error.contactField == WebCore::PaymentError::ContactField::PostalAddress)655 return PKPaymentAuthorizationStatusInvalidShippingPostalAddress;656 657 return PKPaymentAuthorizationStatusInvalidShippingContact;658 }659 }660 661 switch (result->status) {662 case WebCore::PaymentAuthorizationStatus::Success:663 return PKPaymentAuthorizationStatusSuccess;664 case WebCore::PaymentAuthorizationStatus::Failure:665 return PKPaymentAuthorizationStatusFailure;666 case WebCore::PaymentAuthorizationStatus::PINRequired:667 return PKPaymentAuthorizationStatusPINRequired;668 case WebCore::PaymentAuthorizationStatus::PINIncorrect:669 return PKPaymentAuthorizationStatusPINIncorrect;670 case WebCore::PaymentAuthorizationStatus::PINLockout:671 return PKPaymentAuthorizationStatusPINLockout;672 }673 674 return PKPaymentAuthorizationStatusFailure;675 }676 #endif677 678 320 void WebPaymentCoordinatorProxy::platformCompletePaymentSession(const Optional<WebCore::PaymentAuthorizationResult>& result) 679 321 { 680 ASSERT(m_paymentAuthorizationViewController); 681 ASSERT(m_paymentAuthorizationViewControllerDelegate); 682 683 m_paymentAuthorizationViewControllerDelegate->_didReachFinalState = WebCore::isFinalStateResult(result); 684 685 #if HAVE(PASSKIT_GRANULAR_ERRORS) 686 auto status = result ? result->status : WebCore::PaymentAuthorizationStatus::Success; 687 auto pkPaymentAuthorizationResult = adoptNS([PAL::allocPKPaymentAuthorizationResultInstance() initWithStatus:toPKPaymentAuthorizationStatus(status) errors:result ? toNSErrors(result->errors).get() : @[ ]]); 688 m_paymentAuthorizationViewControllerDelegate->_paymentAuthorizedCompletion(pkPaymentAuthorizationResult.get()); 689 #else 690 m_paymentAuthorizationViewControllerDelegate->_paymentAuthorizedCompletion(toPKPaymentAuthorizationStatus(result)); 691 #endif 692 m_paymentAuthorizationViewControllerDelegate->_paymentAuthorizedCompletion = nullptr; 322 m_authorizationPresenter->completePaymentSession(result); 693 323 } 694 324 695 325 void WebPaymentCoordinatorProxy::platformCompleteMerchantValidation(const WebCore::PaymentMerchantSession& paymentMerchantSession) 696 326 { 697 ASSERT(m_paymentAuthorizationViewController); 698 ASSERT(m_paymentAuthorizationViewControllerDelegate); 699 700 m_paymentAuthorizationViewControllerDelegate->_sessionBlock(paymentMerchantSession.pkPaymentMerchantSession(), nullptr); 701 m_paymentAuthorizationViewControllerDelegate->_sessionBlock = nullptr; 327 m_authorizationPresenter->completeMerchantValidation(paymentMerchantSession); 702 328 } 703 329 704 330 void WebPaymentCoordinatorProxy::platformCompleteShippingMethodSelection(const Optional<WebCore::ShippingMethodUpdate>& update) 705 331 { 706 ASSERT(m_paymentAuthorizationViewController); 707 ASSERT(m_paymentAuthorizationViewControllerDelegate); 708 709 if (update) 710 m_paymentAuthorizationViewControllerDelegate->_paymentSummaryItems = toPKPaymentSummaryItems(update->newTotalAndLineItems); 711 712 #if HAVE(PASSKIT_GRANULAR_ERRORS) 713 auto pkShippingMethodUpdate = adoptNS([PAL::allocPKPaymentRequestShippingMethodUpdateInstance() initWithPaymentSummaryItems:m_paymentAuthorizationViewControllerDelegate->_paymentSummaryItems.get()]); 714 m_paymentAuthorizationViewControllerDelegate->_didSelectShippingMethodCompletion(pkShippingMethodUpdate.get()); 715 #else 716 m_paymentAuthorizationViewControllerDelegate->_didSelectShippingMethodCompletion(PKPaymentAuthorizationStatusSuccess, m_paymentAuthorizationViewControllerDelegate->_paymentSummaryItems.get()); 717 #endif 718 m_paymentAuthorizationViewControllerDelegate->_didSelectShippingMethodCompletion = nullptr; 719 } 720 721 #if !HAVE(PASSKIT_GRANULAR_ERRORS) 722 static PKPaymentAuthorizationStatus toPKPaymentAuthorizationStatus(const Optional<WebCore::ShippingContactUpdate>& update) 723 { 724 if (!update || update->errors.isEmpty()) 725 return PKPaymentAuthorizationStatusSuccess; 726 727 if (update->errors.size() == 1) { 728 auto& error = update->errors[0]; 729 switch (error.code) { 730 case WebCore::PaymentError::Code::Unknown: 731 case WebCore::PaymentError::Code::AddressUnserviceable: 732 return PKPaymentAuthorizationStatusFailure; 733 734 case WebCore::PaymentError::Code::BillingContactInvalid: 735 return PKPaymentAuthorizationStatusInvalidBillingPostalAddress; 736 737 case WebCore::PaymentError::Code::ShippingContactInvalid: 738 if (error.contactField && error.contactField == WebCore::PaymentError::ContactField::PostalAddress) 739 return PKPaymentAuthorizationStatusInvalidShippingPostalAddress; 740 741 return PKPaymentAuthorizationStatusInvalidShippingContact; 742 } 743 } 744 745 return PKPaymentAuthorizationStatusFailure; 746 } 747 #endif 332 m_authorizationPresenter->completeShippingMethodSelection(update); 333 } 748 334 749 335 void WebPaymentCoordinatorProxy::platformCompleteShippingContactSelection(const Optional<WebCore::ShippingContactUpdate>& update) 750 336 { 751 ASSERT(m_paymentAuthorizationViewController); 752 ASSERT(m_paymentAuthorizationViewControllerDelegate); 753 754 if (update) { 755 m_paymentAuthorizationViewControllerDelegate->_paymentSummaryItems = toPKPaymentSummaryItems(update->newTotalAndLineItems); 756 757 auto shippingMethods = adoptNS([[NSMutableArray alloc] init]); 758 for (auto& shippingMethod : update->newShippingMethods) 759 [shippingMethods addObject:toPKShippingMethod(shippingMethod).get()]; 760 761 m_paymentAuthorizationViewControllerDelegate->_shippingMethods = WTFMove(shippingMethods); 762 } 763 764 #if HAVE(PASSKIT_GRANULAR_ERRORS) 765 auto pkShippingContactUpdate = adoptNS([PAL::allocPKPaymentRequestShippingContactUpdateInstance() initWithErrors:update ? toNSErrors(update->errors).get() : @[ ] paymentSummaryItems:m_paymentAuthorizationViewControllerDelegate->_paymentSummaryItems.get() shippingMethods:m_paymentAuthorizationViewControllerDelegate->_shippingMethods.get()]); 766 m_paymentAuthorizationViewControllerDelegate->_didSelectShippingContactCompletion(pkShippingContactUpdate.get()); 767 #else 768 m_paymentAuthorizationViewControllerDelegate->_didSelectShippingContactCompletion(toPKPaymentAuthorizationStatus(update), m_paymentAuthorizationViewControllerDelegate->_shippingMethods.get(), m_paymentAuthorizationViewControllerDelegate->_paymentSummaryItems.get()); 769 #endif 770 m_paymentAuthorizationViewControllerDelegate->_didSelectShippingContactCompletion = nullptr; 337 m_authorizationPresenter->completeShippingContactSelection(update); 771 338 } 772 339 773 340 void WebPaymentCoordinatorProxy::platformCompletePaymentMethodSelection(const Optional<WebCore::PaymentMethodUpdate>& update) 774 341 { 775 ASSERT(m_paymentAuthorizationViewController); 776 ASSERT(m_paymentAuthorizationViewControllerDelegate); 777 778 if (update) 779 m_paymentAuthorizationViewControllerDelegate->_paymentSummaryItems = toPKPaymentSummaryItems(update->newTotalAndLineItems); 780 781 #if HAVE(PASSKIT_GRANULAR_ERRORS) 782 auto pkPaymentMethodUpdate = adoptNS([PAL::allocPKPaymentRequestPaymentMethodUpdateInstance() initWithPaymentSummaryItems:m_paymentAuthorizationViewControllerDelegate->_paymentSummaryItems.get()]); 783 m_paymentAuthorizationViewControllerDelegate->_didSelectPaymentMethodCompletion(pkPaymentMethodUpdate.get()); 784 #else 785 m_paymentAuthorizationViewControllerDelegate->_didSelectPaymentMethodCompletion(m_paymentAuthorizationViewControllerDelegate->_paymentSummaryItems.get()); 786 #endif 787 m_paymentAuthorizationViewControllerDelegate->_didSelectPaymentMethodCompletion = nullptr; 342 m_authorizationPresenter->completePaymentMethodSelection(update); 788 343 } 789 344 -
trunk/Source/WebKit/Shared/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm
r242356 r242616 30 30 31 31 #import "APIUIClient.h" 32 #import "PaymentAuthorizationPresenter.h" 32 33 #import "WebPageProxy.h" 33 #import "WebPaymentCoordinatorProxyCocoa.h"34 34 #import <PassKit/PassKit.h> 35 35 #import <UIKit/UIViewController.h> … … 41 41 void WebPaymentCoordinatorProxy::platformShowPaymentUI(const URL& originatingURL, const Vector<URL>& linkIconURLStrings, const WebCore::ApplePaySessionPaymentRequest& request, CompletionHandler<void(bool)>&& completionHandler) 42 42 { 43 UIViewController *presentingViewController = m_client.paymentCoordinatorPresentingViewController(*this);44 45 if (!presentingViewController) {46 completionHandler(false);47 return;48 }49 50 ASSERT(!m_paymentAuthorizationViewController);51 52 43 auto paymentRequest = platformPaymentRequest(originatingURL, linkIconURLStrings, request); 53 44 54 m_paymentAuthorizationViewController = adoptNS([PAL::allocPKPaymentAuthorizationViewControllerInstance() initWithPaymentRequest:paymentRequest.get()]); 55 if (!m_paymentAuthorizationViewController) { 56 completionHandler(false); 57 return; 58 } 45 ASSERT(!m_authorizationPresenter); 46 m_authorizationPresenter = m_client.paymentCoordinatorAuthorizationPresenter(*this, paymentRequest.get()); 47 if (!m_authorizationPresenter) 48 return completionHandler(false); 59 49 60 m_paymentAuthorizationViewControllerDelegate = adoptNS([[WKPaymentAuthorizationViewControllerDelegate alloc] initWithPaymentCoordinatorProxy:*this]); 61 m_paymentAuthorizationViewControllerDelegate->_paymentSummaryItems = [paymentRequest paymentSummaryItems]; 62 m_paymentAuthorizationViewControllerDelegate->_shippingMethods = [paymentRequest shippingMethods]; 63 64 [m_paymentAuthorizationViewController setDelegate:m_paymentAuthorizationViewControllerDelegate.get()]; 65 [m_paymentAuthorizationViewController setPrivateDelegate:m_paymentAuthorizationViewControllerDelegate.get()]; 66 67 [presentingViewController presentViewController:m_paymentAuthorizationViewController.get() animated:YES completion:nullptr]; 68 69 completionHandler(true); 50 m_authorizationPresenter->present(m_client.paymentCoordinatorPresentingViewController(*this), WTFMove(completionHandler)); 70 51 } 71 52 72 53 void WebPaymentCoordinatorProxy::hidePaymentUI() 73 54 { 74 ASSERT(m_paymentAuthorizationViewController); 75 ASSERT(m_paymentAuthorizationViewControllerDelegate); 76 77 [[m_paymentAuthorizationViewController presentingViewController] dismissViewControllerAnimated:YES completion:nullptr]; 78 [m_paymentAuthorizationViewController setDelegate:nil]; 79 [m_paymentAuthorizationViewController setPrivateDelegate:nil]; 80 m_paymentAuthorizationViewController = nullptr; 81 82 [m_paymentAuthorizationViewControllerDelegate invalidate]; 83 m_paymentAuthorizationViewControllerDelegate = nullptr; 55 m_authorizationPresenter->dismiss(); 56 m_authorizationPresenter = nullptr; 84 57 } 85 58 -
trunk/Source/WebKit/Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm
r242356 r242616 29 29 #if PLATFORM(MAC) && ENABLE(APPLE_PAY) 30 30 31 #import "PaymentAuthorizationViewController.h" 31 32 #import "WebPageProxy.h" 32 #import "WebPaymentCoordinatorProxyCocoa.h"33 33 #import <pal/cocoa/PassKitSoftLink.h> 34 34 #import <wtf/BlockPtr.h> … … 65 65 ASSERT(viewController); 66 66 67 paymentCoordinatorProxy->m_paymentAuthorizationViewControllerDelegate = adoptNS([[WKPaymentAuthorizationViewControllerDelegate alloc] initWithPaymentCoordinatorProxy:*paymentCoordinatorProxy]); 68 paymentCoordinatorProxy->m_paymentAuthorizationViewControllerDelegate->_paymentSummaryItems = [paymentRequest paymentSummaryItems]; 69 paymentCoordinatorProxy->m_paymentAuthorizationViewControllerDelegate->_shippingMethods = [paymentRequest shippingMethods]; 70 paymentCoordinatorProxy->m_paymentAuthorizationViewController = viewController; 71 [paymentCoordinatorProxy->m_paymentAuthorizationViewController setDelegate:paymentCoordinatorProxy->m_paymentAuthorizationViewControllerDelegate.get()]; 72 [paymentCoordinatorProxy->m_paymentAuthorizationViewController setPrivateDelegate:paymentCoordinatorProxy->m_paymentAuthorizationViewControllerDelegate.get()]; 67 paymentCoordinatorProxy->m_authorizationPresenter = std::make_unique<PaymentAuthorizationViewController>(*paymentCoordinatorProxy, paymentRequest.get(), viewController); 73 68 74 69 ASSERT(!paymentCoordinatorProxy->m_sheetWindow); … … 91 86 ++m_showPaymentUIRequestSeed; 92 87 93 ASSERT(!m_paymentAuthorizationViewController); 94 ASSERT(!m_paymentAuthorizationViewControllerDelegate); 88 ASSERT(!m_authorizationPresenter); 95 89 ASSERT(!m_sheetWindow); 96 90 return; 97 91 } 98 92 99 ASSERT(m_paymentAuthorizationViewController); 100 ASSERT(m_paymentAuthorizationViewControllerDelegate); 93 ASSERT(m_authorizationPresenter); 101 94 ASSERT(m_sheetWindow); 102 95 … … 105 98 106 99 [[m_sheetWindow sheetParent] endSheet:m_sheetWindow.get()]; 107 [m_paymentAuthorizationViewController setDelegate:nil]; 108 [m_paymentAuthorizationViewController setPrivateDelegate:nil]; 109 m_paymentAuthorizationViewController = nullptr; 110 111 [m_paymentAuthorizationViewControllerDelegate invalidate]; 112 m_paymentAuthorizationViewControllerDelegate = nullptr; 100 m_authorizationPresenter->dismiss(); 101 m_authorizationPresenter = nullptr; 113 102 114 103 m_sheetWindow = nullptr; -
trunk/Source/WebKit/SourcesCocoa.txt
r242503 r242616 1 // Copyright (C) 2018 Apple Inc. All rights reserved.1 // Copyright (C) 2018-2019 Apple Inc. All rights reserved. 2 2 // 3 3 // Redistribution and use in source and binary forms, with or without … … 66 66 Platform/classifier/ResourceLoadStatisticsClassifier.cpp 67 67 68 Platform/cocoa/PaymentAuthorizationPresenter.mm 69 Platform/cocoa/PaymentAuthorizationViewController.mm 68 70 Platform/cocoa/SharedMemoryCocoa.cpp 69 71 Platform/cocoa/WKCrashReporter.mm 72 Platform/cocoa/WKPaymentAuthorizationDelegate.mm 70 73 Platform/cocoa/WebKitAdditions.mm @no-unify 71 74 -
trunk/Source/WebKit/UIProcess/WebPageProxy.h
r242551 r242616 1987 1987 UIViewController *paymentCoordinatorPresentingViewController(const WebPaymentCoordinatorProxy&) final; 1988 1988 const String& paymentCoordinatorCTDataConnectionServiceType(const WebPaymentCoordinatorProxy&) final; 1989 std::unique_ptr<PaymentAuthorizationPresenter> paymentCoordinatorAuthorizationPresenter(WebPaymentCoordinatorProxy&, PKPaymentRequest *) final; 1989 1990 #endif 1990 1991 #if ENABLE(APPLE_PAY) && PLATFORM(MAC) -
trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
r242551 r242616 39 39 #import "NavigationState.h" 40 40 #import "PageClient.h" 41 #import "PaymentAuthorizationViewController.h" 41 42 #import "PrintInfo.h" 42 43 #import "RemoteLayerTreeDrawingAreaProxy.h" … … 1180 1181 #if ENABLE(APPLE_PAY) 1181 1182 1183 std::unique_ptr<PaymentAuthorizationPresenter> WebPageProxy::paymentCoordinatorAuthorizationPresenter(WebPaymentCoordinatorProxy& paymentCoordinatorProxy, PKPaymentRequest *paymentRequest) 1184 { 1185 return std::make_unique<PaymentAuthorizationViewController>(paymentCoordinatorProxy, paymentRequest); 1186 } 1187 1182 1188 UIViewController *WebPageProxy::paymentCoordinatorPresentingViewController(const WebPaymentCoordinatorProxy&) 1183 1189 { -
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
r242503 r242616 294 294 1AB16AE21648656D00290D62 /* RemoteLayerTreeDrawingAreaProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AB16AE01648656D00290D62 /* RemoteLayerTreeDrawingAreaProxy.h */; }; 295 295 1AB16AEA164B3A8800290D62 /* RemoteLayerTreeContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AB16AE8164B3A8800290D62 /* RemoteLayerTreeContext.h */; }; 296 1AB1F77E1D1B30A9007C9BD1 /* WebPaymentCoordinatorProxyCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AB1F7781D1B30A9007C9BD1 /* WebPaymentCoordinatorProxyCocoa.h */; };297 296 1AB1F78C1D1B3355007C9BD1 /* WebPaymentCoordinatorProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AB1F7891D1B3355007C9BD1 /* WebPaymentCoordinatorProxy.h */; }; 298 297 1AB1F7961D1B3613007C9BD1 /* WebPaymentCoordinatorMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AB1F7921D1B3613007C9BD1 /* WebPaymentCoordinatorMessageReceiver.cpp */; }; … … 1285 1284 A15EEDE61E301CEE000069B0 /* WKPasswordView.h in Headers */ = {isa = PBXBuildFile; fileRef = A15EEDE41E301CEE000069B0 /* WKPasswordView.h */; }; 1286 1285 A175C44A21AA3171000037D0 /* ArgumentCodersCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = A175C44921AA3170000037D0 /* ArgumentCodersCocoa.h */; }; 1286 A1798B3E222D97A2000764BD /* PaymentAuthorizationPresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = A1798B3D222D97A2000764BD /* PaymentAuthorizationPresenter.h */; }; 1287 A1798B43222D98DF000764BD /* PaymentAuthorizationViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = A1798B3F222D98B6000764BD /* PaymentAuthorizationViewController.h */; }; 1288 A1798B49222E531D000764BD /* WKPaymentAuthorizationDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = A1798B47222E530A000764BD /* WKPaymentAuthorizationDelegate.h */; }; 1289 A1798B4C222F1BD4000764BD /* WebPaymentCoordinatorProxyCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = A1798B4B222F1BD4000764BD /* WebPaymentCoordinatorProxyCocoa.h */; }; 1287 1290 A181A79821ACC74B0059A316 /* WebKitAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = A181A79721ACAC610059A316 /* WebKitAdditions.mm */; }; 1288 1291 A182D5B51BE6BD250087A7CC /* AccessibilityIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = A182D5B31BE6BD250087A7CC /* AccessibilityIOS.h */; }; … … 2229 2232 1AB1F7721D1B2F7E007C9BD1 /* WebPaymentCoordinator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPaymentCoordinator.h; sourceTree = "<group>"; }; 2230 2233 1AB1F7731D1B2F7E007C9BD1 /* WebPaymentCoordinator.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebPaymentCoordinator.messages.in; sourceTree = "<group>"; }; 2231 1AB1F7781D1B30A9007C9BD1 /* WebPaymentCoordinatorProxyCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPaymentCoordinatorProxyCocoa.h; sourceTree = "<group>"; };2232 2234 1AB1F7791D1B30A9007C9BD1 /* WebPaymentCoordinatorProxyCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebPaymentCoordinatorProxyCocoa.mm; sourceTree = "<group>"; }; 2233 2235 1AB1F77B1D1B30A9007C9BD1 /* WebPaymentCoordinatorProxyIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebPaymentCoordinatorProxyIOS.mm; sourceTree = "<group>"; }; … … 3854 3856 A175C44921AA3170000037D0 /* ArgumentCodersCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArgumentCodersCocoa.h; sourceTree = "<group>"; }; 3855 3857 A175C44B21AA331B000037D0 /* ArgumentCodersCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = ArgumentCodersCocoa.mm; sourceTree = "<group>"; }; 3858 A1798B3D222D97A2000764BD /* PaymentAuthorizationPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PaymentAuthorizationPresenter.h; sourceTree = "<group>"; }; 3859 A1798B3F222D98B6000764BD /* PaymentAuthorizationViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PaymentAuthorizationViewController.h; sourceTree = "<group>"; }; 3860 A1798B40222D98B6000764BD /* PaymentAuthorizationViewController.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = PaymentAuthorizationViewController.mm; sourceTree = "<group>"; }; 3861 A1798B47222E530A000764BD /* WKPaymentAuthorizationDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WKPaymentAuthorizationDelegate.h; sourceTree = "<group>"; }; 3862 A1798B48222E530A000764BD /* WKPaymentAuthorizationDelegate.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WKPaymentAuthorizationDelegate.mm; sourceTree = "<group>"; }; 3863 A1798B4A222F133A000764BD /* PaymentAuthorizationPresenter.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = PaymentAuthorizationPresenter.mm; sourceTree = "<group>"; }; 3864 A1798B4B222F1BD4000764BD /* WebPaymentCoordinatorProxyCocoa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebPaymentCoordinatorProxyCocoa.h; sourceTree = "<group>"; }; 3856 3865 A181A79721ACAC610059A316 /* WebKitAdditions.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WebKitAdditions.mm; sourceTree = "<group>"; }; 3857 3866 A182D5B21BE6BD250087A7CC /* AccessibilityIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AccessibilityIOS.mm; sourceTree = "<group>"; }; … … 5273 5282 isa = PBXGroup; 5274 5283 children = ( 5275 1AB1F7781D1B30A9007C9BD1/* WebPaymentCoordinatorProxyCocoa.h */,5284 A1798B4B222F1BD4000764BD /* WebPaymentCoordinatorProxyCocoa.h */, 5276 5285 1AB1F7791D1B30A9007C9BD1 /* WebPaymentCoordinatorProxyCocoa.mm */, 5277 5286 ); … … 6390 6399 isa = PBXGroup; 6391 6400 children = ( 6401 A1798B3D222D97A2000764BD /* PaymentAuthorizationPresenter.h */, 6402 A1798B4A222F133A000764BD /* PaymentAuthorizationPresenter.mm */, 6403 A1798B3F222D98B6000764BD /* PaymentAuthorizationViewController.h */, 6404 A1798B40222D98B6000764BD /* PaymentAuthorizationViewController.mm */, 6392 6405 4450AEBF1DC3FAE5009943F2 /* SharedMemoryCocoa.cpp */, 6393 6406 A181A79721ACAC610059A316 /* WebKitAdditions.mm */, 6394 6407 A1FB68221F6E518200C43F9F /* WKCrashReporter.h */, 6395 6408 A1FB68231F6E518200C43F9F /* WKCrashReporter.mm */, 6409 A1798B47222E530A000764BD /* WKPaymentAuthorizationDelegate.h */, 6410 A1798B48222E530A000764BD /* WKPaymentAuthorizationDelegate.mm */, 6396 6411 ); 6397 6412 path = cocoa; … … 9257 9272 1A8B66B01BC43C860082DF77 /* PageLoadStateObserver.h in Headers */, 9258 9273 C574A58112E66681002DFE98 /* PasteboardTypes.h in Headers */, 9274 A1798B3E222D97A2000764BD /* PaymentAuthorizationPresenter.h in Headers */, 9275 A1798B43222D98DF000764BD /* PaymentAuthorizationViewController.h in Headers */, 9259 9276 C1E123BA20A11573002646F4 /* PDFContextMenu.h in Headers */, 9260 9277 E19582D3153CBFD700B60875 /* PDFKitImports.h in Headers */, … … 9561 9578 1AB1F7971D1B3613007C9BD1 /* WebPaymentCoordinatorMessages.h in Headers */, 9562 9579 1AB1F78C1D1B3355007C9BD1 /* WebPaymentCoordinatorProxy.h in Headers */, 9563 1AB1F77E1D1B30A9007C9BD1/* WebPaymentCoordinatorProxyCocoa.h in Headers */,9580 A1798B4C222F1BD4000764BD /* WebPaymentCoordinatorProxyCocoa.h in Headers */, 9564 9581 1AB1F7991D1B3613007C9BD1 /* WebPaymentCoordinatorProxyMessages.h in Headers */, 9565 9582 0F850FE71ED7C39F00FB77A7 /* WebPerformanceLoggingClient.h in Headers */, … … 9875 9892 A5EFD38C16B0E88C00B2F0E8 /* WKPageVisibilityTypes.h in Headers */, 9876 9893 A15EEDE61E301CEE000069B0 /* WKPasswordView.h in Headers */, 9894 A1798B49222E531D000764BD /* WKPaymentAuthorizationDelegate.h in Headers */, 9877 9895 2D6AB541192B1C4A003A9FD1 /* WKPDFPageNumberIndicator.h in Headers */, 9878 9896 A1046EA12079263100F0C5D8 /* WKPDFView.h in Headers */, … … 10869 10887 E18E6917169B667B009B6670 /* SecItemShimProxyMessageReceiver.cpp in Sources */, 10870 10888 617A52D81F43A9DA00DCDC0A /* ServiceWorkerClientFetchMessageReceiver.cpp in Sources */, 10889 41DE7C6C22278F1E00532B65 /* ServiceWorkerFetchTask.cpp in Sources */, 10871 10890 2D92A787212B6AB100F493FD /* ShareableBitmap.cpp in Sources */, 10872 10891 2DE6943D18BD2A68005C15E5 /* SmartMagnificationControllerMessageReceiver.cpp in Sources */, … … 11053 11072 2D8508D8212E33ED000EF46C /* UnifiedSource98.cpp in Sources */, 11054 11073 2D8508C5212E33ED000EF46C /* UnifiedSource99.cpp in Sources */, 11055 41DE7C6C22278F1E00532B65 /* ServiceWorkerFetchTask.cpp in Sources */,11056 11074 2D8508D2212E33ED000EF46C /* UnifiedSource100.cpp in Sources */, 11057 11075 CD491B0D1E732E4D00009066 /* UserMediaCaptureManagerMessageReceiver.cpp in Sources */,
Note: See TracChangeset
for help on using the changeset viewer.