| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_COORDINATOR_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_COORDINATOR_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_COORDINATOR_H_ | 6 #define IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_COORDINATOR_H_ |
| 7 | 7 |
| 8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
| 9 | 9 |
| 10 #include "base/ios/block_types.h" | 10 #include "base/ios/block_types.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 class ChromeBrowserState; | 27 class ChromeBrowserState; |
| 28 } // namespace ios | 28 } // namespace ios |
| 29 | 29 |
| 30 namespace payments { | 30 namespace payments { |
| 31 struct PaymentAddress; | 31 struct PaymentAddress; |
| 32 } // namespace payments | 32 } // namespace payments |
| 33 | 33 |
| 34 namespace web { | 34 namespace web { |
| 35 class PaymentDetails; | 35 class PaymentDetails; |
| 36 class PaymentShippingOption; | 36 class PaymentShippingOption; |
| 37 class PaymentResponse; | |
| 38 } // namespace web | 37 } // namespace web |
| 39 | 38 |
| 40 @class PaymentRequestCoordinator; | 39 @class PaymentRequestCoordinator; |
| 41 | 40 |
| 42 // Delegate protocol for PaymentRequestCoordinator. | 41 // Delegate protocol for PaymentRequestCoordinator. |
| 43 @protocol PaymentRequestCoordinatorDelegate<NSObject> | 42 @protocol PaymentRequestCoordinatorDelegate<NSObject> |
| 44 | 43 |
| 45 // Notifies the delegate that the user has canceled the payment request. | 44 // Notifies the delegate that the user has canceled the payment request. |
| 46 - (void)paymentRequestCoordinatorDidCancel: | 45 - (void)paymentRequestCoordinatorDidCancel: |
| 47 (PaymentRequestCoordinator*)coordinator; | 46 (PaymentRequestCoordinator*)coordinator; |
| 48 | 47 |
| 49 // Notifies the delegate that the user has selected to go to the card and | 48 // Notifies the delegate that the user has selected to go to the card and |
| 50 // address options page in Settings. | 49 // address options page in Settings. |
| 51 - (void)paymentRequestCoordinatorDidSelectSettings: | 50 - (void)paymentRequestCoordinatorDidSelectSettings: |
| 52 (PaymentRequestCoordinator*)coordinator; | 51 (PaymentRequestCoordinator*)coordinator; |
| 53 | 52 |
| 54 // Notifies the delegate that the user has confirmed the payment request. | 53 // Notifies the delegate that the user has completed the payment request. |
| 55 - (void)paymentRequestCoordinator:(PaymentRequestCoordinator*)coordinator | 54 - (void)paymentRequestCoordinator:(PaymentRequestCoordinator*)coordinator |
| 56 didConfirmWithPaymentResponse:(web::PaymentResponse)paymentResponse; | 55 didCompletePaymentRequest:(PaymentRequest*)paymentRequest |
| 56 card:(const autofill::CreditCard&)card |
| 57 verificationCode:(const base::string16&)verificationCode; |
| 57 | 58 |
| 58 // Notifies the delegate that the user has selected a shipping address. | 59 // Notifies the delegate that the user has selected a shipping address. |
| 59 - (void)paymentRequestCoordinator:(PaymentRequestCoordinator*)coordinator | 60 - (void)paymentRequestCoordinator:(PaymentRequestCoordinator*)coordinator |
| 60 didSelectShippingAddress:(payments::PaymentAddress)shippingAddress; | 61 didSelectShippingAddress:(payments::PaymentAddress)shippingAddress; |
| 61 | 62 |
| 62 // Notifies the delegate that the user has selected a shipping option. | 63 // Notifies the delegate that the user has selected a shipping option. |
| 63 - (void)paymentRequestCoordinator:(PaymentRequestCoordinator*)coordinator | 64 - (void)paymentRequestCoordinator:(PaymentRequestCoordinator*)coordinator |
| 64 didSelectShippingOption:(web::PaymentShippingOption)shippingOption; | 65 didSelectShippingOption:(web::PaymentShippingOption)shippingOption; |
| 65 | 66 |
| 66 @end | 67 @end |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 - (void)updatePaymentDetails:(web::PaymentDetails)paymentDetails; | 109 - (void)updatePaymentDetails:(web::PaymentDetails)paymentDetails; |
| 109 | 110 |
| 110 // Displays an error message. Invokes |callback| when the message is dismissed. | 111 // Displays an error message. Invokes |callback| when the message is dismissed. |
| 111 - (void)displayErrorWithCallback:(ProceduralBlock)callback; | 112 - (void)displayErrorWithCallback:(ProceduralBlock)callback; |
| 112 | 113 |
| 113 // Called when a credit card has been successfully unmasked. Note that |card| | 114 // Called when a credit card has been successfully unmasked. Note that |card| |
| 114 // may be different from what's returned by the selected_credit_card() method of | 115 // may be different from what's returned by the selected_credit_card() method of |
| 115 // |paymentRequest|, because CVC unmasking process may update the credit card | 116 // |paymentRequest|, because CVC unmasking process may update the credit card |
| 116 // number and expiration date. | 117 // number and expiration date. |
| 117 - (void)fullCardRequestDidSucceedWithCard:(const autofill::CreditCard&)card | 118 - (void)fullCardRequestDidSucceedWithCard:(const autofill::CreditCard&)card |
| 118 CVC:(const base::string16&)cvc; | 119 verificationCode: |
| 120 (const base::string16&)verificationCode; |
| 119 | 121 |
| 120 @end | 122 @end |
| 121 | 123 |
| 122 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_COORDINATOR_H_ | 124 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_COORDINATOR_H_ |
| OLD | NEW |