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

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

Issue 2826713002: [Payment Request] Refactors the remaining selector view controllers (Closed)
Patch Set: 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 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_PAYMENTS_PAYMENT_METHOD_SELECTION_COORDINATOR_H_ 5 #ifndef IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_METHOD_SELECTION_COORDINATOR_H_
6 #define IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_METHOD_SELECTION_COORDINATOR_H_ 6 #define IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_METHOD_SELECTION_COORDINATOR_H_
7 7
8 #import <UIKit/UIKit.h> 8 #import <UIKit/UIKit.h>
9 #include <vector> 9 #include <vector>
10 10
11 #import "ios/chrome/browser/chrome_coordinator.h" 11 #import "ios/chrome/browser/chrome_coordinator.h"
12 #import "ios/chrome/browser/payments/credit_card_edit_coordinator.h" 12 #import "ios/chrome/browser/payments/credit_card_edit_coordinator.h"
13 #import "ios/chrome/browser/payments/payment_method_selection_view_controller.h" 13 #import "ios/chrome/browser/payments/payment_request_selector_view_controller.h"
14 14
15 class PaymentRequest; 15 class PaymentRequest;
16 16
17 namespace autofill { 17 namespace autofill {
18 class CreditCard; 18 class CreditCard;
19 } // namespace autofill 19 } // namespace autofill
20 20
21 @class PaymentMethodSelectionCoordinator; 21 @class PaymentMethodSelectionCoordinator;
22 22
23 // Delegate protocol for PaymentMethodSelectionCoordinator. 23 // Delegate protocol for PaymentMethodSelectionCoordinator.
24 @protocol PaymentMethodSelectionCoordinatorDelegate<NSObject> 24 @protocol PaymentMethodSelectionCoordinatorDelegate<NSObject>
25 25
26 // Notifies the delegate that the user has selected a payment method. 26 // Notifies the delegate that the user has selected a payment method.
27 - (void)paymentMethodSelectionCoordinator: 27 - (void)paymentMethodSelectionCoordinator:
28 (PaymentMethodSelectionCoordinator*)coordinator 28 (PaymentMethodSelectionCoordinator*)coordinator
29 didSelectPaymentMethod:(autofill::CreditCard*)paymentMethod; 29 didSelectPaymentMethod:(autofill::CreditCard*)paymentMethod;
30 30
31 // Notifies the delegate that the user has chosen to return to the previous 31 // Notifies the delegate that the user has chosen to return to the previous
32 // screen without making a selection. 32 // screen without making a selection.
33 - (void)paymentMethodSelectionCoordinatorDidReturn: 33 - (void)paymentMethodSelectionCoordinatorDidReturn:
34 (PaymentMethodSelectionCoordinator*)coordinator; 34 (PaymentMethodSelectionCoordinator*)coordinator;
35 35
36 @end 36 @end
37 37
38 // Coordinator responsible for creating and presenting the payment method 38 // Coordinator responsible for creating and presenting the payment method
39 // selection view controller. This view controller will be presented by the view 39 // selection view controller. This view controller will be presented by the view
40 // controller provided in the initializer. 40 // controller provided in the initializer.
41 @interface PaymentMethodSelectionCoordinator 41 @interface PaymentMethodSelectionCoordinator
42 : ChromeCoordinator<PaymentMethodSelectionViewControllerDelegate, 42 : ChromeCoordinator<PaymentRequestSelectorViewControllerDelegate,
43 CreditCardEditCoordinatorDelegate> 43 CreditCardEditCoordinatorDelegate>
44 44
45 // The PaymentRequest object having a copy of web::PaymentRequest as provided by 45 // The PaymentRequest object having a copy of web::PaymentRequest as provided by
46 // the page invoking the Payment Request API. This pointer is not owned by this 46 // the page invoking the Payment Request API. This pointer is not owned by this
47 // class and should outlive it. 47 // class and should outlive it.
48 @property(nonatomic, assign) PaymentRequest* paymentRequest; 48 @property(nonatomic, assign) PaymentRequest* paymentRequest;
49 49
50 // The delegate to be notified when the user selects a payment method or returns 50 // The delegate to be notified when the user selects a payment method or returns
51 // without selecting a payment method. 51 // without selecting a payment method.
52 @property(nonatomic, weak) 52 @property(nonatomic, weak)
53 id<PaymentMethodSelectionCoordinatorDelegate> delegate; 53 id<PaymentMethodSelectionCoordinatorDelegate> delegate;
54 54
55 @end 55 @end
56 56
57 #endif // IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_METHOD_SELECTION_COORDINATOR_H_ 57 #endif // IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_METHOD_SELECTION_COORDINATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698