OLD | NEW |
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/chrome/browser/payments/payment_request_selector_view_controller.h" | 5 #import "ios/chrome/browser/payments/payment_request_selector_view_controller.h" |
6 | 6 |
7 #include "base/mac/foundation_util.h" | 7 #include "base/mac/foundation_util.h" |
8 #include "components/strings/grit/components_strings.h" | 8 #include "components/strings/grit/components_strings.h" |
9 #import "ios/chrome/browser/payments/cells/payments_text_item.h" | 9 #import "ios/chrome/browser/payments/cells/payments_text_item.h" |
10 #import "ios/chrome/browser/payments/payment_request_selector_view_controller_ac
tions.h" | 10 #import "ios/chrome/browser/payments/payment_request_selector_view_controller_ac
tions.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 if ([cell isKindOfClass:[PaymentsTextCell class]]) { | 144 if ([cell isKindOfClass:[PaymentsTextCell class]]) { |
145 PaymentsTextCell* textCell = | 145 PaymentsTextCell* textCell = |
146 base::mac::ObjCCastStrict<PaymentsTextCell>(cell); | 146 base::mac::ObjCCastStrict<PaymentsTextCell>(cell); |
147 textCell.textLabel.textColor = | 147 textCell.textLabel.textColor = |
148 self.dataSource.state == PaymentRequestSelectorStateError | 148 self.dataSource.state == PaymentRequestSelectorStateError |
149 ? [[MDCPalette cr_redPalette] tint600] | 149 ? [[MDCPalette cr_redPalette] tint600] |
150 : [[MDCPalette greyPalette] tint600]; | 150 : [[MDCPalette greyPalette] tint600]; |
151 } | 151 } |
152 break; | 152 break; |
153 } | 153 } |
| 154 case ItemTypeSelectableItem: { |
| 155 if ([cell isKindOfClass:[PaymentsTextCell class]]) { |
| 156 PaymentsTextCell* textCell = |
| 157 base::mac::ObjCCastStrict<PaymentsTextCell>(cell); |
| 158 textCell.detailTextLabel.textColor = [[MDCPalette greyPalette] tint500]; |
| 159 } |
| 160 break; |
| 161 } |
154 default: | 162 default: |
155 break; | 163 break; |
156 } | 164 } |
157 | 165 |
158 return cell; | 166 return cell; |
159 } | 167 } |
160 | 168 |
161 #pragma mark UICollectionViewDelegate | 169 #pragma mark UICollectionViewDelegate |
162 | 170 |
163 - (void)collectionView:(UICollectionView*)collectionView | 171 - (void)collectionView:(UICollectionView*)collectionView |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 hidesInkViewAtIndexPath:(NSIndexPath*)indexPath { | 231 hidesInkViewAtIndexPath:(NSIndexPath*)indexPath { |
224 NSInteger type = [self.collectionViewModel itemTypeForIndexPath:indexPath]; | 232 NSInteger type = [self.collectionViewModel itemTypeForIndexPath:indexPath]; |
225 if (type == ItemTypeHeader) { | 233 if (type == ItemTypeHeader) { |
226 return YES; | 234 return YES; |
227 } else { | 235 } else { |
228 return NO; | 236 return NO; |
229 } | 237 } |
230 } | 238 } |
231 | 239 |
232 @end | 240 @end |
OLD | NEW |