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

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

Issue 2825143002: [Payment Request] Accepted credit card type icons in the credit card editor (Closed)
Patch Set: Initial Created 3 years, 8 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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 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_PAYMENTS_CREDIT_CARD_EDIT_VIEW_CONTROLLER_H_ 5 #ifndef IOS_CHROME_BROWSER_PAYMENTS_CREDIT_CARD_EDIT_VIEW_CONTROLLER_H_
6 #define IOS_CHROME_BROWSER_PAYMENTS_CREDIT_CARD_EDIT_VIEW_CONTROLLER_H_ 6 #define IOS_CHROME_BROWSER_PAYMENTS_CREDIT_CARD_EDIT_VIEW_CONTROLLER_H_
7 7
8 #import "ios/chrome/browser/payments/payment_request_edit_view_controller.h" 8 #import "ios/chrome/browser/payments/payment_request_edit_view_controller.h"
9 9
10 @class EditorField; 10 @class EditorField;
11 @class CreditCardEditViewController; 11 @class CreditCardEditViewController;
12 12
13 typedef NS_ENUM(NSInteger, CreditCardEditViewControllerState) { 13 typedef NS_ENUM(NSInteger, CreditCardEditViewControllerState) {
14 // The view controller is used to create a new credit card. 14 // The view controller is used to create a new credit card.
15 CreditCardEditViewControllerStateCreate, 15 CreditCardEditViewControllerStateCreate,
16 // The view controller is used to edit a credit card. 16 // The view controller is used to edit a credit card.
17 CreditCardEditViewControllerStateEdit, 17 CreditCardEditViewControllerStateEdit,
18 }; 18 };
19 19
20 // Data source protocol for CreditCardEditViewController. 20 // Data source protocol for CreditCardEditViewController.
21 @protocol CreditCardEditViewControllerDataSource< 21 @protocol CreditCardEditViewControllerDataSource<
lpromero 2017/04/20 16:59:52 It might be time to move this into its own _data_s
Moe 2017/04/21 14:14:14 Acknowledged.
22 PaymentRequestEditViewControllerDataSource> 22 PaymentRequestEditViewControllerDataSource>
23 23
24 // Returns an item that identifies the server card being edited. Returns nil for 24 // Returns an item that identifies the server card being edited. Returns nil for
25 // local cards or when a card is being created. 25 // local cards or when a card is being created.
26 - (CollectionViewItem*)serverCardSummaryItem; 26 - (CollectionViewItem*)serverCardSummaryItem;
27 27
28 // Returns an item that displays a list of payment method type icons for the
29 // accepted payment methods. Returns nil if a server card is being edited.
lpromero 2017/04/20 16:59:52 The notion of server card seems to me more like a
Moe 2017/04/21 14:14:14 Agreed. Done.
30 - (CollectionViewItem*)acceptedPaymentMethodsItem;
31
28 // Returns the billing address label from an autofill profile with the given 32 // Returns the billing address label from an autofill profile with the given
29 // guid. Returns nil if the profile does not have an address. 33 // guid. Returns nil if the profile does not have an address.
30 - (NSString*)billingAddressLabelForProfileWithGUID:(NSString*)profileGUID; 34 - (NSString*)billingAddressLabelForProfileWithGUID:(NSString*)profileGUID;
31 35
32 // Returns the credit card type icon corresponding to |cardNumber|. 36 // Returns the credit card type icon corresponding to |cardNumber|.
33 - (UIImage*)cardTypeIconFromCardNumber:(NSString*)cardNumber; 37 - (UIImage*)cardTypeIconFromCardNumber:(NSString*)cardNumber;
34 38
35 @end 39 @end
36 40
37 // Delegate protocol for CreditCardEditViewController. 41 // Delegate protocol for CreditCardEditViewController.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 @property(nonatomic, assign) CreditCardEditViewControllerState state; 77 @property(nonatomic, assign) CreditCardEditViewControllerState state;
74 78
75 - (instancetype)init NS_DESIGNATED_INITIALIZER; 79 - (instancetype)init NS_DESIGNATED_INITIALIZER;
76 80
77 - (instancetype)initWithStyle:(CollectionViewControllerStyle)style 81 - (instancetype)initWithStyle:(CollectionViewControllerStyle)style
78 NS_UNAVAILABLE; 82 NS_UNAVAILABLE;
79 83
80 @end 84 @end
81 85
82 #endif // IOS_CHROME_BROWSER_PAYMENTS_CREDIT_CARD_EDIT_VIEW_CONTROLLER_H_ 86 #endif // IOS_CHROME_BROWSER_PAYMENTS_CREDIT_CARD_EDIT_VIEW_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698