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

Unified Diff: ios/chrome/browser/ui/payments/full_card_requester.h

Issue 2959133002: [Payment Request] unit tests for the FullCardRequester (Closed)
Patch Set: Created 3 years, 6 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/ui/payments/full_card_requester.h
diff --git a/ios/chrome/browser/ui/payments/full_card_requester.h b/ios/chrome/browser/ui/payments/full_card_requester.h
index 9214d2a4fb5987013c476fe99ef574531a715af7..ea6f1a0455d51b440b8d4c5b59274073844e55dc 100644
--- a/ios/chrome/browser/ui/payments/full_card_requester.h
+++ b/ios/chrome/browser/ui/payments/full_card_requester.h
@@ -23,7 +23,17 @@ namespace ios {
class ChromeBrowserState;
} // namespace ios
-@class PaymentRequestCoordinator;
+@protocol FullCardRequesterConsumer
+
+// Called when a credit card has been successfully unmasked. Note that |card|
+// may be different from what passed to GetFullCard method of FullCardRequester,
+// because CVC unmasking process may update the credit card number and
+// expiration date.
+- (void)fullCardRequestDidSucceedWithCard:(const autofill::CreditCard&)card
+ verificationCode:
+ (const base::string16&)verificationCode;
+
+@end
// Receives the full credit card details. Also displays the unmask prompt UI.
class FullCardRequester
@@ -31,7 +41,7 @@ class FullCardRequester
public autofill::payments::FullCardRequest::UIDelegate,
public base::SupportsWeakPtr<FullCardRequester> {
public:
- FullCardRequester(PaymentRequestCoordinator* owner,
+ FullCardRequester(id<FullCardRequesterConsumer> consumer,
UIViewController* base_view_controller,
ios::ChromeBrowserState* browser_state);
@@ -53,7 +63,7 @@ class FullCardRequester
autofill::AutofillClient::PaymentsRpcResult result) override;
private:
- __weak PaymentRequestCoordinator* owner_;
+ __weak id<FullCardRequesterConsumer> consumer_;
__weak UIViewController* base_view_controller_;
autofill::CardUnmaskPromptControllerImpl unmask_controller_;

Powered by Google App Engine
This is Rietveld 408576698