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

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

Issue 2826713002: [Payment Request] Refactors the remaining selector view controllers (Closed)
Patch Set: Addressed comment 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/payment_method_selection_mediator.h
diff --git a/ios/chrome/browser/payments/payment_method_selection_mediator.h b/ios/chrome/browser/payments/payment_method_selection_mediator.h
new file mode 100644
index 0000000000000000000000000000000000000000..13e3be70fcdc3c600a16d5cbd043fcd02412bf88
--- /dev/null
+++ b/ios/chrome/browser/payments/payment_method_selection_mediator.h
@@ -0,0 +1,29 @@
+// 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_PAYMENT_METHOD_SELECTION_MEDIATOR_H_
+#define IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_METHOD_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 PaymentMethodSelectionMediator
+ : NSObject<PaymentRequestSelectorViewControllerDataSource>
+
+// 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_PAYMENT_METHOD_SELECTION_MEDIATOR_H_

Powered by Google App Engine
This is Rietveld 408576698