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

Side by Side Diff: ios/showcase/payments/sc_payments_editor_coordinator.mm

Issue 2949813003: [Payment Request] Formats phone number and credit card number in editors. (Closed)
Patch Set: Fixed broken tests 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 unified diff | Download patch
« no previous file with comments | « ios/chrome/browser/ui/payments/payment_request_edit_view_controller_unittest.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/showcase/payments/sc_payments_editor_coordinator.h" 5 #import "ios/showcase/payments/sc_payments_editor_coordinator.h"
6 6
7 #import "base/mac/foundation_util.h" 7 #import "base/mac/foundation_util.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #import "ios/chrome/browser/ui/autofill/autofill_ui_type.h" 9 #import "ios/chrome/browser/ui/autofill/autofill_ui_type.h"
10 #import "ios/chrome/browser/ui/autofill/autofill_ui_type_util.h" 10 #import "ios/chrome/browser/ui/autofill/autofill_ui_type_util.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 #pragma mark - PaymentRequestEditViewControllerDataSource 98 #pragma mark - PaymentRequestEditViewControllerDataSource
99 99
100 - (CollectionViewItem*)headerItem { 100 - (CollectionViewItem*)headerItem {
101 return nil; 101 return nil;
102 } 102 }
103 103
104 - (BOOL)shouldHideBackgroundForHeaderItem { 104 - (BOOL)shouldHideBackgroundForHeaderItem {
105 return NO; 105 return NO;
106 } 106 }
107 107
108 - (void)formatValueForEditorField:(EditorField*)field {
109 }
110
108 - (UIImage*)iconIdentifyingEditorField:(EditorField*)field { 111 - (UIImage*)iconIdentifyingEditorField:(EditorField*)field {
109 return nil; 112 return nil;
110 } 113 }
111 114
112 #pragma mark - PaymentRequestEditViewControllerValidator 115 #pragma mark - PaymentRequestEditViewControllerValidator
113 116
114 - (NSString*)paymentRequestEditViewController: 117 - (NSString*)paymentRequestEditViewController:
115 (PaymentRequestEditViewController*)controller 118 (PaymentRequestEditViewController*)controller
116 validateField:(EditorField*)field { 119 validateField:(EditorField*)field {
117 return (!field.value.length && field.isRequired) ? @"Field is required" : nil; 120 return (!field.value.length && field.isRequired) ? @"Field is required" : nil;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 162
160 // Set the options for the province field after the model is loaded. 163 // Set the options for the province field after the model is loaded.
161 [self.mediator loadProvinces]; 164 [self.mediator loadProvinces];
162 165
163 [self.baseViewController 166 [self.baseViewController
164 pushViewController:self.paymentRequestEditViewController 167 pushViewController:self.paymentRequestEditViewController
165 animated:YES]; 168 animated:YES];
166 } 169 }
167 170
168 @end 171 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/payments/payment_request_edit_view_controller_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698