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

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

Issue 2585233003: Upstream Chrome on iOS source code [2/11]. (Closed)
Patch Set: Created 4 years 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 2016 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_PAYMENT_ITEMS_DISPLAY_VIEW_CONTROLLER_H_
6 #define IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_ITEMS_DISPLAY_VIEW_CONTROLLER_H_
7
8 #import <UIKit/UIKit.h>
9 #include <vector>
10
11 #import "ios/chrome/browser/ui/collection_view/collection_view_controller.h"
12 #include "ios/web/public/payments/payment_request.h"
13
14 @class PaymentItemsDisplayViewController;
15
16 // Protocol for communicating with the delegate supplied to
17 // PaymentItemsDisplayViewController.
18 @protocol PaymentItemsDisplayViewControllerDelegate<NSObject>
19
20 // Notifies the delegate that the user has chosen to return to the previous
21 // screen.
22 - (void)paymentItemsDisplayViewControllerDidReturn:
23 (PaymentItemsDisplayViewController*)controller;
24
25 // Notifies the delegate that the user has confirmed the payment.
26 - (void)paymentItemsDisplayViewControllerDidConfirm:
27 (PaymentItemsDisplayViewController*)controller;
28
29 @end
30
31 // View controller responsible for presenting the payment items from the payment
32 // request. The payment items are the line items that should sum to the total
33 // payment (e.g. individual goods/services, tax, shipping).
34 @interface PaymentItemsDisplayViewController : CollectionViewController
35
36 // The payment total to be displayed to the user.
37 @property(nonatomic, assign) web::PaymentItem total;
38
39 // The line items to be displayed to the user.
40 @property(nonatomic, assign) std::vector<web::PaymentItem> paymentItems;
41
42 // The delegate to be notified when the user selects touches the return button
43 // or the pay button.
44 @property(nonatomic, weak) id<PaymentItemsDisplayViewControllerDelegate>
45 delegate;
46
47 - (instancetype)initWithPayButtonEnabled:(BOOL)payButtonEnabled
48 NS_DESIGNATED_INITIALIZER;
49
50 - (instancetype)initWithStyle:(CollectionViewControllerStyle)style
51 NS_UNAVAILABLE;
52
53 @end
54
55 #endif // IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_ITEMS_DISPLAY_VIEW_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698