OLD | NEW |
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_UI_PAYMENTS_CONTACT_INFO_SELECTION_COORDINATOR_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_PAYMENTS_CONTACT_INFO_SELECTION_COORDINATOR_H_ |
6 #define IOS_CHROME_BROWSER_UI_PAYMENTS_CONTACT_INFO_SELECTION_COORDINATOR_H_ | 6 #define IOS_CHROME_BROWSER_UI_PAYMENTS_CONTACT_INFO_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/ui/payments/contact_info_edit_coordinator.h" |
12 #import "ios/chrome/browser/ui/payments/payment_request_selector_view_controller
.h" | 13 #import "ios/chrome/browser/ui/payments/payment_request_selector_view_controller
.h" |
13 | 14 |
14 class PaymentRequest; | 15 class PaymentRequest; |
15 | 16 |
16 namespace autofill { | 17 namespace autofill { |
17 class AutofillProfile; | 18 class AutofillProfile; |
18 } // namespace autofill | 19 } // namespace autofill |
19 | 20 |
20 @class ContactInfoSelectionCoordinator; | 21 @class ContactInfoSelectionCoordinator; |
21 | 22 |
22 // Delegate protocol for ContactInfoSelectionCoordinator. | 23 // Delegate protocol for ContactInfoSelectionCoordinator. |
23 @protocol ContactInfoSelectionCoordinatorDelegate<NSObject> | 24 @protocol ContactInfoSelectionCoordinatorDelegate<NSObject> |
24 | 25 |
25 // Notifies the delegate that the user has selected a contact profile. | 26 // Notifies the delegate that the user has selected a contact profile. |
26 - (void) | 27 - (void) |
27 contactInfoSelectionCoordinator:(ContactInfoSelectionCoordinator*)coordinator | 28 contactInfoSelectionCoordinator:(ContactInfoSelectionCoordinator*)coordinator |
28 didSelectContactProfile:(autofill::AutofillProfile*)contactProfile; | 29 didSelectContactProfile:(autofill::AutofillProfile*)contactProfile; |
29 | 30 |
30 // 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 |
31 // screen without making a selection. | 32 // screen without making a selection. |
32 - (void)contactInfoSelectionCoordinatorDidReturn: | 33 - (void)contactInfoSelectionCoordinatorDidReturn: |
33 (ContactInfoSelectionCoordinator*)coordinator; | 34 (ContactInfoSelectionCoordinator*)coordinator; |
34 | 35 |
35 @end | 36 @end |
36 | 37 |
37 // Coordinator responsible for creating and presenting the contact info | 38 // Coordinator responsible for creating and presenting the contact info |
38 // 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 |
39 // controller provided in the initializer. | 40 // controller provided in the initializer. |
40 @interface ContactInfoSelectionCoordinator | 41 @interface ContactInfoSelectionCoordinator |
41 : ChromeCoordinator<PaymentRequestSelectorViewControllerDelegate> | 42 : ChromeCoordinator<PaymentRequestSelectorViewControllerDelegate, |
| 43 ContactInfoEditCoordinatorDelegate> |
42 | 44 |
43 // 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 |
44 // 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 |
45 // class and should outlive it. | 47 // class and should outlive it. |
46 @property(nonatomic, assign) PaymentRequest* paymentRequest; | 48 @property(nonatomic, assign) PaymentRequest* paymentRequest; |
47 | 49 |
48 // The delegate to be notified when the user selects a contact profile or | 50 // The delegate to be notified when the user selects a contact profile or |
49 // returns without selecting one. | 51 // returns without selecting one. |
50 @property(nonatomic, weak) id<ContactInfoSelectionCoordinatorDelegate> delegate; | 52 @property(nonatomic, weak) id<ContactInfoSelectionCoordinatorDelegate> delegate; |
51 | 53 |
52 @end | 54 @end |
53 | 55 |
54 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_CONTACT_INFO_SELECTION_COORDINATOR_H_ | 56 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_CONTACT_INFO_SELECTION_COORDINATOR_H_ |
OLD | NEW |