Changeset 283320 in webkit
- Timestamp:
- Sep 30, 2021, 10:48:19 AM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 27 edited
-
WTF/ChangeLog (modified) (1 diff)
-
WTF/wtf/PlatformEnableCocoa.h (modified) (1 diff)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/NetworkProcess/NetworkConnectionToWebProcess.h (modified) (1 diff)
-
WebKit/NetworkProcess/ios/NetworkConnectionToWebProcessIOS.mm (modified) (2 diffs)
-
WebKit/Platform/cocoa/PaymentAuthorizationPresenter.h (modified) (2 diffs)
-
WebKit/Platform/cocoa/PaymentAuthorizationViewController.h (modified) (1 diff)
-
WebKit/Platform/cocoa/PaymentAuthorizationViewController.mm (modified) (1 diff)
-
WebKit/Platform/cocoa/WKPaymentAuthorizationDelegate.h (modified) (1 diff)
-
WebKit/Platform/cocoa/WKPaymentAuthorizationDelegate.mm (modified) (1 diff)
-
WebKit/Platform/ios/PaymentAuthorizationController.h (modified) (1 diff)
-
WebKit/Platform/ios/PaymentAuthorizationController.mm (modified) (3 diffs)
-
WebKit/Platform/spi/ios/UIKitSPI.h (modified) (1 diff)
-
WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.cpp (modified) (2 diffs)
-
WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.h (modified) (4 diffs)
-
WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in (modified) (1 diff)
-
WebKit/Shared/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm (modified) (2 diffs)
-
WebKit/Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm (modified) (1 diff)
-
WebKit/UIProcess/Network/NetworkProcessProxy.cpp (modified) (2 diffs)
-
WebKit/UIProcess/Network/NetworkProcessProxy.h (modified) (1 diff)
-
WebKit/UIProcess/Network/NetworkProcessProxy.messages.in (modified) (1 diff)
-
WebKit/UIProcess/PageClient.h (modified) (1 diff)
-
WebKit/UIProcess/WebPageProxy.h (modified) (1 diff)
-
WebKit/UIProcess/ios/PageClientImplIOS.h (modified) (1 diff)
-
WebKit/UIProcess/ios/PageClientImplIOS.mm (modified) (1 diff)
-
WebKit/UIProcess/ios/WebPageProxyIOS.mm (modified) (1 diff)
-
WebKit/WebProcess/ApplePay/WebPaymentCoordinator.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r283317 r283320 1 2021-09-30 Eddy Wong <eddy_wong@apple.com> 2 3 Adopt presentationSceneIdentifierForPaymentAuthorizationController delegate call from PassKit 4 https://bugs.webkit.org/show_bug.cgi?id=230874 5 6 Reviewed by Devin Rousso. 7 8 * wtf/PlatformEnableCocoa.h: Defines new flag ENABLE_APPLE_PAY_REMOTE_UI_USES_SCENE 9 1 10 2021-09-30 Darin Adler <darin@apple.com> 2 11 -
trunk/Source/WTF/wtf/PlatformEnableCocoa.h
r282954 r283320 84 84 #endif 85 85 86 #if !defined(ENABLE_APPLE_PAY_REMOTE_UI) && !PLATFORM(MAC) && !PLATFORM(MACCATALYST) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) 86 #if !PLATFORM(MAC) && !PLATFORM(MACCATALYST) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) 87 88 #if !defined(ENABLE_APPLE_PAY_REMOTE_UI) 87 89 #define ENABLE_APPLE_PAY_REMOTE_UI 1 88 90 #endif 91 92 #if !defined(ENABLE_APPLE_PAY_REMOTE_UI_USES_SCENE) && HAVE(UIKIT_WEBKIT_INTERNALS) 93 #define ENABLE_APPLE_PAY_REMOTE_UI_USES_SCENE 1 94 #endif 95 96 #endif // !PLATFORM(MAC) && !PLATFORM(MACCATALYST) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) 89 97 90 98 #if !defined(ENABLE_APPLE_PAY_SESSION_V11) && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140500)) -
trunk/Source/WebKit/ChangeLog
r283319 r283320 1 2021-09-30 Eddy Wong <eddy_wong@apple.com> 2 3 Adopt presentationSceneIdentifierForPaymentAuthorizationController delegate call from PassKit 4 https://bugs.webkit.org/show_bug.cgi?id=230874 5 6 Reviewed by Devin Rousso. 7 8 * NetworkProcess/NetworkConnectionToWebProcess.h: 9 * NetworkProcess/ios/NetworkConnectionToWebProcessIOS.mm: 10 (WebKit::NetworkConnectionToWebProcess::getWindowSceneIdentifierForPaymentPresentation): Implements getWindowSceneIdentifierForPaymentPresentation() by asking parent process (UIProcess) for scene ID via new XPC message. 11 * Platform/cocoa/PaymentAuthorizationPresenter.h: 12 (WebKit::PaymentAuthorizationPresenter::sceneIdentifier const): Holds temporarily the scene ID we'd like to use when presenting the payment sheet, to be read by WKPaymentAuthorizationControllerDelegate. 13 * Platform/cocoa/PaymentAuthorizationViewController.h: Declares presentInScene() which is just for conformance to PaymentAuthorizationPresenter 14 * Platform/cocoa/PaymentAuthorizationViewController.mm: 15 (WebKit::PaymentAuthorizationViewController::presentInScene): Provides a dummy implementation for presentInScene() for conformance. 16 * Platform/cocoa/WKPaymentAuthorizationDelegate.h: Surfaces _presenter for PaymentAuthorizationPresenter's use. 17 * Platform/cocoa/WKPaymentAuthorizationDelegate.mm: Ditto. 18 * Platform/ios/PaymentAuthorizationController.h: 19 * Platform/ios/PaymentAuthorizationController.mm: 20 (-[WKPaymentAuthorizationControllerDelegate presentationSceneIdentifierForPaymentAuthorizationController:]): Implements the new PassKit delegate call returning the scene ID for the UIProcess. 21 (WebKit::PaymentAuthorizationController::dismiss): House keeping. 22 (WebKit::PaymentAuthorizationController::presentInScene): Stores the scene ID from the caller for WKPaymentAuthorizationControllerDelegate to read from. 23 * Shared/ApplePay/WebPaymentCoordinatorProxy.cpp: 24 (WebKit::WebPaymentCoordinatorProxy::showPaymentUI): Relays webPageProxyID for use by UIProcess ultimately to look up the correct WebPageProxy. 25 * Shared/ApplePay/WebPaymentCoordinatorProxy.h: Ditto. 26 * Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in: Ditto. 27 * Shared/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm: 28 (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI): Presents payment sheet with scene ID if applicable. 29 * Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm: 30 (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI): Signature change. 31 * UIProcess/Network/NetworkProcessProxy.cpp: 32 (WebKit::NetworkProcessProxy::getWindowSceneIdentifierForPaymentPresentation): Looks up the correct WebPageProxy and retrieve the scene ID for the caller (NetworkProcess). 33 * UIProcess/Network/NetworkProcessProxy.h: Ditto. 34 * UIProcess/Network/NetworkProcessProxy.messages.in: Ditto. 35 * UIProcess/PageClient.h: Adds ability to retrieve scene ID. 36 * UIProcess/WebPageProxy.h: 37 * UIProcess/ios/PageClientImplIOS.h: Ditto. 38 * UIProcess/ios/PageClientImplIOS.mm: 39 (WebKit::PageClientImpl::sceneID): Ditto. 40 * UIProcess/ios/WebPageProxyIOS.mm: 41 (WebKit::WebPageProxy::getWindowSceneIdentifierForPaymentPresentation): Dummy implementation for conformance to WebPageProxy. WebProcess does not talk to UIProcess directly for this function. 42 * WebProcess/ApplePay/WebPaymentCoordinator.cpp: 43 (WebKit::WebPaymentCoordinator::showPaymentUI): Passes the WebPageProxyIdentifier along. 44 45 1 46 2021-09-30 Jer Noble <jer.noble@apple.com> 2 47 -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
r282712 r283320 356 356 IPC::Connection* paymentCoordinatorConnection(const WebPaymentCoordinatorProxy&) final; 357 357 UIViewController *paymentCoordinatorPresentingViewController(const WebPaymentCoordinatorProxy&) final; 358 #if ENABLE(APPLE_PAY_REMOTE_UI_USES_SCENE) 359 void getWindowSceneIdentifierForPaymentPresentation(WebPageProxyIdentifier, CompletionHandler<void(const String&)>&&) final; 360 #endif 358 361 const String& paymentCoordinatorBoundInterfaceIdentifier(const WebPaymentCoordinatorProxy&) final; 359 362 const String& paymentCoordinatorCTDataConnectionServiceType(const WebPaymentCoordinatorProxy&) final; -
trunk/Source/WebKit/NetworkProcess/ios/NetworkConnectionToWebProcessIOS.mm
r261617 r283320 26 26 #import "config.h" 27 27 #import "NetworkConnectionToWebProcess.h" 28 #import "NetworkProcessProxyMessages.h" 28 29 29 30 #if PLATFORM(IOS_FAMILY) … … 52 53 return nil; 53 54 } 55 56 #if ENABLE(APPLE_PAY_REMOTE_UI_USES_SCENE) 57 void NetworkConnectionToWebProcess::getWindowSceneIdentifierForPaymentPresentation(WebPageProxyIdentifier webPageProxyIdentifier, CompletionHandler<void(const String&)>&& completionHandler) 58 { 59 networkProcess().parentProcessConnection()->sendWithAsyncReply(Messages::NetworkProcessProxy::GetWindowSceneIdentifierForPaymentPresentation(webPageProxyIdentifier), WTFMove(completionHandler)); 60 } 61 #endif 54 62 55 63 const String& NetworkConnectionToWebProcess::paymentCoordinatorBoundInterfaceIdentifier(const WebPaymentCoordinatorProxy&) -
trunk/Source/WebKit/Platform/cocoa/PaymentAuthorizationPresenter.h
r278630 r283320 86 86 #if PLATFORM(IOS_FAMILY) 87 87 virtual void present(UIViewController *, CompletionHandler<void(bool)>&&) = 0; 88 #if ENABLE(APPLE_PAY_REMOTE_UI_USES_SCENE) 89 virtual void presentInScene(const String&, CompletionHandler<void(bool)>&&) = 0; 90 const String& sceneIdentifier() const { return m_sceneIdentifier; } 91 #endif 88 92 #endif 89 93 … … 96 100 virtual WKPaymentAuthorizationDelegate *platformDelegate() = 0; 97 101 102 #if PLATFORM(IOS_FAMILY) && ENABLE(APPLE_PAY_REMOTE_UI_USES_SCENE) 103 String m_sceneIdentifier; 104 #endif 105 98 106 private: 99 107 Client& m_client; -
trunk/Source/WebKit/Platform/cocoa/PaymentAuthorizationViewController.h
r250579 r283320 50 50 #if PLATFORM(IOS_FAMILY) 51 51 void present(UIViewController *, CompletionHandler<void(bool)>&&) final; 52 #if ENABLE(APPLE_PAY_REMOTE_UI_USES_SCENE) 53 void presentInScene(const String&, CompletionHandler<void(bool)>&&) final; 54 #endif 52 55 #endif 53 56 -
trunk/Source/WebKit/Platform/cocoa/PaymentAuthorizationViewController.mm
r278630 r283320 154 154 } 155 155 156 #if ENABLE(APPLE_PAY_REMOTE_UI_USES_SCENE) 157 void PaymentAuthorizationViewController::presentInScene(const String&, CompletionHandler<void(bool)>&& completionHandler) 158 { 159 ASSERT_NOT_REACHED(); 160 completionHandler(false); 161 } 162 #endif 163 156 164 #endif 157 165 -
trunk/Source/WebKit/Platform/cocoa/WKPaymentAuthorizationDelegate.h
r278630 r283320 52 52 @interface WKPaymentAuthorizationDelegate : NSObject { 53 53 RetainPtr<PKPaymentRequest> _request; 54 WeakPtr<WebKit::PaymentAuthorizationPresenter> _presenter; 54 55 } 55 56 -
trunk/Source/WebKit/Platform/cocoa/WKPaymentAuthorizationDelegate.mm
r278630 r283320 38 38 RetainPtr<NSArray<PKShippingMethod *>> _shippingMethods; 39 39 RetainPtr<NSError> _sessionError; 40 WeakPtr<WebKit::PaymentAuthorizationPresenter> _presenter;41 40 WebKit::DidAuthorizePaymentCompletion _didAuthorizePaymentCompletion; 42 41 WebKit::DidRequestMerchantSessionCompletion _didRequestMerchantSessionCompletion; -
trunk/Source/WebKit/Platform/ios/PaymentAuthorizationController.h
r242748 r283320 47 47 void dismiss() final; 48 48 void present(UIViewController *, CompletionHandler<void(bool)>&&) final; 49 #if ENABLE(APPLE_PAY_REMOTE_UI_USES_SCENE) 50 void presentInScene(const String&, CompletionHandler<void(bool)>&&) final; 51 #endif 49 52 50 53 RetainPtr<PKPaymentAuthorizationController> m_controller; -
trunk/Source/WebKit/Platform/ios/PaymentAuthorizationController.mm
r278630 r283320 106 106 } 107 107 108 #if ENABLE(APPLE_PAY_REMOTE_UI_USES_SCENE) 109 - (NSString *)presentationSceneIdentifierForPaymentAuthorizationController:(PKPaymentAuthorizationController *)controller 110 { 111 if (!_presenter) 112 return nil; 113 return nsStringNilIfEmpty(_presenter->sceneIdentifier()); 114 } 115 #endif 116 108 117 @end 109 118 … … 132 141 [m_delegate invalidate]; 133 142 m_delegate = nil; 143 #if ENABLE(APPLE_PAY_REMOTE_UI_USES_SCENE) 144 m_sceneIdentifier = nullString(); 145 #endif 134 146 } 135 147 … … 144 156 } 145 157 158 #if ENABLE(APPLE_PAY_REMOTE_UI_USES_SCENE) 159 void PaymentAuthorizationController::presentInScene(const String& sceneIdentifier, CompletionHandler<void(bool)>&& completionHandler) 160 { 161 m_sceneIdentifier = sceneIdentifier; 162 present(nil, WTFMove(completionHandler)); 163 } 164 #endif 165 146 166 } // namespace WebKit 147 167 -
trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h
r282877 r283320 1292 1292 #endif 1293 1293 1294 @interface UIScene () 1295 @property (nonatomic, readonly) NSString *_sceneIdentifier; 1296 @end 1297 1294 1298 #endif // USE(APPLE_INTERNAL_SDK) 1295 1299 -
trunk/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.cpp
r278630 r283320 79 79 } 80 80 81 void WebPaymentCoordinatorProxy::showPaymentUI(WebCore::PageIdentifier destinationID, const String& originatingURLString, const Vector<String>& linkIconURLStrings, const WebCore::ApplePaySessionPaymentRequest& paymentRequest, CompletionHandler<void(bool)>&& completionHandler)81 void WebPaymentCoordinatorProxy::showPaymentUI(WebCore::PageIdentifier destinationID, WebPageProxyIdentifier webPageProxyID, const String& originatingURLString, const Vector<String>& linkIconURLStrings, const WebCore::ApplePaySessionPaymentRequest& paymentRequest, CompletionHandler<void(bool)>&& completionHandler) 82 82 { 83 83 if (auto& coordinator = activePaymentCoordinatorProxy()) … … 98 98 linkIconURLs.append(URL(URL(), linkIconURLString)); 99 99 100 platformShowPaymentUI( originatingURL, linkIconURLs, paymentRequest, [this, weakThis = makeWeakPtr(*this)](bool result) {100 platformShowPaymentUI(webPageProxyID, originatingURL, linkIconURLs, paymentRequest, [this, weakThis = makeWeakPtr(*this)](bool result) { 101 101 if (!weakThis) 102 102 return; -
trunk/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.h
r278630 r283320 31 31 #include "MessageSender.h" 32 32 #include "PaymentAuthorizationPresenter.h" 33 #include "WebPageProxyIdentifier.h" 33 34 #include <WebCore/PageIdentifier.h> 34 35 #include <WebCore/PaymentHeaders.h> … … 92 93 #if PLATFORM(IOS_FAMILY) 93 94 virtual UIViewController *paymentCoordinatorPresentingViewController(const WebPaymentCoordinatorProxy&) = 0; 95 #if ENABLE(APPLE_PAY_REMOTE_UI_USES_SCENE) 96 virtual void getWindowSceneIdentifierForPaymentPresentation(WebPageProxyIdentifier, CompletionHandler<void(const String&)>&&) = 0; 97 #endif 94 98 virtual const String& paymentCoordinatorCTDataConnectionServiceType(const WebPaymentCoordinatorProxy&) = 0; 95 99 virtual std::unique_ptr<PaymentAuthorizationPresenter> paymentCoordinatorAuthorizationPresenter(WebPaymentCoordinatorProxy&, PKPaymentRequest *) = 0; … … 128 132 void canMakePaymentsWithActiveCard(const String& merchantIdentifier, const String& domainName, CompletionHandler<void(bool)>&&); 129 133 void openPaymentSetup(const String& merchantIdentifier, const String& domainName, CompletionHandler<void(bool)>&&); 130 void showPaymentUI(WebCore::PageIdentifier destinationID, const String& originatingURLString, const Vector<String>& linkIconURLStrings, const WebCore::ApplePaySessionPaymentRequest&, CompletionHandler<void(bool)>&&);134 void showPaymentUI(WebCore::PageIdentifier destinationID, WebPageProxyIdentifier, const String& originatingURLString, const Vector<String>& linkIconURLStrings, const WebCore::ApplePaySessionPaymentRequest&, CompletionHandler<void(bool)>&&); 131 135 void completeMerchantValidation(const WebCore::PaymentMerchantSession&); 132 136 void completeShippingMethodSelection(std::optional<WebCore::ApplePayShippingMethodUpdate>&&); … … 156 160 void platformCanMakePaymentsWithActiveCard(const String& merchantIdentifier, const String& domainName, WTF::Function<void(bool)>&& completionHandler); 157 161 void platformOpenPaymentSetup(const String& merchantIdentifier, const String& domainName, WTF::Function<void(bool)>&& completionHandler); 158 void platformShowPaymentUI( const URL& originatingURL, const Vector<URL>& linkIconURLs, const WebCore::ApplePaySessionPaymentRequest&, CompletionHandler<void(bool)>&&);162 void platformShowPaymentUI(WebPageProxyIdentifier, const URL& originatingURL, const Vector<URL>& linkIconURLs, const WebCore::ApplePaySessionPaymentRequest&, CompletionHandler<void(bool)>&&); 159 163 void platformCompleteMerchantValidation(const WebCore::PaymentMerchantSession&); 160 164 void platformCompleteShippingMethodSelection(std::optional<WebCore::ApplePayShippingMethodUpdate>&&); -
trunk/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in
r278630 r283320 31 31 OpenPaymentSetup(String merchantIdentifier, String domainName) -> (bool result) Async 32 32 33 ShowPaymentUI(WebCore::PageIdentifier destinationID, String originatingURLString, Vector<String> linkIconURLStrings, WebCore::ApplePaySessionPaymentRequest paymentRequest) -> (bool result) Synchronous33 ShowPaymentUI(WebCore::PageIdentifier destinationID, WebKit::WebPageProxyIdentifier webPageProxyIdentifier, String originatingURLString, Vector<String> linkIconURLStrings, WebCore::ApplePaySessionPaymentRequest paymentRequest) -> (bool result) Synchronous 34 34 CompleteMerchantValidation(WebCore::PaymentMerchantSession paymentMerchantSession) 35 35 CompleteShippingMethodSelection(std::optional<WebCore::ApplePayShippingMethodUpdate> update) -
trunk/Source/WebKit/Shared/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm
r263426 r283320 47 47 } 48 48 49 void WebPaymentCoordinatorProxy::platformShowPaymentUI( const URL& originatingURL, const Vector<URL>& linkIconURLStrings, const WebCore::ApplePaySessionPaymentRequest& request, CompletionHandler<void(bool)>&& completionHandler)49 void WebPaymentCoordinatorProxy::platformShowPaymentUI(WebPageProxyIdentifier webPageProxyID, const URL& originatingURL, const Vector<URL>& linkIconURLStrings, const WebCore::ApplePaySessionPaymentRequest& request, CompletionHandler<void(bool)>&& completionHandler) 50 50 { 51 51 auto paymentRequest = platformPaymentRequest(originatingURL, linkIconURLStrings, request); … … 56 56 return completionHandler(false); 57 57 58 #if ENABLE(APPLE_PAY_REMOTE_UI_USES_SCENE) 59 m_client.getWindowSceneIdentifierForPaymentPresentation(webPageProxyID, [weakThis = makeWeakPtr(*this), completionHandler = WTFMove(completionHandler)](const String& sceneID) mutable { 60 if (!weakThis) { 61 completionHandler(false); 62 return; 63 } 64 65 if (!weakThis->m_authorizationPresenter) { 66 completionHandler(false); 67 return; 68 } 69 70 weakThis->m_authorizationPresenter->presentInScene(sceneID, WTFMove(completionHandler)); 71 }); 72 #else 73 UNUSED_PARAM(webPageProxyID); 58 74 m_authorizationPresenter->present(m_client.paymentCoordinatorPresentingViewController(*this), WTFMove(completionHandler)); 75 #endif 59 76 } 60 77 -
trunk/Source/WebKit/Shared/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm
r263426 r283320 48 48 } 49 49 50 void WebPaymentCoordinatorProxy::platformShowPaymentUI( const URL& originatingURL, const Vector<URL>& linkIconURLStrings, const WebCore::ApplePaySessionPaymentRequest& request, CompletionHandler<void(bool)>&& completionHandler)50 void WebPaymentCoordinatorProxy::platformShowPaymentUI(WebPageProxyIdentifier, const URL& originatingURL, const Vector<URL>& linkIconURLStrings, const WebCore::ApplePaySessionPaymentRequest& request, CompletionHandler<void(bool)>&& completionHandler) 51 51 { 52 52 if (!PAL::isPassKitFrameworkAvailable()) -
trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp
r283179 r283320 45 45 #include "NetworkProcessMessages.h" 46 46 #include "NetworkProcessProxyMessages.h" 47 #include "PageClient.h" 47 48 #include "SandboxExtension.h" 48 49 #if HAVE(SEC_KEY_PROXY) … … 1173 1174 #endif 1174 1175 1176 #if ENABLE(APPLE_PAY_REMOTE_UI_USES_SCENE) 1177 void NetworkProcessProxy::getWindowSceneIdentifierForPaymentPresentation(WebPageProxyIdentifier webPageProxyIdentifier, CompletionHandler<void(const String&)>&& completionHandler) 1178 { 1179 auto* page = WebProcessProxy::webPage(webPageProxyIdentifier); 1180 if (!page) { 1181 completionHandler(nullString()); 1182 return; 1183 } 1184 completionHandler(page->pageClient().sceneID()); 1185 } 1186 #endif 1187 1175 1188 void NetworkProcessProxy::setShouldDowngradeReferrerForTesting(bool enabled, CompletionHandler<void()>&& completionHandler) 1176 1189 { -
trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h
r283179 r283320 256 256 #endif 257 257 258 #if ENABLE(APPLE_PAY_REMOTE_UI_USES_SCENE) 259 void getWindowSceneIdentifierForPaymentPresentation(WebPageProxyIdentifier, CompletionHandler<void(const String&)>&&); 260 #endif 258 261 // ProcessThrottlerClient 259 262 void sendPrepareToSuspend(IsSuspensionImminent, CompletionHandler<void()>&&) final; -
trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in
r283179 r283320 79 79 DidExceedMemoryLimit() 80 80 #endif 81 82 #if ENABLE(APPLE_PAY_REMOTE_UI_USES_SCENE) 83 GetWindowSceneIdentifierForPaymentPresentation(WebKit::WebPageProxyIdentifier webPageProxyIdentifier) -> (String sceneID) Async 84 #endif 81 85 } -
trunk/Source/WebKit/UIProcess/PageClient.h
r282189 r283320 499 499 500 500 virtual WebCore::Color contentViewBackgroundColor() = 0; 501 virtual String sceneID() = 0; 501 502 #endif 502 503 -
trunk/Source/WebKit/UIProcess/WebPageProxy.h
r283316 r283320 2498 2498 #if ENABLE(APPLE_PAY) && PLATFORM(IOS_FAMILY) 2499 2499 UIViewController *paymentCoordinatorPresentingViewController(const WebPaymentCoordinatorProxy&) final; 2500 #if ENABLE(APPLE_PAY_REMOTE_UI_USES_SCENE) 2501 void getWindowSceneIdentifierForPaymentPresentation(WebPageProxyIdentifier, CompletionHandler<void(const String&)>&&) final; 2502 #endif 2500 2503 const String& paymentCoordinatorCTDataConnectionServiceType(const WebPaymentCoordinatorProxy&) final; 2501 2504 std::unique_ptr<PaymentAuthorizationPresenter> paymentCoordinatorAuthorizationPresenter(WebPaymentCoordinatorProxy&, PKPaymentRequest *) final; -
trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.h
r281279 r283320 301 301 302 302 WebCore::Color contentViewBackgroundColor() final; 303 String sceneID() final; 303 304 304 305 WeakObjCPtr<WKContentView> m_contentView; -
trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
r281470 r283320 1024 1024 } 1025 1025 1026 String PageClientImpl::sceneID() 1027 { 1028 return [m_contentView window].windowScene._sceneIdentifier; 1029 } 1030 1026 1031 } // namespace WebKit 1027 1032 -
trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
r281955 r283320 1239 1239 } 1240 1240 1241 #if ENABLE(APPLE_PAY_REMOTE_UI_USES_SCENE) 1242 void WebPageProxy::getWindowSceneIdentifierForPaymentPresentation(WebPageProxyIdentifier, CompletionHandler<void(const String&)>&& completionHandler) 1243 { 1244 ASSERT_NOT_REACHED(); 1245 completionHandler(nullString()); 1246 } 1247 #endif 1248 1241 1249 const String& WebPageProxy::paymentCoordinatorCTDataConnectionServiceType(const WebPaymentCoordinatorProxy&) 1242 1250 { -
trunk/Source/WebKit/WebProcess/ApplePay/WebPaymentCoordinator.cpp
r278712 r283320 103 103 104 104 bool result; 105 if (!sendSync(Messages::WebPaymentCoordinatorProxy::ShowPaymentUI(m_webPage.identifier(), originatingURL.string(), linkIconURLStrings, paymentRequest), Messages::WebPaymentCoordinatorProxy::ShowPaymentUI::Reply(result)))105 if (!sendSync(Messages::WebPaymentCoordinatorProxy::ShowPaymentUI(m_webPage.identifier(), m_webPage.webPageProxyIdentifier(), originatingURL.string(), linkIconURLStrings, paymentRequest), Messages::WebPaymentCoordinatorProxy::ShowPaymentUI::Reply(result))) 106 106 return false; 107 107
Note:
See TracChangeset
for help on using the changeset viewer.