| Index: ios/chrome/browser/payments/credit_card_edit_view_controller.h
|
| diff --git a/ios/chrome/browser/payments/credit_card_edit_view_controller.h b/ios/chrome/browser/payments/credit_card_edit_view_controller.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..12dc3e1ae6dcd1c3f851a54362426948fc7d17f2
|
| --- /dev/null
|
| +++ b/ios/chrome/browser/payments/credit_card_edit_view_controller.h
|
| @@ -0,0 +1,62 @@
|
| +// 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_VIEW_CONTROLLER_H_
|
| +#define IOS_CHROME_BROWSER_PAYMENTS_CREDIT_CARD_EDIT_VIEW_CONTROLLER_H_
|
| +
|
| +#include "components/autofill/core/browser/field_types.h"
|
| +#include "ios/chrome/browser/payments/payment_request.h"
|
| +#import "ios/chrome/browser/payments/payment_request_edit_view_controller.h"
|
| +
|
| +namespace autofill {
|
| +class CreditCard;
|
| +} // namespace autofill
|
| +
|
| +@class CreditCardEditViewController;
|
| +
|
| +// Delegate protocol for CreditCardEditViewController.
|
| +@protocol CreditCardEditViewControllerDelegate<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
|
| +// view controller. Otherwise, it will be the same edited instance.
|
| +- (void)creditCardEditViewController:(CreditCardEditViewController*)controller
|
| + didFinishEditingCreditCard:(autofill::CreditCard*)creditCard;
|
| +
|
| +// Notifies the delegate that the user has chose to return to the previous
|
| +// screen.
|
| +- (void)creditCardEditViewControllerDidReturn:
|
| + (CreditCardEditViewController*)controller;
|
| +
|
| +@end
|
| +
|
| +// View controller responsible for presenting a credit card edit form. The form
|
| +// features text fields for the card number, card holder name, expiration month,
|
| +// and expiration year if the credit card is not a server card. It also displays
|
| +// the billing address associated with the credit card if there is one.
|
| +@interface CreditCardEditViewController : PaymentRequestEditViewController
|
| +
|
| +// The delegate to be notified when the user returns or finishes creating or
|
| +// editting a credit card.
|
| +@property(nonatomic, weak) id<CreditCardEditViewControllerDelegate> delegate;
|
| +
|
| +// Initializes this object with an instance of PaymentRequest which owns an
|
| +// instance of web::PaymentRequest as well as the credit card to be edited, if
|
| +// any. This object will not take ownership of |paymentRequest| or |creditCard|.
|
| +- (instancetype)initWithPaymentRequest:(PaymentRequest*)paymentRequest
|
| + creditCard:(autofill::CreditCard*)creditCard
|
| + NS_DESIGNATED_INITIALIZER;
|
| +
|
| +- (instancetype)init NS_UNAVAILABLE;
|
| +
|
| +- (instancetype)initWithStyle:(CollectionViewControllerStyle)style
|
| + NS_UNAVAILABLE;
|
| +
|
| +- (instancetype)initWithPaymentRequest:(PaymentRequest*)paymentRequest
|
| + NS_UNAVAILABLE;
|
| +
|
| +@end
|
| +
|
| +#endif // IOS_CHROME_BROWSER_PAYMENTS_CREDIT_CARD_EDIT_VIEW_CONTROLLER_H_
|
|
|