<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[242332] trunk/Source/WebKit</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/242332">242332</a></dd>
<dt>Author</dt> <dd>aestes@apple.com</dd>
<dt>Date</dt> <dd>2019-03-03 14:16:35 -0800 (Sun, 03 Mar 2019)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Apple Pay] Untangle WebPageProxy and WebPaymentCoordinatorProxy
https://bugs.webkit.org/show_bug.cgi?id=195219
<rdar://problem/48518082>

Reviewed by Darin Adler.

Rather than having WebPaymentCoordinatorProxy know about WebPageProxy, give
WebPaymentCoordinatorProxy a client interface that WebPageProxy conforms to.

In a follow-on patch, WebPaymentCoordinatorProxy will have a non-WebPageProxy client.

* UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:
(WebKit::WebPaymentCoordinatorProxy::WebPaymentCoordinatorProxy): Replaced use of
m_webPageProxy with m_client.
(WebKit::WebPaymentCoordinatorProxy::~WebPaymentCoordinatorProxy): Ditto.
(WebKit::WebPaymentCoordinatorProxy::messageSenderConnection const): Implemented
IPC::MessageSender via m_client.
(WebKit::WebPaymentCoordinatorProxy::messageSenderDestinationID const): Ditto.
(WebKit::WebPaymentCoordinatorProxy::canMakePaymentsWithActiveCard): Replaced use of
m_webPageProxy with m_client.
(WebKit::WebPaymentCoordinatorProxy::openPaymentSetup): Ditto.
(WebKit::WebPaymentCoordinatorProxy::didCancelPaymentSession): Called our own
MessageSender::send rather than going through m_webPageProxy.
(WebKit::WebPaymentCoordinatorProxy::validateMerchant): Ditto.
(WebKit::WebPaymentCoordinatorProxy::didAuthorizePayment): Ditto.
(WebKit::WebPaymentCoordinatorProxy::didSelectShippingMethod): Ditto.
(WebKit::WebPaymentCoordinatorProxy::didSelectShippingContact): Ditto.
(WebKit::WebPaymentCoordinatorProxy::didSelectPaymentMethod): Ditto.
* UIProcess/ApplePay/WebPaymentCoordinatorProxy.h: Defined the Client abstract class and
changed m_webPageProxy to m_client.
* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h:
* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard): Replaced use of
m_webPageProxy with m_client.
(WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): Renamed from toPKPaymentRequest.
(WebKit::toPKPaymentRequest): Renamed to WebPaymentCoordinatorProxy::platformPaymentRequest.
* UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm:
(WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI): Replaced use of m_webPageProxy
with m_client.
* UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
(WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI): Ditto.
* UIProcess/AuxiliaryProcessProxy.h:
(WebKit::AuxiliaryProcessProxy::messageReceiverMap): Added.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::paymentCoordinatorConnection): Implemented WebPaymentCoordinatorProxy::Client.
(WebKit::WebPageProxy::paymentCoordinatorMessageReceiver): Ditto.
(WebKit::WebPageProxy::paymentCoordinatorSourceApplicationBundleIdentifier): Ditto.
(WebKit::WebPageProxy::paymentCoordinatorSourceApplicationSecondaryIdentifier): Ditto.
(WebKit::WebPageProxy::paymentCoordinatorDestinationID): Ditto.
* UIProcess/WebPageProxy.h: Made WebPageProxy derive from WebPaymentCoordinatorProxy::Client.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::paymentCoordinatorPresentingViewController): Implemented WebPaymentCoordinatorProxy::Client.
(WebKit::WebPageProxy::paymentCoordinatorCTDataConnectionServiceType): Ditto.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::paymentCoordinatorPresentingWindow): Ditto.
* WebKit.xcodeproj/project.pbxproj:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitUIProcessApplePayWebPaymentCoordinatorProxycpp">trunk/Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessApplePayWebPaymentCoordinatorProxyh">trunk/Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessApplePaycocoaWebPaymentCoordinatorProxyCocoah">trunk/Source/WebKit/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessApplePaycocoaWebPaymentCoordinatorProxyCocoamm">trunk/Source/WebKit/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessApplePayiosWebPaymentCoordinatorProxyIOSmm">trunk/Source/WebKit/UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessApplePaymacWebPaymentCoordinatorProxyMacmm">trunk/Source/WebKit/UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessAuxiliaryProcessProxyh">trunk/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebPageProxycpp">trunk/Source/WebKit/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebPageProxyh">trunk/Source/WebKit/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessiosWebPageProxyIOSmm">trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessmacWebPageProxyMacmm">trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm</a></li>
<li><a href="#trunkSourceWebKitWebKitxcodeprojprojectpbxproj">trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (242331 => 242332)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2019-03-03 22:08:29 UTC (rev 242331)
+++ trunk/Source/WebKit/ChangeLog       2019-03-03 22:16:35 UTC (rev 242332)
</span><span class="lines">@@ -1,3 +1,62 @@
</span><ins>+2019-03-03  Andy Estes  <aestes@apple.com>
+
+        [Apple Pay] Untangle WebPageProxy and WebPaymentCoordinatorProxy
+        https://bugs.webkit.org/show_bug.cgi?id=195219
+        <rdar://problem/48518082>
+
+        Reviewed by Darin Adler.
+
+        Rather than having WebPaymentCoordinatorProxy know about WebPageProxy, give
+        WebPaymentCoordinatorProxy a client interface that WebPageProxy conforms to.
+
+        In a follow-on patch, WebPaymentCoordinatorProxy will have a non-WebPageProxy client.
+
+        * UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:
+        (WebKit::WebPaymentCoordinatorProxy::WebPaymentCoordinatorProxy): Replaced use of
+        m_webPageProxy with m_client.
+        (WebKit::WebPaymentCoordinatorProxy::~WebPaymentCoordinatorProxy): Ditto.
+        (WebKit::WebPaymentCoordinatorProxy::messageSenderConnection const): Implemented
+        IPC::MessageSender via m_client.
+        (WebKit::WebPaymentCoordinatorProxy::messageSenderDestinationID const): Ditto.
+        (WebKit::WebPaymentCoordinatorProxy::canMakePaymentsWithActiveCard): Replaced use of
+        m_webPageProxy with m_client.
+        (WebKit::WebPaymentCoordinatorProxy::openPaymentSetup): Ditto.
+        (WebKit::WebPaymentCoordinatorProxy::didCancelPaymentSession): Called our own
+        MessageSender::send rather than going through m_webPageProxy.
+        (WebKit::WebPaymentCoordinatorProxy::validateMerchant): Ditto.
+        (WebKit::WebPaymentCoordinatorProxy::didAuthorizePayment): Ditto.
+        (WebKit::WebPaymentCoordinatorProxy::didSelectShippingMethod): Ditto.
+        (WebKit::WebPaymentCoordinatorProxy::didSelectShippingContact): Ditto.
+        (WebKit::WebPaymentCoordinatorProxy::didSelectPaymentMethod): Ditto.
+        * UIProcess/ApplePay/WebPaymentCoordinatorProxy.h: Defined the Client abstract class and
+        changed m_webPageProxy to m_client.
+        * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h:
+        * UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
+        (WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard): Replaced use of
+        m_webPageProxy with m_client.
+        (WebKit::WebPaymentCoordinatorProxy::platformPaymentRequest): Renamed from toPKPaymentRequest.
+        (WebKit::toPKPaymentRequest): Renamed to WebPaymentCoordinatorProxy::platformPaymentRequest.
+        * UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm:
+        (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI): Replaced use of m_webPageProxy
+        with m_client.
+        * UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
+        (WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI): Ditto.
+        * UIProcess/AuxiliaryProcessProxy.h:
+        (WebKit::AuxiliaryProcessProxy::messageReceiverMap): Added.
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::paymentCoordinatorConnection): Implemented WebPaymentCoordinatorProxy::Client.
+        (WebKit::WebPageProxy::paymentCoordinatorMessageReceiver): Ditto.
+        (WebKit::WebPageProxy::paymentCoordinatorSourceApplicationBundleIdentifier): Ditto.
+        (WebKit::WebPageProxy::paymentCoordinatorSourceApplicationSecondaryIdentifier): Ditto.
+        (WebKit::WebPageProxy::paymentCoordinatorDestinationID): Ditto.
+        * UIProcess/WebPageProxy.h: Made WebPageProxy derive from WebPaymentCoordinatorProxy::Client.
+        * UIProcess/ios/WebPageProxyIOS.mm:
+        (WebKit::WebPageProxy::paymentCoordinatorPresentingViewController): Implemented WebPaymentCoordinatorProxy::Client.
+        (WebKit::WebPageProxy::paymentCoordinatorCTDataConnectionServiceType): Ditto.
+        * UIProcess/mac/WebPageProxyMac.mm:
+        (WebKit::WebPageProxy::paymentCoordinatorPresentingWindow): Ditto.
+        * WebKit.xcodeproj/project.pbxproj:
+
</ins><span class="cx"> 2019-03-03  Tim Horton  <timothy_horton@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Remove some more unused 32-bit code
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessApplePayWebPaymentCoordinatorProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp (242331 => 242332)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp    2019-03-03 22:08:29 UTC (rev 242331)
+++ trunk/Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp       2019-03-03 22:16:35 UTC (rev 242332)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2015-2018 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(APPLE_PAY)
</span><span class="cx"> 
</span><ins>+#include "MessageReceiverMap.h"
</ins><span class="cx"> #include "WebPageProxy.h"
</span><span class="cx"> #include "WebPaymentCoordinatorMessages.h"
</span><span class="cx"> #include "WebPaymentCoordinatorProxyMessages.h"
</span><span class="lines">@@ -42,12 +43,10 @@
</span><span class="cx">     return activePaymentCoordinatorProxy.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebPaymentCoordinatorProxy::WebPaymentCoordinatorProxy(WebPageProxy& webPageProxy)
-    : m_webPageProxy(webPageProxy)
-    , m_state(State::Idle)
-    , m_merchantValidationState(MerchantValidationState::Idle)
</del><ins>+WebPaymentCoordinatorProxy::WebPaymentCoordinatorProxy(WebPaymentCoordinatorProxy::Client& client)
+    : m_client { client }
</ins><span class="cx"> {
</span><del>-    m_webPageProxy.process().addMessageReceiver(Messages::WebPaymentCoordinatorProxy::messageReceiverName(), m_webPageProxy.pageID(), *this);
</del><ins>+    m_client.paymentCoordinatorMessageReceiver(*this).addMessageReceiver(Messages::WebPaymentCoordinatorProxy::messageReceiverName(), m_client.paymentCoordinatorDestinationID(*this), *this);
</ins><span class="cx">     finishConstruction(*this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -56,9 +55,19 @@
</span><span class="cx">     if (m_state != State::Idle)
</span><span class="cx">         hidePaymentUI();
</span><span class="cx"> 
</span><del>-    m_webPageProxy.process().removeMessageReceiver(Messages::WebPaymentCoordinatorProxy::messageReceiverName(), m_webPageProxy.pageID());
</del><ins>+    m_client.paymentCoordinatorMessageReceiver(*this).removeMessageReceiver(Messages::WebPaymentCoordinatorProxy::messageReceiverName(), m_client.paymentCoordinatorDestinationID(*this));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+IPC::Connection* WebPaymentCoordinatorProxy::messageSenderConnection() const
+{
+    return m_client.paymentCoordinatorConnection(*this);
+}
+
+uint64_t WebPaymentCoordinatorProxy::messageSenderDestinationID() const
+{
+    return m_client.paymentCoordinatorDestinationID(*this);
+}
+
</ins><span class="cx"> void WebPaymentCoordinatorProxy::availablePaymentNetworks(CompletionHandler<void(Vector<String>&&)>&& completionHandler)
</span><span class="cx"> {
</span><span class="cx">     completionHandler(platformAvailablePaymentNetworks());
</span><span class="lines">@@ -71,25 +80,17 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPaymentCoordinatorProxy::canMakePaymentsWithActiveCard(const String& merchantIdentifier, const String& domainName, uint64_t requestID)
</span><span class="cx"> {
</span><del>-    auto weakThis = makeWeakPtr(*this);
-    platformCanMakePaymentsWithActiveCard(merchantIdentifier, domainName, [weakThis, requestID](bool canMakePayments) {
-        auto paymentCoordinatorProxy = weakThis.get();
-        if (!paymentCoordinatorProxy)
-            return;
-
-        paymentCoordinatorProxy->m_webPageProxy.send(Messages::WebPaymentCoordinator::CanMakePaymentsWithActiveCardReply(requestID, canMakePayments));
</del><ins>+    platformCanMakePaymentsWithActiveCard(merchantIdentifier, domainName, [weakThis = makeWeakPtr(*this), requestID](bool canMakePayments) {
+        if (auto paymentCoordinatorProxy = weakThis.get())
+            paymentCoordinatorProxy->send(Messages::WebPaymentCoordinator::CanMakePaymentsWithActiveCardReply(requestID, canMakePayments));
</ins><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPaymentCoordinatorProxy::openPaymentSetup(const String& merchantIdentifier, const String& domainName, uint64_t requestID)
</span><span class="cx"> {
</span><del>-    auto weakThis = makeWeakPtr(*this);
-    platformOpenPaymentSetup(merchantIdentifier, domainName, [weakThis, requestID](bool result) {
-        auto paymentCoordinatorProxy = weakThis.get();
-        if (!paymentCoordinatorProxy)
-            return;
-
-        paymentCoordinatorProxy->m_webPageProxy.send(Messages::WebPaymentCoordinator::OpenPaymentSetupReply(requestID, result));
</del><ins>+    platformOpenPaymentSetup(merchantIdentifier, domainName, [weakThis = makeWeakPtr(*this), requestID](bool result) {
+        if (auto paymentCoordinatorProxy = weakThis.get())
+            paymentCoordinatorProxy->send(Messages::WebPaymentCoordinator::OpenPaymentSetupReply(requestID, result));
</ins><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -224,7 +225,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(canCancel());
</span><span class="cx"> 
</span><del>-    m_webPageProxy.send(Messages::WebPaymentCoordinator::DidCancelPaymentSession());
</del><ins>+    send(Messages::WebPaymentCoordinator::DidCancelPaymentSession());
</ins><span class="cx"> 
</span><span class="cx">     didReachFinalState();
</span><span class="cx"> }
</span><span class="lines">@@ -234,13 +235,13 @@
</span><span class="cx">     ASSERT(m_merchantValidationState == MerchantValidationState::Idle);
</span><span class="cx"> 
</span><span class="cx">     m_merchantValidationState = MerchantValidationState::Validating;
</span><del>-    m_webPageProxy.send(Messages::WebPaymentCoordinator::ValidateMerchant(url.string()));
</del><ins>+    send(Messages::WebPaymentCoordinator::ValidateMerchant(url.string()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPaymentCoordinatorProxy::didAuthorizePayment(const WebCore::Payment& payment)
</span><span class="cx"> {
</span><span class="cx">     m_state = State::Authorized;
</span><del>-    m_webPageProxy.send(Messages::WebPaymentCoordinator::DidAuthorizePayment(payment));
</del><ins>+    send(Messages::WebPaymentCoordinator::DidAuthorizePayment(payment));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPaymentCoordinatorProxy::didSelectShippingMethod(const WebCore::ApplePaySessionPaymentRequest::ShippingMethod& shippingMethod)
</span><span class="lines">@@ -248,7 +249,7 @@
</span><span class="cx">     ASSERT(m_state == State::Active);
</span><span class="cx"> 
</span><span class="cx">     m_state = State::ShippingMethodSelected;
</span><del>-    m_webPageProxy.send(Messages::WebPaymentCoordinator::DidSelectShippingMethod(shippingMethod));
</del><ins>+    send(Messages::WebPaymentCoordinator::DidSelectShippingMethod(shippingMethod));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPaymentCoordinatorProxy::didSelectShippingContact(const WebCore::PaymentContact& shippingContact)
</span><span class="lines">@@ -256,7 +257,7 @@
</span><span class="cx">     ASSERT(m_state == State::Active);
</span><span class="cx"> 
</span><span class="cx">     m_state = State::ShippingContactSelected;
</span><del>-    m_webPageProxy.send(Messages::WebPaymentCoordinator::DidSelectShippingContact(shippingContact));
</del><ins>+    send(Messages::WebPaymentCoordinator::DidSelectShippingContact(shippingContact));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPaymentCoordinatorProxy::didSelectPaymentMethod(const WebCore::PaymentMethod& paymentMethod)
</span><span class="lines">@@ -264,7 +265,7 @@
</span><span class="cx">     ASSERT(m_state == State::Active);
</span><span class="cx"> 
</span><span class="cx">     m_state = State::PaymentMethodSelected;
</span><del>-    m_webPageProxy.send(Messages::WebPaymentCoordinator::DidSelectPaymentMethod(paymentMethod));
</del><ins>+    send(Messages::WebPaymentCoordinator::DidSelectPaymentMethod(paymentMethod));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WebPaymentCoordinatorProxy::canBegin() const
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessApplePayWebPaymentCoordinatorProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.h (242331 => 242332)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.h      2019-03-03 22:08:29 UTC (rev 242331)
+++ trunk/Source/WebKit/UIProcess/ApplePay/WebPaymentCoordinatorProxy.h 2019-03-03 22:16:35 UTC (rev 242332)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2015-2018 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #if ENABLE(APPLE_PAY)
</span><span class="cx"> 
</span><span class="cx"> #include "MessageReceiver.h"
</span><ins>+#include "MessageSender.h"
</ins><span class="cx"> #include <WebCore/PaymentHeaders.h>
</span><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx"> #include <wtf/RetainPtr.h>
</span><span class="lines">@@ -34,11 +35,12 @@
</span><span class="cx"> #include <wtf/WeakPtr.h>
</span><span class="cx"> 
</span><span class="cx"> #if USE(APPLE_INTERNAL_SDK)
</span><del>-#import <WebKitAdditions/WebPaymentCoordinatorProxyAdditions.h>
</del><ins>+#include <WebKitAdditions/WebPaymentCoordinatorProxyAdditions.h>
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> namespace IPC {
</span><del>-class DataReference;
</del><ins>+class Connection;
+class MessageReceiverMap;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -52,6 +54,8 @@
</span><span class="cx"> OBJC_CLASS NSObject;
</span><span class="cx"> OBJC_CLASS NSWindow;
</span><span class="cx"> OBJC_CLASS PKPaymentAuthorizationViewController;
</span><ins>+OBJC_CLASS PKPaymentRequest;
+OBJC_CLASS UIViewController;
</ins><span class="cx"> OBJC_CLASS WKPaymentAuthorizationViewControllerDelegate;
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="lines">@@ -58,9 +62,26 @@
</span><span class="cx"> 
</span><span class="cx"> class WebPageProxy;
</span><span class="cx"> 
</span><del>-class WebPaymentCoordinatorProxy : private IPC::MessageReceiver, public CanMakeWeakPtr<WebPaymentCoordinatorProxy> {
</del><ins>+class WebPaymentCoordinatorProxy : private IPC::MessageReceiver, private IPC::MessageSender, public CanMakeWeakPtr<WebPaymentCoordinatorProxy> {
</ins><span class="cx"> public:
</span><del>-    explicit WebPaymentCoordinatorProxy(WebPageProxy&);
</del><ins>+    struct Client {
+        virtual ~Client() = default;
+
+        virtual IPC::Connection* paymentCoordinatorConnection(const WebPaymentCoordinatorProxy&) = 0;
+        virtual IPC::MessageReceiverMap& paymentCoordinatorMessageReceiver(const WebPaymentCoordinatorProxy&) = 0;
+        virtual const String& paymentCoordinatorSourceApplicationBundleIdentifier(const WebPaymentCoordinatorProxy&) = 0;
+        virtual const String& paymentCoordinatorSourceApplicationSecondaryIdentifier(const WebPaymentCoordinatorProxy&) = 0;
+        virtual uint64_t paymentCoordinatorDestinationID(const WebPaymentCoordinatorProxy&) = 0;
+#if PLATFORM(IOS_FAMILY)
+        virtual UIViewController *paymentCoordinatorPresentingViewController(const WebPaymentCoordinatorProxy&) = 0;
+        virtual const String& paymentCoordinatorCTDataConnectionServiceType(const WebPaymentCoordinatorProxy&) = 0;
+#endif
+#if PLATFORM(MAC)
+        virtual NSWindow *paymentCoordinatorPresentingWindow(const WebPaymentCoordinatorProxy&) = 0;
+#endif
+    };
+
+    explicit WebPaymentCoordinatorProxy(Client&);
</ins><span class="cx">     ~WebPaymentCoordinatorProxy();
</span><span class="cx"> 
</span><span class="cx">     void didCancelPaymentSession();
</span><span class="lines">@@ -73,11 +94,15 @@
</span><span class="cx">     void hidePaymentUI();
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    // IPC::MessageReceiver.
</del><ins>+    // IPC::MessageReceiver
</ins><span class="cx">     void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;
</span><span class="cx">     void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&) override;
</span><span class="cx"> 
</span><del>-    // Message handlers.
</del><ins>+    // IPC::MessageSender
+    IPC::Connection* messageSenderConnection() const final;
+    uint64_t messageSenderDestinationID() const final;
+
+    // Message handlers
</ins><span class="cx">     void availablePaymentNetworks(CompletionHandler<void(Vector<String>&&)>&&);
</span><span class="cx">     void canMakePayments(CompletionHandler<void(bool)>&&);
</span><span class="cx">     void canMakePaymentsWithActiveCard(const String& merchantIdentifier, const String& domainName, uint64_t requestID);
</span><span class="lines">@@ -108,8 +133,11 @@
</span><span class="cx">     void platformCompleteShippingContactSelection(const Optional<WebCore::ShippingContactUpdate>&);
</span><span class="cx">     void platformCompletePaymentMethodSelection(const Optional<WebCore::PaymentMethodUpdate>&);
</span><span class="cx">     void platformCompletePaymentSession(const Optional<WebCore::PaymentAuthorizationResult>&);
</span><ins>+#if PLATFORM(COCOA)
+    RetainPtr<PKPaymentRequest> platformPaymentRequest(const URL& originatingURL, const Vector<URL>& linkIconURLs, const WebCore::ApplePaySessionPaymentRequest&);
+#endif
</ins><span class="cx"> 
</span><del>-    WebPageProxy& m_webPageProxy;
</del><ins>+    Client& m_client;
</ins><span class="cx"> 
</span><span class="cx">     enum class State {
</span><span class="cx">         // Idle - Nothing's happening.
</span><span class="lines">@@ -132,7 +160,7 @@
</span><span class="cx"> 
</span><span class="cx">         // PaymentMethodSelected - Dispatching the paymentmethodselected event and waiting for a reply.
</span><span class="cx">         PaymentMethodSelected,
</span><del>-    } m_state;
</del><ins>+    } m_state { State::Idle };
</ins><span class="cx"> 
</span><span class="cx">     enum class MerchantValidationState {
</span><span class="cx">         // Idle - Nothing's happening.
</span><span class="lines">@@ -143,7 +171,7 @@
</span><span class="cx"> 
</span><span class="cx">         // ValidationComplete - A merchant session has been sent along to PassKit.
</span><span class="cx">         ValidationComplete
</span><del>-    } m_merchantValidationState;
</del><ins>+    } m_merchantValidationState { MerchantValidationState::Idle };
</ins><span class="cx"> 
</span><span class="cx">     RetainPtr<PKPaymentAuthorizationViewController> m_paymentAuthorizationViewController;
</span><span class="cx">     RetainPtr<WKPaymentAuthorizationViewControllerDelegate> m_paymentAuthorizationViewControllerDelegate;
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessApplePaycocoaWebPaymentCoordinatorProxyCocoah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h (242331 => 242332)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h   2019-03-03 22:08:29 UTC (rev 242331)
+++ trunk/Source/WebKit/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h      2019-03-03 22:16:35 UTC (rev 242332)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2016 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -31,14 +31,6 @@
</span><span class="cx"> #import <pal/spi/cocoa/PassKitSPI.h>
</span><span class="cx"> #import <wtf/BlockPtr.h>
</span><span class="cx"> 
</span><del>-namespace WebKit {
-class WebPageProxy;
-class WebPaymentCoordinatorProxy;
-
-RetainPtr<PKPaymentRequest> toPKPaymentRequest(WebPageProxy&, const URL& originatingURL, const Vector<URL>& linkIconURLs, const WebCore::ApplePaySessionPaymentRequest&);
-
-}
-
</del><span class="cx"> @interface WKPaymentAuthorizationViewControllerDelegate : NSObject <PKPaymentAuthorizationViewControllerDelegate, PKPaymentAuthorizationViewControllerPrivateDelegate> {
</span><span class="cx"> @package
</span><span class="cx">     WebKit::WebPaymentCoordinatorProxy* _webPaymentCoordinatorProxy;
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessApplePaycocoaWebPaymentCoordinatorProxyCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm (242331 => 242332)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm  2019-03-03 22:08:29 UTC (rev 242331)
+++ trunk/Source/WebKit/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm     2019-03-03 22:16:35 UTC (rev 242332)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2016-2018 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -23,8 +23,8 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#include "config.h"
-#include "WebPaymentCoordinatorProxyCocoa.h"
</del><ins>+#import "config.h"
+#import "WebPaymentCoordinatorProxyCocoa.h"
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(APPLE_PAY)
</span><span class="cx"> 
</span><span class="lines">@@ -264,7 +264,7 @@
</span><span class="cx"> void WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard(const String& merchantIdentifier, const String& domainName, WTF::Function<void (bool)>&& completionHandler)
</span><span class="cx"> {
</span><span class="cx"> #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000)
</span><del>-    PKCanMakePaymentsWithMerchantIdentifierDomainAndSourceApplication(merchantIdentifier, domainName, m_webPageProxy.websiteDataStore().configuration().sourceApplicationSecondaryIdentifier(), makeBlockPtr([completionHandler = WTFMove(completionHandler)](BOOL canMakePayments, NSError *error) mutable {
</del><ins>+    PKCanMakePaymentsWithMerchantIdentifierDomainAndSourceApplication(merchantIdentifier, domainName, m_client.paymentCoordinatorSourceApplicationSecondaryIdentifier(*this), makeBlockPtr([completionHandler = WTFMove(completionHandler)](BOOL canMakePayments, NSError *error) mutable {
</ins><span class="cx">         if (error)
</span><span class="cx">             LOG_ERROR("PKCanMakePaymentsWithMerchantIdentifierAndDomain error %@", error);
</span><span class="cx"> 
</span><span class="lines">@@ -442,7 +442,7 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-RetainPtr<PKPaymentRequest> toPKPaymentRequest(WebPageProxy& webPageProxy, const URL& originatingURL, const Vector<URL>& linkIconURLs, const WebCore::ApplePaySessionPaymentRequest& paymentRequest)
</del><ins>+RetainPtr<PKPaymentRequest> WebPaymentCoordinatorProxy::platformPaymentRequest(const URL& originatingURL, const Vector<URL>& linkIconURLs, const WebCore::ApplePaySessionPaymentRequest& paymentRequest)
</ins><span class="cx"> {
</span><span class="cx">     auto result = adoptNS([PAL::allocPKPaymentRequestInstance() init]);
</span><span class="cx"> 
</span><span class="lines">@@ -506,17 +506,18 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Instead of using respondsToSelector, this should use a proper #if version check.
</span><del>-    auto& websiteDataStore = webPageProxy.websiteDataStore();
</del><ins>+    auto& bundleIdentifier = m_client.paymentCoordinatorSourceApplicationBundleIdentifier(*this);
+    if (!bundleIdentifier.isEmpty() && [result respondsToSelector:@selector(setSourceApplicationBundleIdentifier:)])
+        [result setSourceApplicationBundleIdentifier:bundleIdentifier];
</ins><span class="cx"> 
</span><del>-    if (!websiteDataStore.sourceApplicationBundleIdentifier().isEmpty() && [result respondsToSelector:@selector(setSourceApplicationBundleIdentifier:)])
-        [result setSourceApplicationBundleIdentifier:websiteDataStore.sourceApplicationBundleIdentifier()];
</del><ins>+    auto& secondaryIdentifier = m_client.paymentCoordinatorSourceApplicationSecondaryIdentifier(*this);
+    if (!secondaryIdentifier.isEmpty() && [result respondsToSelector:@selector(setSourceApplicationSecondaryIdentifier:)])
+        [result setSourceApplicationSecondaryIdentifier:secondaryIdentifier];
</ins><span class="cx"> 
</span><del>-    if (!websiteDataStore.sourceApplicationSecondaryIdentifier().isEmpty() && [result respondsToSelector:@selector(setSourceApplicationSecondaryIdentifier:)])
-        [result setSourceApplicationSecondaryIdentifier:websiteDataStore.sourceApplicationSecondaryIdentifier()];
-
</del><span class="cx"> #if PLATFORM(IOS_FAMILY)
</span><del>-    if (!webPageProxy.process().processPool().configuration().ctDataConnectionServiceType().isEmpty() && [result respondsToSelector:@selector(setCTDataConnectionServiceType:)])
-        [result setCTDataConnectionServiceType:webPageProxy.process().processPool().configuration().ctDataConnectionServiceType()];
</del><ins>+    auto& serviceType = m_client.paymentCoordinatorCTDataConnectionServiceType(*this);
+    if (!serviceType.isEmpty() && [result respondsToSelector:@selector(setCTDataConnectionServiceType:)])
+        [result setCTDataConnectionServiceType:serviceType];
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     return result;
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessApplePayiosWebPaymentCoordinatorProxyIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm (242331 => 242332)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm      2019-03-03 22:08:29 UTC (rev 242331)
+++ trunk/Source/WebKit/UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm 2019-03-03 22:16:35 UTC (rev 242332)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2016 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPaymentCoordinatorProxy::platformShowPaymentUI(const URL& originatingURL, const Vector<URL>& linkIconURLStrings, const WebCore::ApplePaySessionPaymentRequest& request, CompletionHandler<void(bool)>&& completionHandler)
</span><span class="cx"> {
</span><del>-    UIViewController *presentingViewController = m_webPageProxy.uiClient().presentingViewController();
</del><ins>+    UIViewController *presentingViewController = m_client.paymentCoordinatorPresentingViewController(*this);
</ins><span class="cx"> 
</span><span class="cx">     if (!presentingViewController) {
</span><span class="cx">         completionHandler(false);
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx"> 
</span><span class="cx">     ASSERT(!m_paymentAuthorizationViewController);
</span><span class="cx"> 
</span><del>-    auto paymentRequest = toPKPaymentRequest(m_webPageProxy, originatingURL, linkIconURLStrings, request);
</del><ins>+    auto paymentRequest = platformPaymentRequest(originatingURL, linkIconURLStrings, request);
</ins><span class="cx"> 
</span><span class="cx">     m_paymentAuthorizationViewController = adoptNS([PAL::allocPKPaymentAuthorizationViewControllerInstance() initWithPaymentRequest:paymentRequest.get()]);
</span><span class="cx">     if (!m_paymentAuthorizationViewController) {
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessApplePaymacWebPaymentCoordinatorProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm (242331 => 242332)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm      2019-03-03 22:08:29 UTC (rev 242331)
+++ trunk/Source/WebKit/UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm 2019-03-03 22:16:35 UTC (rev 242332)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2016-2018 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPaymentCoordinatorProxy::platformShowPaymentUI(const URL& originatingURL, const Vector<URL>& linkIconURLStrings, const WebCore::ApplePaySessionPaymentRequest& request, CompletionHandler<void(bool)>&& completionHandler)
</span><span class="cx"> {
</span><del>-    auto paymentRequest = toPKPaymentRequest(m_webPageProxy, originatingURL, linkIconURLStrings, request);
</del><ins>+    auto paymentRequest = platformPaymentRequest(originatingURL, linkIconURLStrings, request);
</ins><span class="cx"> 
</span><span class="cx">     auto showPaymentUIRequestSeed = m_showPaymentUIRequestSeed;
</span><span class="cx">     auto weakThis = makeWeakPtr(*this);
</span><span class="lines">@@ -58,6 +58,10 @@
</span><span class="cx">             return completionHandler(false);
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        NSWindow *presentingWindow = paymentCoordinatorProxy->m_client.paymentCoordinatorPresentingWindow(*paymentCoordinatorProxy);
+        if (!presentingWindow)
+            return completionHandler(false);
+
</ins><span class="cx">         ASSERT(viewController);
</span><span class="cx"> 
</span><span class="cx">         paymentCoordinatorProxy->m_paymentAuthorizationViewControllerDelegate = adoptNS([[WKPaymentAuthorizationViewControllerDelegate alloc] initWithPaymentCoordinatorProxy:*paymentCoordinatorProxy]);
</span><span class="lines">@@ -75,7 +79,7 @@
</span><span class="cx">             paymentCoordinatorProxy->didReachFinalState();
</span><span class="cx">         }];
</span><span class="cx"> 
</span><del>-        [paymentCoordinatorProxy->m_webPageProxy.platformWindow() beginSheet:paymentCoordinatorProxy->m_sheetWindow.get() completionHandler:nullptr];
</del><ins>+        [presentingWindow beginSheet:paymentCoordinatorProxy->m_sheetWindow.get() completionHandler:nullptr];
</ins><span class="cx"> 
</span><span class="cx">         completionHandler(true);
</span><span class="cx">     }).get()];
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAuxiliaryProcessProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h (242331 => 242332)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h    2019-03-03 22:08:29 UTC (rev 242331)
+++ trunk/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h       2019-03-03 22:16:35 UTC (rev 242332)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2012-2016 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2012-2019 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -86,6 +86,8 @@
</span><span class="cx"> 
</span><span class="cx">     void setProcessSuppressionEnabled(bool);
</span><span class="cx"> 
</span><ins>+    IPC::MessageReceiverMap& messageReceiverMap() { return m_messageReceiverMap; }
+
</ins><span class="cx"> protected:
</span><span class="cx">     // ProcessLauncher::Client
</span><span class="cx">     void didFinishLaunching(ProcessLauncher*, IPC::Connection::Identifier) override;
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (242331 => 242332)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp   2019-03-03 22:08:29 UTC (rev 242331)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp      2019-03-03 22:16:35 UTC (rev 242332)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010-2018 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2010-2019 Apple Inc. All rights reserved.
</ins><span class="cx">  * Copyright (C) 2012 Intel Corporation. All rights reserved.
</span><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -8753,6 +8753,35 @@
</span><span class="cx">     m_process->processPool().clearAdClickAttribution(m_websiteDataStore->sessionID(), WTFMove(completionHandler));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ENABLE(APPLE_PAY)
+
+IPC::Connection* WebPageProxy::paymentCoordinatorConnection(const WebPaymentCoordinatorProxy&)
+{
+    return messageSenderConnection();
+}
+
+IPC::MessageReceiverMap& WebPageProxy::paymentCoordinatorMessageReceiver(const WebPaymentCoordinatorProxy&)
+{
+    return process().messageReceiverMap();
+}
+
+const String& WebPageProxy::paymentCoordinatorSourceApplicationBundleIdentifier(const WebPaymentCoordinatorProxy&)
+{
+    return websiteDataStore().sourceApplicationBundleIdentifier();
+}
+
+const String& WebPageProxy::paymentCoordinatorSourceApplicationSecondaryIdentifier(const WebPaymentCoordinatorProxy&)
+{
+    return websiteDataStore().sourceApplicationSecondaryIdentifier();
+}
+
+uint64_t WebPageProxy::paymentCoordinatorDestinationID(const WebPaymentCoordinatorProxy&)
+{
+    return messageSenderDestinationID();
+}
+
+#endif
+
</ins><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><span class="cx"> #undef MERGE_WHEEL_EVENTS
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (242331 => 242332)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebPageProxy.h     2019-03-03 22:08:29 UTC (rev 242331)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h        2019-03-03 22:16:35 UTC (rev 242332)
</span><span class="lines">@@ -160,7 +160,6 @@
</span><span class="cx"> 
</span><span class="cx"> namespace IPC {
</span><span class="cx"> class Decoder;
</span><del>-class Connection;
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -350,6 +349,9 @@
</span><span class="cx"> #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS_FAMILY)
</span><span class="cx">     , public WebCore::WebMediaSessionManagerClient
</span><span class="cx"> #endif
</span><ins>+#if ENABLE(APPLE_PAY)
+    , public WebPaymentCoordinatorProxy::Client
+#endif
</ins><span class="cx">     , public WebPopupMenuProxy::Client
</span><span class="cx">     , public IPC::MessageReceiver
</span><span class="cx">     , public IPC::MessageSender
</span><span class="lines">@@ -1971,6 +1973,22 @@
</span><span class="cx">     void logFrameNavigation(const WebFrameProxy&, const URL& pageURL, const WebCore::ResourceRequest&, const URL& redirectURL);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+    // WebPaymentCoordinatorProxy::Client
+#if ENABLE(APPLE_PAY)
+    IPC::Connection* paymentCoordinatorConnection(const WebPaymentCoordinatorProxy&) final;
+    IPC::MessageReceiverMap& paymentCoordinatorMessageReceiver(const WebPaymentCoordinatorProxy&) final;
+    const String& paymentCoordinatorSourceApplicationBundleIdentifier(const WebPaymentCoordinatorProxy&) final;
+    const String& paymentCoordinatorSourceApplicationSecondaryIdentifier(const WebPaymentCoordinatorProxy&) final;
+    uint64_t paymentCoordinatorDestinationID(const WebPaymentCoordinatorProxy&) final;
+#endif
+#if ENABLE(APPLE_PAY) && PLATFORM(IOS_FAMILY)
+    UIViewController *paymentCoordinatorPresentingViewController(const WebPaymentCoordinatorProxy&) final;
+    const String& paymentCoordinatorCTDataConnectionServiceType(const WebPaymentCoordinatorProxy&) final;
+#endif
+#if ENABLE(APPLE_PAY) && PLATFORM(MAC)
+    NSWindow *paymentCoordinatorPresentingWindow(const WebPaymentCoordinatorProxy&) final;
+#endif
+
</ins><span class="cx">     WeakPtr<PageClient> m_pageClient;
</span><span class="cx">     Ref<API::PageConfiguration> m_configuration;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessiosWebPageProxyIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm (242331 => 242332)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm     2019-03-03 22:08:29 UTC (rev 242331)
+++ trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm        2019-03-03 22:16:35 UTC (rev 242332)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2012-2017 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2012-2019 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -49,6 +49,7 @@
</span><span class="cx"> #import "WKBrowsingContextControllerInternal.h"
</span><span class="cx"> #import "WebAutocorrectionContext.h"
</span><span class="cx"> #import "WebPageMessages.h"
</span><ins>+#import "WebProcessPool.h"
</ins><span class="cx"> #import "WebProcessProxy.h"
</span><span class="cx"> #import <WebCore/FrameView.h>
</span><span class="cx"> #import <WebCore/NotImplemented.h>
</span><span class="lines">@@ -1184,6 +1185,20 @@
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(APPLE_PAY)
+
+UIViewController *WebPageProxy::paymentCoordinatorPresentingViewController(const WebPaymentCoordinatorProxy&)
+{
+    return uiClient().presentingViewController();
+}
+
+const String& WebPageProxy::paymentCoordinatorCTDataConnectionServiceType(const WebPaymentCoordinatorProxy&)
+{
+    return process().processPool().configuration().ctDataConnectionServiceType();
+}
+
+#endif
+
</ins><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><span class="cx"> #endif // PLATFORM(IOS_FAMILY)
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessmacWebPageProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm (242331 => 242332)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm     2019-03-03 22:08:29 UTC (rev 242331)
+++ trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm        2019-03-03 22:16:35 UTC (rev 242332)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010-2018 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2010-2019 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -661,6 +661,15 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(APPLE_PAY)
+
+NSWindow *WebPageProxy::paymentCoordinatorPresentingWindow(const WebPaymentCoordinatorProxy&)
+{
+    return platformWindow();
+}
+
+#endif
+
</ins><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><span class="cx"> #endif // PLATFORM(MAC)
</span></span></pre></div>
<a id="trunkSourceWebKitWebKitxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (242331 => 242332)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj     2019-03-03 22:08:29 UTC (rev 242331)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj        2019-03-03 22:16:35 UTC (rev 242332)
</span><span class="lines">@@ -10794,7 +10794,6 @@
</span><span class="cx">                          2D913444212CF9F000128AFD /* NetscapePlugin.cpp in Sources */,
</span><span class="cx">                          2D92A796212B6ADA00F493FD /* NetscapePluginModule.cpp in Sources */,
</span><span class="cx">                          2D913445212CF9F000128AFD /* NetscapePluginStream.cpp in Sources */,
</span><del>-                               6BD05866220CE8C2000BED5C /* NetworkAdClickAttribution.cpp in Sources */,
</del><span class="cx">                           51DD9F2816367DA2001578E9 /* NetworkConnectionToWebProcessMessageReceiver.cpp in Sources */,
</span><span class="cx">                          52F060E11654318500F3281B /* NetworkContentRuleListManagerMessageReceiver.cpp in Sources */,
</span><span class="cx">                          51F060E11654318500F3283F /* NetworkMDNSRegisterMessageReceiver.cpp in Sources */,
</span></span></pre>
</div>
</div>

</body>
</html>