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

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

Issue 2701923003: [Payment Request] Error message screen (Closed)
Patch Set: Addressed comments Created 3 years, 10 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_REQUEST_COORDINATOR_H_ 5 #ifndef IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_COORDINATOR_H_
6 #define IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_COORDINATOR_H_ 6 #define IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_COORDINATOR_H_
7 7
8 #import <UIKit/UIKit.h> 8 #import <UIKit/UIKit.h>
9 9
10 #include "components/autofill/core/browser/autofill_manager.h" 10 #include "components/autofill/core/browser/autofill_manager.h"
11 #import "ios/chrome/browser/chrome_coordinator.h" 11 #import "ios/chrome/browser/chrome_coordinator.h"
12 #import "ios/chrome/browser/payments/payment_items_display_coordinator.h" 12 #import "ios/chrome/browser/payments/payment_items_display_coordinator.h"
13 #import "ios/chrome/browser/payments/payment_method_selection_coordinator.h" 13 #import "ios/chrome/browser/payments/payment_method_selection_coordinator.h"
14 #include "ios/chrome/browser/payments/payment_request.h" 14 #include "ios/chrome/browser/payments/payment_request.h"
15 #include "ios/chrome/browser/payments/payment_request_error_coordinator.h"
15 #import "ios/chrome/browser/payments/payment_request_view_controller.h" 16 #import "ios/chrome/browser/payments/payment_request_view_controller.h"
16 #import "ios/chrome/browser/payments/shipping_address_selection_coordinator.h" 17 #import "ios/chrome/browser/payments/shipping_address_selection_coordinator.h"
17 #import "ios/chrome/browser/payments/shipping_option_selection_coordinator.h" 18 #import "ios/chrome/browser/payments/shipping_option_selection_coordinator.h"
18 19
19 namespace ios { 20 namespace ios {
20 class ChromeBrowserState; 21 class ChromeBrowserState;
21 } 22 }
22 23
23 @class PaymentRequestCoordinator; 24 @class PaymentRequestCoordinator;
24 25
(...skipping 16 matching lines...) Expand all
41 - (void)paymentRequestCoordinator:(PaymentRequestCoordinator*)coordinator 42 - (void)paymentRequestCoordinator:(PaymentRequestCoordinator*)coordinator
42 didSelectShippingOption:(web::PaymentShippingOption)shippingOption; 43 didSelectShippingOption:(web::PaymentShippingOption)shippingOption;
43 44
44 @end 45 @end
45 46
46 // Coordinator responsible for creating and presenting the PaymentRequest view 47 // Coordinator responsible for creating and presenting the PaymentRequest view
47 // controller. The PR view controller will be presented by the view controller 48 // controller. The PR view controller will be presented by the view controller
48 // provided in the initializer. 49 // provided in the initializer.
49 @interface PaymentRequestCoordinator 50 @interface PaymentRequestCoordinator
50 : ChromeCoordinator<PaymentRequestViewControllerDelegate, 51 : ChromeCoordinator<PaymentRequestViewControllerDelegate,
52 PaymentRequestErrorCoordinatorDelegate,
51 PaymentItemsDisplayCoordinatorDelegate, 53 PaymentItemsDisplayCoordinatorDelegate,
52 PaymentMethodSelectionCoordinatorDelegate, 54 PaymentMethodSelectionCoordinatorDelegate,
53 ShippingAddressSelectionCoordinatorDelegate, 55 ShippingAddressSelectionCoordinatorDelegate,
54 ShippingOptionSelectionCoordinatorDelegate> 56 ShippingOptionSelectionCoordinatorDelegate>
55 57
56 // Creates a Payment Request coordinator that will present UI on 58 // Creates a Payment Request coordinator that will present UI on
57 // |viewController| using data available from |personalDataManager|. 59 // |viewController| using data available from |personalDataManager|.
58 - (instancetype)initWithBaseViewController:(UIViewController*)viewController 60 - (instancetype)initWithBaseViewController:(UIViewController*)viewController
59 NS_DESIGNATED_INITIALIZER; 61 NS_DESIGNATED_INITIALIZER;
60 62
(...skipping 21 matching lines...) Expand all
82 // The host of the page invoking the Payment Request API. Should be set before 84 // The host of the page invoking the Payment Request API. Should be set before
83 // calling |start|. 85 // calling |start|.
84 @property(nonatomic, copy) NSString* pageHost; 86 @property(nonatomic, copy) NSString* pageHost;
85 87
86 // The delegate to be notified when the user confirms or cancels the request. 88 // The delegate to be notified when the user confirms or cancels the request.
87 @property(nonatomic, weak) id<PaymentRequestCoordinatorDelegate> delegate; 89 @property(nonatomic, weak) id<PaymentRequestCoordinatorDelegate> delegate;
88 90
89 // Updates the payment details of the PaymentRequest and updates the UI. 91 // Updates the payment details of the PaymentRequest and updates the UI.
90 - (void)updatePaymentDetails:(web::PaymentDetails)paymentDetails; 92 - (void)updatePaymentDetails:(web::PaymentDetails)paymentDetails;
91 93
94 // Displays an error message. Invokes |callback| when the message is dismissed.
95 - (void)displayErrorWithCallback:(void (^)())callback;
96
92 // Called when a credit card has been successfully unmasked. 97 // Called when a credit card has been successfully unmasked.
93 - (void)fullCardRequestDidSucceedWithCard:(const autofill::CreditCard&)card 98 - (void)fullCardRequestDidSucceedWithCard:(const autofill::CreditCard&)card
94 CVC:(const base::string16&)cvc; 99 CVC:(const base::string16&)cvc;
95 100
96 @end 101 @end
97 102
98 #endif // IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_COORDINATOR_H_ 103 #endif // IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_COORDINATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698