REGRESSION (r217078): window.ApplePaySession is undefined on macOS Sierra
[WebKit-https.git] / Source / WebCore / Modules / applepay / ApplePaySession.idl
index 53ad680..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,8 +26,8 @@
 [
     ActiveDOMObject,
     Conditional=APPLE_PAY,
-    Constructor(unsigned long version, any paymentRequest),
-    ConstructorCallWith=Document&ScriptState,
+    Constructor(unsigned long version, ApplePayPaymentRequest paymentRequest),
+    ConstructorCallWith=Document,
     ConstructorMayThrowException,
     EnabledBySetting=ApplePay,
 ] interface ApplePaySession : EventTarget {
 
     [MayThrowException] void begin();
     [MayThrowException] void abort();
-    [CallWith=ScriptState, MayThrowException] void completeMerchantValidation(any merchantSession);
-    [Custom, MayThrowException] void completeShippingMethodSelection(unsigned short status, any newTotal, any newLineItems);
-    [Custom, MayThrowException] void completeShippingContactSelection(unsigned short status, any newShippingMethods, any newTotal, any newLineItems);
-    [Custom, MayThrowException] void completePaymentMethodSelection(any newTotal, any 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;