| Index: ios/chrome/browser/payments/credit_card_edit_coordinator.h
|
| diff --git a/ios/chrome/browser/payments/credit_card_edit_coordinator.h b/ios/chrome/browser/payments/credit_card_edit_coordinator.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..eed4c5c49a4136baab8b2622a4ace6c52d0f6281
|
| --- /dev/null
|
| +++ b/ios/chrome/browser/payments/credit_card_edit_coordinator.h
|
| @@ -0,0 +1,55 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef IOS_CHROME_BROWSER_PAYMENTS_CREDIT_CARD_EDIT_COORDINATOR_H_
|
| +#define IOS_CHROME_BROWSER_PAYMENTS_CREDIT_CARD_EDIT_COORDINATOR_H_
|
| +
|
| +#import "ios/chrome/browser/chrome_coordinator.h"
|
| +#import "ios/chrome/browser/payments/credit_card_edit_view_controller.h"
|
| +
|
| +namespace autofill {
|
| +class CreditCard;
|
| +} // namespace autofill
|
| +
|
| +@class CreditCardEditCoordinator;
|
| +
|
| +// Delegate protocol for CreditCardEditCoordinator.
|
| +@protocol CreditCardEditCoordinatorDelegate<NSObject>
|
| +
|
| +// Notifies the delegate that the user has finished editing or creating
|
| +// |creditCard|. |creditCard| will be a new credit card owned by the
|
| +// PaymentRequest object if no credit card instance was provided to the
|
| +// coordinator. Otherwise, it will be the same edited instance.
|
| +- (void)creditCardEditCoordinator:(CreditCardEditCoordinator*)coordinator
|
| + didFinishEditingCreditCard:(autofill::CreditCard*)creditCard;
|
| +
|
| +// Notifies the delegate that the user has chose to return to the previous
|
| +// screen.
|
| +- (void)creditCardEditCoordinatorDidReturn:
|
| + (CreditCardEditCoordinator*)coordinator;
|
| +
|
| +@end
|
| +
|
| +// Coordinator responsible for creating and presenting a credit card editor view
|
| +// controller. This view controller will be presented by the view controller
|
| +// provided in the initializer.
|
| +@interface CreditCardEditCoordinator
|
| + : ChromeCoordinator<CreditCardEditViewControllerDelegate>
|
| +
|
| +// The credit card to be edited, if any. This pointer is not owned by this class
|
| +// and should outlive it.
|
| +@property(nonatomic, assign) autofill::CreditCard* creditCard;
|
| +
|
| +// The PaymentRequest object owning an instance of web::PaymentRequest as
|
| +// provided by the page invoking the Payment Request API. This pointer is not
|
| +// owned by this class and should outlive it.
|
| +@property(nonatomic, assign) PaymentRequest* paymentRequest;
|
| +
|
| +// The delegate to be notified when the user returns or finishes creating or
|
| +// editting a credit card.
|
| +@property(nonatomic, weak) id<CreditCardEditCoordinatorDelegate> delegate;
|
| +
|
| +@end
|
| +
|
| +#endif // IOS_CHROME_BROWSER_PAYMENTS_CREDIT_CARD_EDIT_COORDINATOR_H_
|
|
|