source: webkit/trunk/Source/WebCore/testing/MockApplePaySetupFeature.cpp

Last change on this file was 262714, checked in by [email protected], 5 years ago

[Apple Pay] Remove ENABLE_APPLE_PAY_SETUP, ENABLE_APPLE_PAY_SESSION_V7, and HAVE_PASSKIT_PAYMENT_SETUP
https://bugs.webkit.org/show_bug.cgi?id=212883
<rdar://problem/64090763>

Reviewed by Youenn Fablet.

These macros evaluate to true whenever ENABLE(APPLE_PAY) is true on platforms supported by
trunk WebKit, so we can either remove them or replace them with ENABLE(APPLE_PAY).

Source/WebCore:

  • Modules/applepay/ApplePaySetup.cpp:
  • Modules/applepay/ApplePaySetup.idl:
  • Modules/applepay/ApplePaySetupConfiguration.h:
  • Modules/applepay/ApplePaySetupConfiguration.idl:
  • Modules/applepay/ApplePaySetupFeature.idl:
  • Modules/applepay/ApplePaySetupFeature.mm:
  • Modules/applepay/ApplePaySetupFeatureState.h:
  • Modules/applepay/ApplePaySetupFeatureState.idl:
  • Modules/applepay/ApplePaySetupFeatureType.idl:
  • Modules/applepay/ApplePaySetupFeatureTypeWebCore.h:
  • Modules/applepay/ApplePaySetupFeatureWebCore.h:
  • Modules/applepay/ApplePaySetupWebCore.h:
  • Modules/applepay/PaymentCoordinator.cpp:
  • Modules/applepay/PaymentCoordinator.h:
  • Modules/applepay/PaymentCoordinatorClient.cpp:

(WebCore::PaymentCoordinatorClient::supportsVersion):

  • Modules/applepay/PaymentCoordinatorClient.h:

(WebCore::PaymentCoordinatorClient::endApplePaySetup):

  • testing/MockApplePaySetupFeature.cpp:
  • testing/MockApplePaySetupFeature.h:
  • testing/MockPaymentCoordinator.cpp:
  • testing/MockPaymentCoordinator.h:
  • testing/MockPaymentCoordinator.idl:

Source/WebCore/PAL:

  • pal/spi/cocoa/PassKitSPI.h:

Source/WebKit:

  • Shared/ApplePay/ApplePayPaymentSetupFeatures.mm:
  • Shared/ApplePay/ApplePayPaymentSetupFeaturesWebKit.h:
  • Shared/ApplePay/PaymentSetupConfiguration.mm:
  • Shared/ApplePay/PaymentSetupConfigurationWebKit.h:
  • Shared/ApplePay/WebPaymentCoordinatorProxy.h:
  • Shared/ApplePay/WebPaymentCoordinatorProxy.messages.in:
  • Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
  • WebProcess/ApplePay/WebPaymentCoordinator.cpp:
  • WebProcess/ApplePay/WebPaymentCoordinator.h:

Source/WTF:

  • wtf/PlatformEnableCocoa.h:
  • wtf/PlatformHave.h:
File size: 2.1 KB
Line 
1/*
2 * Copyright (C) 2020 Apple Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 * THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include "config.h"
27#include "MockApplePaySetupFeature.h"
28
29#if ENABLE(APPLE_PAY)
30
31namespace WebCore {
32
33Ref<MockApplePaySetupFeature> MockApplePaySetupFeature::create(ApplePaySetupFeatureState state, ApplePaySetupFeatureType type, bool supportsInstallments)
34{
35 return adoptRef(*new MockApplePaySetupFeature(state, type, supportsInstallments));
36}
37
38MockApplePaySetupFeature::MockApplePaySetupFeature(ApplePaySetupFeatureState state, ApplePaySetupFeatureType type, bool supportsInstallments)
39 : ApplePaySetupFeature()
40 , m_state(state)
41 , m_type(type)
42#if ENABLE(APPLE_PAY_INSTALLMENTS)
43 , m_supportsInstallments(supportsInstallments)
44#endif
45{
46 UNUSED_PARAM(supportsInstallments);
47}
48
49} // namespace WebCore
50
51#endif // ENABLE(APPLE_PAY)
Note: See TracBrowser for help on using the repository browser.