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

Unified Diff: ios/chrome/browser/payments/shipping_address_selection_mediator.h

Issue 2827453004: [Payment Request] Refactors 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/payments/shipping_address_selection_mediator.h
diff --git a/ios/chrome/browser/payments/shipping_address_selection_mediator.h b/ios/chrome/browser/payments/shipping_address_selection_mediator.h
new file mode 100644
index 0000000000000000000000000000000000000000..a33126e9fa4a77f21caa5a69b0195fbdceec4fcc
--- /dev/null
+++ b/ios/chrome/browser/payments/shipping_address_selection_mediator.h
@@ -0,0 +1,36 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_CHROME_BROWSER_PAYMENTS_SHIPPING_ADDRESS_SELECTION_MEDIATOR_H_
+#define IOS_CHROME_BROWSER_PAYMENTS_SHIPPING_ADDRESS_SELECTION_MEDIATOR_H_
+
+#import "ios/chrome/browser/payments/payment_request_selector_view_controller_data_source.h"
+
+class PaymentRequest;
+
+// Serves as data source for PaymentRequestSelectorViewController.
+@interface ShippingAddressSelectionMediator
+ : NSObject<PaymentRequestSelectorViewControllerDataSource>
+
+// The message to display in the header item. If nil, the header item will also
+// be nil.
+@property(nonatomic, copy) NSString* message;
gambard 2017/04/18 14:34:46 s/message/headerLabel (or headerString, but you sh
Moe 2017/04/18 17:19:16 Done.
+
+// The current state of the view controller.
+@property(nonatomic, readwrite, assign) PaymentRequestSelectorState state;
+
+// Index for the currently selected item or NSUIntegerMax if there is none.
+@property(nonatomic, readwrite, assign) NSUInteger selectedItemIndex;
+
+// Initializes this object with an instance of PaymentRequest which has a copy
+// of web::PaymentRequest as provided by the page invoking the Payment Request
+// API. This object will not take ownership of |paymentRequest|.
+- (instancetype)initWithPaymentRequest:(PaymentRequest*)paymentRequest
+ NS_DESIGNATED_INITIALIZER;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+@end
+
+#endif // IOS_CHROME_BROWSER_PAYMENTS_SHIPPING_ADDRESS_SELECTION_MEDIATOR_H_

Powered by Google App Engine
This is Rietveld 408576698