Changeset 248692 in webkit
- Timestamp:
- Aug 14, 2019 3:55:30 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r248688 r248692 1 2019-08-14 Andy Estes <aestes@apple.com> 2 3 [Cocoa] Add some WKA extension points 4 https://bugs.webkit.org/show_bug.cgi?id=200506 5 <rdar://problem/51682474> 6 7 Reviewed by Tim Horton. 8 9 * Modules/applepay/ApplePayPayment.h: 10 * Modules/applepay/ApplePayPaymentMethod.h: 11 * Modules/applepay/ApplePayRequestBase.cpp: 12 (WebCore::finishConverting): 13 (WebCore::convertAndValidate): 14 * Modules/applepay/ApplePayRequestBase.h: 15 * Modules/applepay/ApplePaySessionPaymentRequest.h: 16 * Modules/applepay/PaymentCoordinatorClient.cpp: 17 (WebCore::PaymentCoordinatorClient::supportsVersion): 18 * Modules/applepay/cocoa/PaymentCocoa.mm: 19 (WebCore::convert): 20 * Modules/applepay/cocoa/PaymentMethodCocoa.mm: 21 (WebCore::finishConverting): 22 (WebCore::convert): 23 1 24 2019-08-14 Devin Rousso <drousso@apple.com> 2 25 -
trunk/Source/WebCore/Modules/applepay/ApplePayPayment.h
r239427 r248692 1 1 /* 2 * Copyright (C) 2016 Apple Inc. All rights reserved.2 * Copyright (C) 2016-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 31 31 #include "ApplePayPaymentMethod.h" 32 32 33 #if USE(APPLE_INTERNAL_SDK) 34 #include <WebKitAdditions/ApplePayPaymentAdditions.h> 35 #endif 36 33 37 namespace WebCore { 34 38 … … 43 47 Optional<ApplePayPaymentContact> billingContact; 44 48 Optional<ApplePayPaymentContact> shippingContact; 49 50 #if defined(APPLEPAYPAYMENT_ADDITIONS) 51 APPLEPAYPAYMENT_ADDITIONS 52 #undef APPLEPAYPAYMENT_ADDITIONS 53 #endif 45 54 }; 46 55 -
trunk/Source/WebCore/Modules/applepay/ApplePayPaymentMethod.h
r239427 r248692 1 1 /* 2 * Copyright (C) 2016 Apple Inc. All rights reserved.2 * Copyright (C) 2016-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 31 31 #include <wtf/Optional.h> 32 32 33 #if USE(APPLE_INTERNAL_SDK) 34 #include <WebKitAdditions/ApplePayPaymentMethodAdditions.h> 35 #endif 36 33 37 namespace WebCore { 34 38 … … 37 41 struct ApplePayPaymentMethod { 38 42 using Type = ApplePayPaymentMethodType; 39 43 40 44 String displayName; 41 45 String network; 42 46 Optional<Type> type; 43 47 Optional<ApplePayPaymentPass> paymentPass; 48 49 #if defined(APPLEPAYPAYMENTMETHOD_ADDITIONS) 50 APPLEPAYPAYMENTMETHOD_ADDITIONS 51 #undef APPLEPAYPAYMENTMETHOD_ADDITIONS 52 #endif 44 53 }; 45 54 -
trunk/Source/WebCore/Modules/applepay/ApplePayRequestBase.cpp
r243324 r248692 31 31 #include "PaymentCoordinator.h" 32 32 #include <wtf/text/StringConcatenateNumbers.h> 33 34 #if USE(APPLE_INTERNAL_SDK) 35 #include <WebKitAdditions/ApplePayRequestBaseAdditions.cpp> 36 #else 37 namespace WebCore { 38 static void finishConverting(ApplePaySessionPaymentRequest&, ApplePayRequestBase&) { } 39 } 40 #endif 33 41 34 42 namespace WebCore { … … 79 87 if (request.billingContact) 80 88 result.setBillingContact(PaymentContact::fromApplePayPaymentContact(version, *request.billingContact)); 81 89 82 90 if (request.requiredShippingContactFields) { 83 91 auto requiredShippingContactFields = convertAndValidate(version, *request.requiredShippingContactFields); … … 95 103 result.setSupportedCountries(WTFMove(request.supportedCountries)); 96 104 105 finishConverting(result, request); 106 97 107 return WTFMove(result); 98 108 } -
trunk/Source/WebCore/Modules/applepay/ApplePayRequestBase.h
r243324 r248692 32 32 #include "ApplePayPaymentContact.h" 33 33 34 #if USE(APPLE_INTERNAL_SDK) 35 #include <WebKitAdditions/ApplePayRequestBaseAdditions.h> 36 #endif 37 34 38 namespace WebCore { 35 39 … … 50 54 String applicationData; 51 55 Vector<String> supportedCountries; 56 57 #if defined(APPLEPAYREQUESTBASE_ADDITIONS) 58 APPLEPAYREQUESTBASE_ADDITIONS 59 #undef APPLEPAYREQUESTBASE_ADDITIONS 60 #endif 52 61 }; 53 62 -
trunk/Source/WebCore/Modules/applepay/ApplePaySessionPaymentRequest.h
r239427 r248692 1 1 /* 2 * Copyright (C) 2015-201 7Apple Inc. All rights reserved.2 * Copyright (C) 2015-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 33 33 #include <wtf/text/WTFString.h> 34 34 35 #if USE(APPLE_INTERNAL_SDK) 36 #include <WebKitAdditions/ApplePaySessionPaymentRequestAdditions.h> 37 #endif 38 35 39 namespace WebCore { 36 40 … … 138 142 void setRequester(Requester requester) { m_requester = requester; } 139 143 144 #if defined(APPLEPAYSESSIONPAYMENTREQUEST_PUBLIC_ADDITIONS) 145 APPLEPAYSESSIONPAYMENTREQUEST_PUBLIC_ADDITIONS 146 #undef APPLEPAYSESSIONPAYMENTREQUEST_PUBLIC_ADDITIONS 147 #endif 148 140 149 private: 141 150 unsigned m_version { 0 }; … … 163 172 164 173 Requester m_requester { Requester::ApplePayJS }; 174 175 #if defined(APPLEPAYSESSIONPAYMENTREQUEST_PRIVATE_ADDITIONS) 176 APPLEPAYSESSIONPAYMENTREQUEST_PRIVATE_ADDITIONS 177 #undef APPLEPAYSESSIONPAYMENTREQUEST_PRIVATE_ADDITIONS 178 #endif 165 179 }; 166 180 -
trunk/Source/WebCore/Modules/applepay/PaymentCoordinatorClient.cpp
r244727 r248692 41 41 #elif !ENABLE(APPLE_PAY_SESSION_V7) 42 42 static const unsigned currentVersion = 6; 43 #elif !ENABLE(APPLE_PAY_SESSION_V8) 44 static const unsigned currentVersion = 7; 43 45 #else 44 static const unsigned currentVersion = 7;46 static const unsigned currentVersion = 8; 45 47 #endif 46 48 -
trunk/Source/WebCore/Modules/applepay/cocoa/PaymentCocoa.mm
r238515 r248692 34 34 #import <pal/spi/cocoa/PassKitSPI.h> 35 35 36 #if USE(APPLE_INTERNAL_SDK) 37 #import <WebKitAdditions/PaymentCocoaAdditions.mm> 38 #else 39 namespace WebCore { 40 static void finishConverting(PKPayment *, ApplePayPayment&) { } 41 } 42 #endif 43 36 44 namespace WebCore { 37 45 … … 65 73 result.shippingContact = PaymentContact(payment.shippingContact).toApplePayPaymentContact(version); 66 74 75 finishConverting(payment, result); 76 67 77 return result; 68 78 } -
trunk/Source/WebCore/Modules/applepay/cocoa/PaymentMethodCocoa.mm
r239427 r248692 1 1 /* 2 * Copyright (C) 2016-201 8Apple Inc. All rights reserved.2 * Copyright (C) 2016-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 32 32 #import "ApplePayPaymentMethodType.h" 33 33 #import <pal/spi/cocoa/PassKitSPI.h> 34 35 #if USE(APPLE_INTERNAL_SDK) 36 #import <WebKitAdditions/PaymentMethodCocoaAdditions.mm> 37 #else 38 namespace WebCore { 39 static void finishConverting(PKPaymentMethod *, ApplePayPaymentMethod&) { } 40 } 41 #endif 34 42 35 43 namespace WebCore { … … 99 107 result.paymentPass = convert(paymentMethod.paymentPass); 100 108 109 finishConverting(paymentMethod, result); 110 101 111 return result; 102 112 } -
trunk/Source/WebKit/ChangeLog
r248690 r248692 1 2019-08-14 Andy Estes <aestes@apple.com> 2 3 [Cocoa] Add some WKA extension points 4 https://bugs.webkit.org/show_bug.cgi?id=200506 5 <rdar://problem/51682474> 6 7 Reviewed by Tim Horton. 8 9 * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm: 10 (WebKit::finishCreating): 11 (WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): 12 * Shared/Cocoa/WebCoreArgumentCodersCocoa.mm: 13 (IPC::finishDecoding): 14 (IPC::finishEncoding): 15 (IPC::ArgumentCoder<ApplePaySessionPaymentRequest>::encode): 16 (IPC::ArgumentCoder<ApplePaySessionPaymentRequest>::decode): 17 * Shared/WebCoreArgumentCoders.h: 18 1 19 2019-08-14 Luming Yin <luming_yin@apple.com> 2 20 -
trunk/Source/WebKit/Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm
r246235 r248692 38 38 #import <wtf/URL.h> 39 39 40 #if USE(APPLE_INTERNAL_SDK) 41 #import <WebKitAdditions/WebPaymentCoordinatorProxyCocoaAdditions.mm> 42 #else 43 namespace WebKit { 44 static void finishCreating(PKPaymentRequest *, const WebCore::ApplePaySessionPaymentRequest&) { } 45 } 46 #endif 47 40 48 // FIXME: We don't support any platforms without -setThumbnailURLs:, so this can be removed. 41 49 @interface PKPaymentRequest () … … 329 337 #endif 330 338 339 finishCreating(result.get(), paymentRequest); 340 331 341 return result; 332 342 } -
trunk/Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.mm
r242950 r248692 1 1 /* 2 * Copyright (C) 2016-201 8Apple Inc. All rights reserved.2 * Copyright (C) 2016-2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 42 42 #endif 43 43 44 #if USE(APPLE_INTERNAL_SDK) 45 #import <WebKitAdditions/WebCoreArgumentCodersCocoaAdditions.mm> 46 #else 47 namespace IPC { 48 static bool finishDecoding(Decoder&, WebCore::ApplePaySessionPaymentRequest&) { return true; } 49 static void finishEncoding(Encoder&, const WebCore::ApplePaySessionPaymentRequest&) { } 50 } 51 #endif 52 44 53 namespace IPC { 45 54 using namespace WebCore; … … 182 191 encoder << request.supportedCountries(); 183 192 encoder.encodeEnum(request.requester()); 193 finishEncoding(encoder, request); 184 194 } 185 195 … … 263 273 return false; 264 274 request.setRequester(requester); 275 276 if (!finishDecoding(decoder, request)) 277 return false; 265 278 266 279 return true; -
trunk/Source/WebKit/Shared/WebCoreArgumentCoders.h
r246725 r248692 49 49 #if USE(CURL) 50 50 #include <WebCore/CurlProxySettings.h> 51 #endif 52 53 #if USE(APPLE_INTERNAL_SDK) 54 #include <WebKitAdditions/WebCoreArgumentCodersAdditions.h> 51 55 #endif 52 56
Note: See TracChangeset
for help on using the changeset viewer.