REGRESSION (r217078): window.ApplePaySession is undefined on macOS Sierra
[WebKit-https.git] / Source / WebCore / Modules / applepay / ApplePaySession.idl
index 0d70d14..13fb5a9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2017 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -26,7 +26,7 @@
 [
     ActiveDOMObject,
     Conditional=APPLE_PAY,
-    Constructor(unsigned long version, Dictionary paymentRequest),
+    Constructor(unsigned long version, ApplePayPaymentRequest paymentRequest),
     ConstructorCallWith=Document,
     ConstructorMayThrowException,
     EnabledBySetting=ApplePay,
 
     [CallWith=ScriptExecutionContext, MayThrowException] static boolean supportsVersion(unsigned long version);
     [CallWith=ScriptExecutionContext, MayThrowException] static boolean canMakePayments();
-    [CallWith=ScriptExecutionContext, MayThrowException] static Promise canMakePaymentsWithActiveCard(DOMString merchantIdentifier);
-    [CallWith=ScriptExecutionContext, MayThrowException] static Promise openPaymentSetup(DOMString merchantIdentifier);
+    [CallWith=ScriptExecutionContext, MayThrowException] static Promise<boolean> canMakePaymentsWithActiveCard(DOMString merchantIdentifier);
+    [CallWith=ScriptExecutionContext, MayThrowException] static Promise<boolean> openPaymentSetup(DOMString merchantIdentifier);
 
     [MayThrowException] void begin();
     [MayThrowException] void abort();
-    [MayThrowException] void completeMerchantValidation(Dictionary merchantSession);
-    [Custom, MayThrowException] void completeShippingMethodSelection(unsigned short status, Dictionary newTotal, sequence<Dictionary> newLineItems);
-    [Custom, MayThrowException] void completeShippingContactSelection(unsigned short status, sequence<Dictionary> newShippingMethods, Dictionary newTotal, sequence<Dictionary> newLineItems);
-    [Custom, MayThrowException] void completePaymentMethodSelection(Dictionary newTotal, sequence<Dictionary> newLineItems);
+    [MayThrowException, CallWith=ScriptState] void completeMerchantValidation(any merchantSession);
+    [MayThrowException, Conditional=APPLE_PAY_DELEGATE] void completeShippingMethodSelection(ApplePayShippingMethodUpdate update);
+    [MayThrowException, Conditional=APPLE_PAY_DELEGATE] void completeShippingContactSelection(ApplePayShippingContactUpdate update);
+    [MayThrowException, Conditional=APPLE_PAY_DELEGATE] void completePaymentMethodSelection(ApplePayPaymentMethodUpdate update);
+    [MayThrowException, Conditional=APPLE_PAY_DELEGATE] void completePayment(ApplePayPaymentAuthorizationResult result);
+
+    [MayThrowException] void completeShippingMethodSelection(unsigned short status, ApplePayLineItem newTotal, sequence<ApplePayLineItem> newLineItems);
+    [MayThrowException] void completeShippingContactSelection(unsigned short status, sequence<ApplePayShippingMethod> newShippingMethods, ApplePayLineItem newTotal, sequence<ApplePayLineItem> newLineItems);
+    [MayThrowException] void completePaymentMethodSelection(ApplePayLineItem newTotal, sequence<ApplePayLineItem> newLineItems);
     [MayThrowException] void completePayment(unsigned short status);
 
     attribute EventHandler onvalidatemerchant;