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

Unified Diff: ios/chrome/browser/payments/shipping_address_selection_view_controller.mm

Issue 2701923003: [Payment Request] Error message screen (Closed)
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/payments/shipping_address_selection_view_controller.mm
diff --git a/ios/chrome/browser/payments/shipping_address_selection_view_controller.mm b/ios/chrome/browser/payments/shipping_address_selection_view_controller.mm
index 0d887cce1ce85184989086fb5b1560283c06b3be..5e94dd9a8dc52346ba5dc7e8e5b7a96284448b14 100644
--- a/ios/chrome/browser/payments/shipping_address_selection_view_controller.mm
+++ b/ios/chrome/browser/payments/shipping_address_selection_view_controller.mm
@@ -5,6 +5,7 @@
#import "ios/chrome/browser/payments/shipping_address_selection_view_controller.h"
#include "base/mac/foundation_util.h"
+
#include "base/strings/sys_string_conversions.h"
#include "components/autofill/core/browser/autofill_profile.h"
#include "components/strings/grit/components_strings.h"
@@ -12,6 +13,7 @@
#import "ios/chrome/browser/payments/cells/payments_text_item.h"
#import "ios/chrome/browser/payments/cells/shipping_address_item.h"
#import "ios/chrome/browser/payments/payment_request_util.h"
+#import "ios/chrome/browser/payments/shipping_address_selection_view_controller_actions.h"
#import "ios/chrome/browser/ui/autofill/cells/status_item.h"
#import "ios/chrome/browser/ui/collection_view/cells/MDCCollectionViewCell+Chrome.h"
#import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h"
@@ -32,8 +34,8 @@ using payment_request_util::NameLabelFromAutofillProfile;
using payment_request_util::AddressLabelFromAutofillProfile;
using payment_request_util::PhoneNumberLabelFromAutofillProfile;
-NSString* const kShippingAddressSelectionCollectionViewId =
- @"kShippingAddressSelectionCollectionViewId";
+NSString* const kShippingAddressSelectionCollectionViewID =
+ @"kShippingAddressSelectionCollectionViewID";
namespace {
@@ -52,7 +54,8 @@ typedef NS_ENUM(NSInteger, ItemType) {
} // namespace
-@interface ShippingAddressSelectionViewController () {
+@interface ShippingAddressSelectionViewController ()<
+ ShippingAddressSelectionViewControllerActions> {
// The PaymentRequest object owning an instance of web::PaymentRequest as
// provided by the page invoking the Payment Request API. This is a weak
// pointer and should outlive this class.
@@ -62,9 +65,6 @@ typedef NS_ENUM(NSInteger, ItemType) {
__weak ShippingAddressItem* _selectedItem;
}
-// Called when the user presses the return button.
-- (void)onReturn;
-
@end
@implementation ShippingAddressSelectionViewController
@@ -79,6 +79,7 @@ typedef NS_ENUM(NSInteger, ItemType) {
self.title =
payment_request_util::GetShippingAddressSelectorTitle(paymentRequest);
+ // Set up leading (return) button.
UIBarButtonItem* returnButton =
[ChromeIcon templateBarButtonItemWithImage:[ChromeIcon backIcon]
target:nil
@@ -154,7 +155,7 @@ typedef NS_ENUM(NSInteger, ItemType) {
- (void)viewDidLoad {
[super viewDidLoad];
self.collectionView.accessibilityIdentifier =
- kShippingAddressSelectionCollectionViewId;
+ kShippingAddressSelectionCollectionViewID;
// Customize collection view settings.
self.styler.cellStyle = MDCCollectionViewCellStyleCard;

Powered by Google App Engine
This is Rietveld 408576698