Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Side by Side Diff: ios/chrome/browser/payments/credit_card_edit_view_controller.h

Issue 2744823003: [Payment Request] Generic edit form (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IOS_CHROME_BROWSER_PAYMENTS_CREDIT_CARD_EDIT_VIEW_CONTROLLER_H_
6 #define IOS_CHROME_BROWSER_PAYMENTS_CREDIT_CARD_EDIT_VIEW_CONTROLLER_H_
7
8 #include "components/autofill/core/browser/field_types.h"
9 #include "ios/chrome/browser/payments/payment_request.h"
10 #import "ios/chrome/browser/payments/payment_request_edit_view_controller.h"
11
12 namespace autofill {
13 class CreditCard;
14 } // namespace autofill
15
16 @class CreditCardEditViewController;
17
18 // Delegate protocol for CreditCardEditViewController.
19 @protocol CreditCardEditViewControllerDelegate<NSObject>
20
21 // Notifies the delegate that the user has finished editing or creating
22 // |creditCard|. |creditCard| will be a new credit card owned by the
23 // PaymentRequest object if no credit card instance was provided to the
24 // view controller. Otherwise, it will be the same edited instance.
25 - (void)creditCardEditViewController:(CreditCardEditViewController*)controller
26 didFinishEditingCreditCard:(autofill::CreditCard*)creditCard;
27
28 // Notifies the delegate that the user has chose to return to the previous
29 // screen.
30 - (void)creditCardEditViewControllerDidReturn:
31 (CreditCardEditViewController*)controller;
32
33 @end
34
35 // View controller responsible for presenting a credit card edit form. The form
36 // features text fields for the card number, card holder name, expiration month,
37 // and expiration year if the credit card is not a server card. It also displays
38 // the billing address associated with the credit card if there is one.
39 @interface CreditCardEditViewController : PaymentRequestEditViewController
40
41 // The delegate to be notified when the user returns or finishes creating or
42 // editting a credit card.
43 @property(nonatomic, weak) id<CreditCardEditViewControllerDelegate> delegate;
44
45 // Initializes this object with an instance of PaymentRequest which owns an
46 // instance of web::PaymentRequest as well as the credit card to be edited, if
47 // any. This object will not take ownership of |paymentRequest| or |creditCard|.
48 - (instancetype)initWithPaymentRequest:(PaymentRequest*)paymentRequest
49 creditCard:(autofill::CreditCard*)creditCard
50 NS_DESIGNATED_INITIALIZER;
51
52 - (instancetype)init NS_UNAVAILABLE;
53
54 - (instancetype)initWithStyle:(CollectionViewControllerStyle)style
55 NS_UNAVAILABLE;
56
57 - (instancetype)initWithPaymentRequest:(PaymentRequest*)paymentRequest
58 NS_UNAVAILABLE;
59
60 @end
61
62 #endif // IOS_CHROME_BROWSER_PAYMENTS_CREDIT_CARD_EDIT_VIEW_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698