⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 246014 in webkit


Ignore:
Timestamp:
Jun 1, 2019, 9:19:40 AM (7 years ago)
Author:
aestes@apple.com
Message:

[Apple Pay] Every PaymentCoordinator client should explicitly decide whether they support unrestricted Apple Pay
https://bugs.webkit.org/show_bug.cgi?id=198449
<rdar://problem/51038583>

Reviewed by Wenson Hsieh.

Source/WebCore:

Rather than having a default return value of true for
PaymentCoordinatorClient::supportsUnrestrictedApplePay, make it pure virtual to force each
subclass to implement an override and explicitly choose an appropriate return value.

The only two clients that did not explicitly override were the empty client and
WebKitLegacy's client, and Apple Pay was never enabled in those clients, so there is no
change in behavior.

  • Modules/applepay/PaymentCoordinatorClient.h:

(WebCore::PaymentCoordinatorClient::isAlwaysOnLoggingAllowed const):
(WebCore::PaymentCoordinatorClient::supportsUnrestrictedApplePay const): Deleted.

  • loader/EmptyClients.cpp:

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebPaymentCoordinatorClient.h:
  • WebCoreSupport/WebPaymentCoordinatorClient.mm:

(WebPaymentCoordinatorClient::supportsUnrestrictedApplePay const):

Location:
trunk/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r246002 r246014  
     12019-06-01  Andy Estes  <aestes@apple.com>
     2
     3        [Apple Pay] Every PaymentCoordinator client should explicitly decide whether they support unrestricted Apple Pay
     4        https://bugs.webkit.org/show_bug.cgi?id=198449
     5        <rdar://problem/51038583>
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        Rather than having a default return value of true for
     10        PaymentCoordinatorClient::supportsUnrestrictedApplePay, make it pure virtual to force each
     11        subclass to implement an override and explicitly choose an appropriate return value.
     12
     13        The only two clients that did not explicitly override were the empty client and
     14        WebKitLegacy's client, and Apple Pay was never enabled in those clients, so there is no
     15        change in behavior.
     16
     17        * Modules/applepay/PaymentCoordinatorClient.h:
     18        (WebCore::PaymentCoordinatorClient::isAlwaysOnLoggingAllowed const):
     19        (WebCore::PaymentCoordinatorClient::supportsUnrestrictedApplePay const): Deleted.
     20        * loader/EmptyClients.cpp:
     21
    1222019-05-31  Youenn Fablet  <youenn@apple.com>
    223
  • trunk/Source/WebCore/Modules/applepay/PaymentCoordinatorClient.h

    r244092 r246014  
    6363    virtual void cancelPaymentSession() = 0;
    6464    virtual void paymentCoordinatorDestroyed() = 0;
     65    virtual bool supportsUnrestrictedApplePay() const = 0;
    6566
    6667    virtual bool isMockPaymentCoordinator() const { return false; }
     
    6869
    6970    virtual bool isAlwaysOnLoggingAllowed() const { return false; }
    70     virtual bool supportsUnrestrictedApplePay() const { return true; }
    7171
    7272protected:
  • trunk/Source/WebCore/loader/EmptyClients.cpp

    r245460 r246014  
    333333    void abortPaymentSession() final { }
    334334    void paymentCoordinatorDestroyed() final { }
     335    bool supportsUnrestrictedApplePay() const final { return false; }
    335336};
    336337
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r245875 r246014  
     12019-06-01  Andy Estes  <aestes@apple.com>
     2
     3        [Apple Pay] Every PaymentCoordinator client should explicitly decide whether they support unrestricted Apple Pay
     4        https://bugs.webkit.org/show_bug.cgi?id=198449
     5        <rdar://problem/51038583>
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        * WebCoreSupport/WebPaymentCoordinatorClient.h:
     10        * WebCoreSupport/WebPaymentCoordinatorClient.mm:
     11        (WebPaymentCoordinatorClient::supportsUnrestrictedApplePay const):
     12
    1132019-05-29  Don Olmstead  <don.olmstead@sony.com>
    214
  • trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebPaymentCoordinatorClient.h

    r242681 r246014  
    5050    void cancelPaymentSession() override;
    5151    void paymentCoordinatorDestroyed() override;
     52    bool supportsUnrestrictedApplePay() const override;
    5253};
    5354
  • trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebPaymentCoordinatorClient.mm

    r242681 r246014  
    102102}
    103103
     104bool WebPaymentCoordinatorClient::supportsUnrestrictedApplePay() const
     105{
     106    return false;
     107}
     108
    104109#endif
Note: See TracChangeset for help on using the changeset viewer.